clipboard

clipboard is a command for coding agents from openclaw/Peekaboo. It costs 0 tokens per session (763 once invoked), scanned A, original, MIT.

A macOS clipboard tool for reading, writing, clearing, and temporarily saving clipboard contents. It supports text, files, images, and raw data.

In plain words
What is it for?
Use it to copy text or files, retrieve clipboard data, verify changes, clear the clipboard, or save and restore clipboard states.
Why use it?
It lets automated tasks work with copied content without losing what was already on the clipboard. Saved slots can restore earlier clipboard contents.

Command

About the project

Peekaboo is a macOS command-line tool and menu-bar app that captures screens, inspects accessibility information, and controls native user interfaces. AI agents and MCP clients use it to observe applications and carry out interactions on a Mac.

openclaw/Peekaboo · 5,105 stars · on GitHub

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/clipboard
Clone the repo
git clone --depth 1 https://github.com/openclaw/Peekaboo

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for clipboard

README.md
[![agentmods](https://agentmods.dev/badge/commands/openclaw/peekaboo/clipboard.svg)](https://agentmods.dev/commands/openclaw/peekaboo/clipboard)
Your own site
<a href="https://agentmods.dev/commands/openclaw/peekaboo/clipboard"><img src="https://agentmods.dev/badge/commands/openclaw/peekaboo/clipboard.svg" alt="Measured on agentmods" height="20"></a>
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 763 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.00763
Opus 5 $0.00000 $0.00381
Sonnet 5 $0.00000 $0.00153
Haiku 4.5 $0.00000 $0.00076

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

Security

Grade A, and why

clipboard 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 5d 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/clipboard.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 clipboard

Work with the macOS pasteboard. Supports text, files/images, raw base64 payloads, and save/restore slots to avoid clobbering the user's clipboard.

Subcommands

Subcommand Description
get Read the clipboard. Use --prefer <uti> to bias type selection and `--output <path
set Write text (--text), file/image (--file-path), or base64 + --uti. Optional --also-text sets a plain-text companion. Use --verify to read back.
clear Empty the clipboard.
save / restore Snapshot and restore clipboard contents. Default slot is "0"; use --slot to name slots.

Key options

Flag Description
--text Plain text to set.
--file-path File or image to copy (UTI inferred from extension).
--data-base64 + --uti Raw payload + explicit UTI.
--prefer <uti> Preferred UTI when reading.
`--output <path ->`
--slot <name> Save/restore slot (default 0).
--also-text <string> Add a text representation when setting binary data.
--allow-large Permit payloads over 10 MB (guard is 10 MB by default).
--verify Read back clipboard after set and validate contents.

Examples

# Copy text
peekaboo clipboard set --text "hello world"

# Copy text and verify readback
peekaboo clipboard set --text "hello world" --verify

# Read clipboard and save binary to a file
peekaboo clipboard get --output /tmp/clip.bin

# Save, clear, then restore the user's clipboard
peekaboo clipboard save --slot original
peekaboo clipboard clear
peekaboo clipboard restore --slot original

Notes

  • Binary reads without --output return a summary; use --output - to pipe data.
  • File paths for --file-path and --output accept ~/....
  • Slot saves are stored in a dedicated named pasteboard so they work across separate peekaboo clipboard invocations.
  • restore removes the saved slot after applying it to avoid leaving clipboard snapshots around indefinitely.
  • Size guard: writes larger than 10 MB require --allow-large; the guard counts all representations plus any --also-text companion text.
  • --text writes both public.plain-text and .string (public.utf8-plain-text) for compatibility.
  • --verify reads back each representation written and compares payloads (text is normalized for line endings).

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. 5d ago First seen · 63 lines · 0 tokens per session scan A 17408d496d96

Subscribe to this mod's changes

clipboard is a command published in the GitHub repository openclaw/Peekaboo (5,105 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 763 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.