Open files and send text to Worktray
Open files from Finder, pipe text in from a terminal, paste from the clipboard, and let Claude Code sessions open their output in Worktray.
Worktray is a comfortable place to read and edit something you found elsewhere — a file in Finder, the output of a command, or a long answer from an AI chat. This page covers every way to get it in.
Open a file from Finder (Mac)
Section titled “Open a file from Finder (Mac)”Right-click a file in Finder and choose Open With → Worktray. Worktray appears there for Markdown, plain text, code, JSON, YAML, CSV, XML, SVG, HTML, images, PDFs, and audio, plus its own formats (.task, .taskboard, .curl, .openapi, .jwt, .theme). It never makes itself the default app for common formats; you choose it. To make it the default for a type, use Finder’s Get Info → Open with → Change All….
Opening a file opens the folder it lives in as a tray, with the file selected and open — the same thing worktray <file> does:
- If the file is inside a folder you’ve already opened in Worktray (at any depth), that tray is used.
- Otherwise Worktray asks once to open the file’s folder as a tray, exactly like opening a folder.
worktray://open?path=/absolute/path/to/file.md links do the same thing, so other apps and scripts can open a file or folder in Worktray with a link. Add &view=view (or &view=edit) to pick the editor tab the file opens on.
Pipe text in from a terminal (Mac)
Section titled “Pipe text in from a terminal (Mac)”With the worktray command installed, pipe any text into worktray -:
pbpaste | worktray - # what's on the clipboardgit log --oneline -20 | worktray - log.txtcurl -s https://api.example.com/items | worktray - items.jsoncat report.md | worktray - --view report.md # open on the rendered previewWorktray writes the text to a new file in your Inbox tray (the folder ~/Worktray/Inbox, created the first time) and opens it. The optional second argument names the file; without one it gets a timestamped .md name, and a name without an extension gets .md. The extension picks the editor, so name JSON .json, CSV .csv, and so on. A name that’s already taken gets a -2 suffix instead of being overwritten. The command prints the new file’s path. Add --view to open the file on its preview, tree, or table instead of its source; see Choose the editor tab.
Paste from the clipboard (Web and Mac)
Section titled “Paste from the clipboard (Web and Mac)”Copy some text, press Cmd+K, type >, and choose New file from clipboard. Worktray adds it to the active tray as pasted.md (or pasted.json, pasted.svg, pasted.html, pasted.xml, or pasted.curl when the text is clearly one of those) and opens it. Rename it whenever you like.
In the browser, your browser may ask for permission to read the clipboard the first time.
Let Claude Code open things in Worktray
Section titled “Let Claude Code open things in Worktray”If you use Claude Code, the Worktray plugin teaches Claude sessions to open long output — plans, reports, documents, JSON — in Worktray for you instead of leaving it in the chat:
-
Install the
worktraycommand first. -
In Claude Code, run:
/plugin marketplace add AdamEisfeld/worktray-claude/plugin install worktray@worktrayWorktray’s command palette shows the same commands, ready to copy: press Cmd+K, type
>, and choose Install the Claude Code plugin.
The plugin adds one skill, worktray:open. After that, ask a Claude session to “open that in Worktray”, and it pipes the content in with worktray -, so it lands in your Inbox tray. Claude Code keeps the plugin updated (/plugin marketplace update worktray checks right away); /plugin uninstall worktray@worktray removes it. The plugin’s source is public at github.com/AdamEisfeld/worktray-claude.
Without the worktray command — on Windows, Linux, or a Mac without the desktop app — the plugin falls back to a worktray.io link for small, non-sensitive text.
On its own, the plugin opens Worktray when you ask, though Claude may offer once after writing a long document. While it works, Claude may also show you a result worth looking at, such as a page it built or a file it generated, with --background: it opens in Worktray without taking you out of the terminal, and Claude tells you what it put there. Install the command from Worktray 0.1.37 or later for this. To have Claude open certain kinds of output every time, say so in a CLAUDE.md file — ~/.claude/CLAUDE.md for every project, or the one in a project’s root for just that project. For example:
## Worktray
Worktray is installed on this machine (`worktray` command; see the `worktray:open` skill).When you produce something I'll want to read, copy, or reuse outside this chat, open itin Worktray instead of only printing it, then say in one line what you opened:
- Markdown longer than a few paragraphs (plans, reviews, write-ups)- Messages for me to paste elsewhere (Slack, email, a prompt for a new Claude session)- JSON, YAML, CSV, or other data longer than ~20 lines
Use `worktray - --view <descriptive-name>.<ext>` with the matching extension. Short answersand code edits stay in the chat as usual.Give it a size threshold like the one above, or Claude may open a window for every small snippet. Each item lands in your Inbox tray as its own named file, so it’s still there to copy after the session ends.
Send a file to the web app with a link
Section titled “Send a file to the web app with a link”The web app can create a file from a link of the form:
https://worktray.io/#new=<file name>&content=<text>Both values are percent-encoded. Opening the link asks whether to add the file to your current tray; either way the link is removed from the address bar. Everything after # stays in your browser — browsers never send it to a server — but it is kept in your browser history, so this is best for small, non-sensitive snippets. For example, from a terminal:
python3 -c 'import sys, urllib.parse, webbrowser; webbrowser.open("https://worktray.io/#new=" + urllib.parse.quote(sys.argv[1]) + "&content=" + urllib.parse.quote(sys.stdin.read()))' notes.md < notes.md