paste

A command that pastes the current clipboard or supplied text, files, images, or encoded data into a target on a Mac.

In plain words
What is it for?
Use it to enter text, paste files or images, insert rich content, or send existing clipboard contents to desktop applications.
Why use it?
It combines preparing the clipboard, pasting, and restoring the previous clipboard contents, reducing the chance of intermediate automation steps getting out of sync.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/openclaw/peekaboo/paste
Clone the repo
git clone --depth 1 https://github.com/openclaw/Peekaboo
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,214 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01214
Opus 5 $0.00000 $0.00607
Sonnet 5 $0.00000 $0.00243
Haiku 4.5 $0.00000 $0.00121

Measured 2d ago against content hash ea798f6a5882, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

paste scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/paste.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

peekaboo paste

paste sends Cmd+V. With no payload, it pastes the current clipboard contents. With text, a file, an image, or base64 data, it becomes an atomic “clipboard + Cmd+V + restore” helper: temporarily replace the system clipboard with your payload, paste into the target, then restore the previous clipboard contents (or clear it if it was empty).

This reduces drift by collapsing multiple CLI steps into one command. Plain text uses direct process-targeted typing in background mode. Rich/current-clipboard payloads use Cmd+V; pass --foreground when the caller needs a confirmed command result because macOS does not acknowledge whether a process-targeted Cmd+V was consumed.

Key options

Flag Description
[text] / --text Plain text to paste; omit payload flags to paste the current clipboard.
--file-path Copy a file or image into the clipboard, then paste.
--data-base64 + --uti Paste raw base64 payload with explicit UTI (e.g. public.rtf).
--also-text Optional plain-text companion when pasting binary.
--restore-delay <duration> Delay before restoring the previous clipboard (default 150ms; bare values are milliseconds).
Target flags --app <name>, --pid <pid>, or an exact window selector for background paste.
--foreground Focus a supplied target or intentionally send foreground/global Cmd+V.
Focus flags Foreground focus controls (--space-switch, --no-auto-focus, etc.).

Delivery modes

  • Background is the default when Peekaboo can resolve a target. Exact-window routes pin the process generation, window ID/bounds, and focused element. App/PID routes upgrade when one eligible window exists and refuse when several are eligible. Plain text is delivered directly without touching the clipboard. Binary/rich and current-clipboard requests remain receiver-unverifiable and return “may have pasted; do not retry” after cleanup.
  • Foreground (--foreground) requires a supplied target to return a confirmed exact-window focus receipt before Cmd+V. A genuinely targetless foreground call remains intentionally global. --no-auto-focus cannot be combined with a target because Peekaboo will not guess that the requested window already owns keyboard focus.
  • Without an app/PID target, paste fails before mutating the clipboard. Add --foreground only when global delivery is intentional.
  • Exact window selectors stay exact through text or Cmd+V dispatch; focus, owner, generation, or bounds drift fails before clipboard access whenever no event has begun. Exact-window remote delivery requires Bridge protocol 1.24.
  • Process-targeted text and Cmd+V delivery retain the resolved app's process-generation receipt. Plain text revalidates before every emitted character, while clipboard-backed paste uses generation-pinned hotkey delivery. A target exit or relaunch never silently retargets the reusable PID. Remote background paste requires Bridge protocol 1.22 or newer.
  • Clipboard-backed transactions are serialized across CLI, daemon, and GUI processes with a private per-user lock under ~/Library/Application Support/Peekaboo, independent of each process's temporary directory.
  • Target capability checks, cancellation checks, and the prior-clipboard snapshot must all succeed before Peekaboo writes a temporary payload. A read failure is never treated as an empty clipboard; if a write fails after partially changing the pasteboard, Peekaboo restores the exact saved state before returning the error.
  • Background binary/rich paste still mutates the system clipboard briefly; paste completes the noncancellable --restore-delay settle and restores the previous contents before releasing the transaction lock, even when delivery throws or the caller cancels.

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 63 lines · 0 tokens per session scan A ea798f6a5882

Subscribe to this mod's changes

paste is a command published in the GitHub repository openclaw/Peekaboo (5,088 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,214 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.