Skip to content

berwickgeek/ten-four

Repository files navigation

Ten Four

"10-4, copy that." A shelf of clean, copyable snippets, pushed from your terminal or from Claude Code, browsed and copied from Raycast.

When a tool prints something you want to copy (a URL, an API key, a command, a code block), copying it straight out of the terminal gives you mangled line breaks and stray indentation, because you're selecting reflowed text off the character grid. Ten Four fixes the root cause: snippets travel as data, never as rendered terminal text. You copy them out of Raycast with the exact bytes intended, with no wrapping and no leading spaces.

Add Ten Four to Raycast

The button above works once the extension is approved on the Raycast Store. Until then, install from source (below).

Demo

Claude Code answers a question and pushes the SQL query onto the shelf on its own. You grab it from Raycast and paste it, clean, into your SQL console.

Ten Four in action: Claude Code pushes a SQL query to the shelf, then it is copied from Raycast and pasted cleanly into a SQL console

How it works

your terminal / Claude Code  ──tenfour──▶  ~/.ten-four.json  ──▶  Raycast "Ten Four"
        (writer)                            (the shelf)              (reader)
  • tenfour: a tiny, dependency-free Node CLI that appends a snippet to the shelf file.
  • Ten Four (Raycast extension): a searchable list of your snippets. Hit your Raycast hotkey, type a letter or two, press to copy (or to paste into the front app).

Install

Option A: Raycast Store (one click, once approved)

Click Add to Raycast above, or search "Ten Four" in the Raycast Store. Then run the Install Ten Four CLI command to add the tenfour writer.

Option B: From source (works today)

Requires Node.js and the Raycast app.

git clone https://github.com/berwickgeek/ten-four.git
cd ten-four
npm ci
npm run dev

npm run dev builds the extension and registers it in Raycast immediately. It stays installed even after you stop the dev server (Raycast keeps its own compiled copy), so you only need to run this once. You can then close the terminal.

Then install the CLI either way:

  • In Raycast, open Install Ten Four CLI and click Install CLI, or
  • From the repo: ./install.sh (symlinks assets/tenfour into your PATH).

Usage

tenfour "https://my-app.up.railway.app"          # label = first line
tenfour --label "API key" "sk-live-…"            # explicit label
printf 'def hi():\n    return 1\n' | tenfour -l "snippet" -   # multiline via stdin
tenfour list                                     # print the shelf
tenfour clear                                    # empty the shelf

Then summon Raycast → Ten Four Shelf → copy.

Use with Claude Code

Add this to your CLAUDE.md so Claude pushes copyable snippets automatically:

When you output a snippet I'm likely to want to copy (a URL, token, command,
path, or code block), also run:
  tenfour --label "<short label>" "<the exact text>"
so it lands on my Ten Four shelf with clean formatting.

Configuration

  • Shelf location: ~/.ten-four.json by default. Override with the TENFOUR_FILE environment variable (set it for both the CLI and Raycast).
  • The shelf keeps the most recent 200 snippets; pinned snippets are never trimmed.

Notes

  • The CLI is Node.js (zero dependencies) so it can ship as a single file inside the extension. It requires node on your PATH. A future Go rewrite would allow a dependency-free Homebrew bottle.

License

MIT

About

10-4, copy that. A shelf of clean, copyable snippets pushed from your terminal or Claude Code, browsed and copied from Raycast.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors