Deck
DocumentationThe deckclip command line

The deckclip command line

Read, write, paste and ask AI from the terminal with deckclip.

deckclip is a command-line tool that controls Deck from the terminal and from scripts.

Install and enable

deckclip comes with Deck. When Deck starts, it links deckclip into /usr/local/bin, or into ~/.local/bin if that is not possible. Open a new terminal window after the first launch.

Then turn it on in Deck:

  1. Open Settings › Deck CLI.
  2. Turn on Enable Deck CLI ("Allow the deckclip command-line tool to communicate with Deck").

The setting is off by default, and Deck must be running. The page also shows quick-start commands.

Quick start

deckclip version
deckclip health
echo "hello" | deckclip write
deckclip read

deckclip health checks that the command line can reach Deck. Run deckclip -h, or deckclip <command> --help, for the built-in help. Running deckclip alone in a terminal opens the interactive chat.

Commands

CommandWhat it does
deckclip healthChecks the connection to Deck.
deckclip write [TEXT]Adds text to your history. Reads standard input when TEXT is omitted.
deckclip readPrints the latest item's text.
deckclip paste <1-9>Pastes item 1 to 9 of the panel.
deckclip panel toggleShows or hides the panel.
deckclip ai run <PROMPT>Runs an AI prompt.
deckclip ai search <QUERY>Searches your history with AI.
deckclip ai transform <PROMPT>Transforms text with AI or a script plugin.
deckclip chatStarts an interactive AI chat in the terminal.
deckclip loginSets up the AI provider in the terminal.
deckclip mcpSets up MCP clients. See MCP.
deckclip completion <shell>Prints a shell completion script.
deckclip versionPrints the version.

write

deckclip write [TEXT] [--tag <name>] [--tag-id <id>] [--raw]
  • --tag and --tag-id give the item a tag, by name or by ID.
  • --raw skips smart rules. Without it, rules apply as for any copied item.
  • Writing fails while recording is paused.
echo "meeting notes" | deckclip write --tag work

paste

deckclip paste <1-9> [--plain] [--target <bundle-id>]

--plain pastes as plain text. --target names the app to paste into by its bundle ID.

deckclip paste 2 --plain --target com.apple.TextEdit

ai run

deckclip ai run <PROMPT> [--text <text>] [--save] [--tag-id <id>]

The input text comes from --text or standard input. --save stores the result in your history, and --tag-id tags it.

deckclip ai run "Summarize this" --text "Long text…" --save

ai search

deckclip ai search <QUERY> [--mode <mode>] [--limit <n>]

--mode is auto (default), exact, fuzzy, regex, mixed or semantic. --limit defaults to 10 and is capped at 50.

deckclip ai search "invoice number" --mode regex --limit 5

ai transform

deckclip ai transform <PROMPT> [--text <text>] [--plugin <plugin-id>]

Text comes from --text or standard input. With --plugin, a script plugin does the work. See Smart rules and script plugins.

cat draft.txt | deckclip ai transform "Translate to English"

mcp

deckclip mcp
deckclip mcp setup [--client <client>] [--write] [--path <file>] [--command <cmd>]
deckclip mcp tools
deckclip mcp doctor
deckclip mcp cleanup [--idle-hours <hours>] [--dry-run]

See MCP.

JSON output

Add --json to any command to get output for scripts.

deckclip read --json
{"ok":true,"data":{"text":"hello"}}

Messages look like {"ok":true,"message":"…"}. Errors go to standard error as {"ok":false,"error":"…"}, and the exit code is 1.

Security

deckclip talks to Deck over a local socket that only your user account can reach. Deck accepts connections only from the genuine deckclip program. When security mode is on, reading your history from the command line asks you to authenticate first.

AI commands use the provider you set up in Deck. See AI assistant.