返回资讯中心
外部精选
软件工程
#开发者实时流

TokenDeck – Coding Agents Usage Management Consol

Token Deck is the free desktop app for the deck in the After Tokens box: a Stream Dock N3 with six screen keys, three metal buttons and three knobs. It puts your Claude Code, Codex and OpenCode sessions on the keys and …

Hacker News 最新gemanor2026/11/10 · 7 天前30 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Token Deck is the free desktop app for the deck in the After Tokens box: a Stream Dock N3 with six screen keys, three metal buttons and three knobs. It puts your Claude Code, Codex and OpenCode sessions on the keys and takes you to the one that needs you. It also sets the model, effort and permission your next session starts with, and shows how much of your 5-hour and weekly limits you've used.

It runs on macOS and Windows, lives in the menu bar (the system tray on Windows) and talks to the deck over USB. There's no account and no telemetry.

Download: usage.stigg.io (io.stigg.io/usage, the address printed on the box and the deck, leads there) · All releases

macOS

macOS 12 or later, on Apple silicon or Intel. Paste this into Terminal:

/bin/bash -c "$(curl -fsSL https://usage.stigg.io/install.sh)"

The script downloads the build for your Mac from the latest release, checks its SHA-256, quits Token Deck if it's running, installs it in /Applications (or ~/Applications when /Applications isn't writable) and opens it. It doesn't use sudo.

Token Deck isn't notarized by Apple yet. The install command works anyway, because curl doesn't mark the download as quarantined. The disk images (Apple silicon, Intel) are quarantined, so macOS refuses to open the app or says it's damaged. After you drag it to Applications, run this and open it again:

xattr -d com.apple.quarantine "/Applications/Token Deck.app"

Windows

Windows 10 or 11, 64-bit. Download and run TokenDeck-win-x64.exe. The installer isn't code-signed yet, so SmartScreen says "Windows protected your PC": choose More info, then Run anyway.

If the deck maker's StreamDock or VSD Craft app is running, quit it before you plug in the deck. Only one program can use the deck at a time.

The first time Token Deck starts, it offers three steps. You can skip any of them and do it later in the app's window, which opens from the menu bar or tray icon: Claude Code and the macOS permissions are on its This Mac page, and starting at login is on its About page.

The three metal buttons under the keys pick the mode, and the deck remembers the last one.

Hold the middle button to open your own modes.

Turning a knob shows a short message across the top row of keys for 5 seconds, like SONNET NEXT SESSION. Key presses are ignored while a message is showing. NOT AVAILABLE means the agent can't do what you asked; NONE INSTALLED means none of Claude Code, Codex or OpenCode is installed.

Press a key to go to that agent's latest session or window, or to open it if it isn't running. A dim key means the app isn't installed. Claude Code opens in the Claude desktop app when you have it, and in Terminal otherwise. Amp's key opens VS Code, and Devin's opens app.devin.ai.

The left and right knobs act on the last of Claude Code, Codex or OpenCode whose key or session you pressed, or the first one installed.

Each key is one recent session, newest first. The dot shows what it's doing, and the ring shows how full its context window is. Only Claude Code reports context, so Codex and OpenCode sessions get a dashed ring.

Press a key to jump to that session's window, and Models & Usage then shows that session's agent. Token Deck finds the exact tab in Terminal, iTerm2 and Ghostty, the right window in VS Code and Cursor, or the session in the Claude desktop app; for other terminals it brings the app forward. For Codex and OpenCode it looks for the terminal running the agent in that session's folder, and a Codex session without one opens in the Codex app. A finished Claude Code session that isn't running anymore reopens in Terminal, in its own folder, with claude --resume. When there's no window to go to, the deck shows FAILED. On Windows, Token Deck brings Windows Terminal forward, without picking the tab.

OpenCode sessions show up while opencode serve is running (Token Deck looks at http://127.0.0.1:4096 and uses OPENCODE_SERVER_PASSWORD if you set one). OpenCode 2.x is found through its own service file.

The deck never approves a tool call. Pressing a session that needs approval takes you to its window, and you decide there.

Models & Usage shows one agent at a time; the left knob switches between Claude Code, Codex and OpenCode. The first key shows how much of that agent's 5-hour (5H) and weekly (7D) limits you've used. Press it to see the exact numbers and reset times in the app's window. The other keys are up to five of its models, with the current one in lime. Press a model and your next session starts on it.

Turning the right knob only previews a permission level; nothing changes until you press it (a press before any turn just shows TURN FIRST), and FULL waits until you confirm it in a dialog on the computer. Model, effort and permission changes go into the agent's own settings file and apply from your next session, and the deck confirms each one, like SONNET NEXT SESSION or HIGH EFFORT. Sessions that are already running keep what they started with.

The deck shows the last reading it got for up to 24 hours, then --, and drops a window as soon as its reset time passes. On Windows, Claude Code's status line isn't installed yet, so its usage and context don't show there.

The models come from each agent: Claude Code's model list (Opus, Sonnet, Haiku and Fable until it has one), the models Codex offers you, and OpenCode's configured model followed by its providers' models. Reorder them on the app's Models page.

Claude Code's effort levels are low, medium, high and xhigh. Codex offers whichever levels the selected model supports. Token Deck writes Claude Code's as modelSettings.<model>.effortLevel, or as effortLevel before Claude Code 2.1.251.

The app's window has a simulator: the deck drawn at the bottom shows the same key images and behaves like the real one. Click a key, or use the keyboard:

A mode is a JSON file in ~/.tokendeck/modes/. Hold the middle button and the keys list your modes, up to six; press one to open it. Any metal button takes you back. With no mode files, holding the middle button just opens Sessions. Token Deck reloads a file when you save it, even while that mode is open, and the app's Deck page lists any problems in your files. If you save a mistake while the mode is open, the keys stay as they were and the deck shows MODE FILE ERROR until you fix it.

{ "name": "Deploy", "tiles": [ { "label": "BUILD", "icon": "/icons/hammer.svg", "action": { "type": "shell", "command": "npm run build", "cwd": "/dev/app" } }, { "label": "LOGS", "action": { "type": "url", "url": "https://grafana.example.com/d/abc" } }, { "label": "EDITOR", "action": { "type": "open", "app": "Cursor" } }, { "label": "PALETTE", "action": { "type": "keys", "keys": "cmd+shift+p" } }, { "label": "AGENTS", "action": { "type": "mode", "mode": "agents" } }, null ], "knobs": { "main": { "cw": { "type": "keys", "keys": "cmd+=" }, "ccw": { "type": "keys", "keys": "cmd+-" }, "click": { "type": "shell", "command": "say done" } }, "left": null, "right": null } }

tiles holds up to six keys, left to right and top to bottom; null leaves a key empty, and pressing an empty key or turning a knob with no action shows FAILED. A label is shown in capitals, one word per line, two lines at most. icon is an optional PNG or SVG, drawn at 28 pixels. knobs maps main (the big knob), left and right to an action for cw (clockwise), ccw (counter-clockwise) and click.

Token Deck changes three files that belong to other apps: Claude Code's ~/.claude/settings.json, Codex's ~/.codex/config.toml and OpenCode's ~/.config/opencode/opencode.json. It backs each one up before its first change, and every change replaces the whole file in one step, so the agent never reads half a file. A file that's a symlink, as in a dotfiles repository, stays a symlink. Token Deck leaves alone a file it can't read, and a JSON file it can't parse.

From launch, Token Deck reads claude agents --json --all every two seconds, plus the session files under ~/.claude/sessions and ~/.claude/projects, to list your sessions, and the list of running processes to see which model each session runs. It never reads Claude Code's credentials; claude auth status --json tells it whether you're signed in.

When you connect Claude Code (in the first-run setup, or on the app's This Mac page), Token Deck:

Stop watching on the This Mac page takes Token Deck's hooks out and puts your previous status line back, and leaves everything else in settings.json as it is now. The backup from your first connect stays next to it if you ever want to go further back.

Token Deck never writes a settings.json it can't parse: if the file isn't valid JSON, it leaves it alone and tells you.

When you turn a knob, Token Deck writes model, the effort setting, permissions.defaultMode or ultracode in settings.json, keeping everything else in the file.

Token Deck runs codex app-server in the background to read your sessions, models and usage limits. It never answers an approval request; you approve in Codex.

A knob writes the top-level model, model_reasoning_effort, sandbox_mode and approval_policy lines in ~/.codex/config.toml. It edits those lines in place and adds missing ones at the top, so other comments and settings stay as they are, and it never touches notify. Before the first edit it copies the file to ~/.codex/config.toml.tokendeck-backup; to undo, copy that file back.

Token Deck reads sessions and the available models from the OpenCode server. A knob writes model in ~/.config/opencode/opencode.json, and on 1.x sets edit and the default bash rule in its permission map, keeping your per-command rules. Before the first change it copies the file to opencode.json.tokendeck-backup. If the file has comments, which Token Deck can't keep, the deck says NOT AVAILABLE and the file stays as it is. If you set OPENCODE_SERVER_PASSWORD in your shell profile, Token Deck reads it from your login shell.

Their keys only open or focus the app. Token Deck doesn't read or change anything of theirs.

To bring a window to the front, macOS asks once for Automation for each app Token Deck controls (Terminal, iTerm2, System Events and so on), and once for Accessibility under System Settings → Privacy & Security. Custom-mode keystrokes use the same permissions. Updates on macOS may ask again, because Token Deck isn't signed.

Hooks reach the app through a server on 127.0.0.1 only, on a random port, behind a random per-install token in the path. Its address is in ~/.tokendeck/url while the app runs.

Token Deck only goes online for updates: it checks this repository's GitHub releases when it starts, Windows downloads a new version in the background, and Update now on a Mac runs the install script from usage.stigg.io.

There's no telemetry. The log stays on your computer, in ~/.tokendeck/log/tokendeck.log, rotated at 5 MB.

Token Deck's own files are in ~/.tokendeck: settings.json (the app's own settings), log/, bin/, modes/, url and the status line files above. The backups sit next to the files they back up, and Electron keeps a cache in ~/Library/Application Support/Token Deck (%APPDATA%\Token Deck on Windows).

The deck only shows the welcome screen. Check that Token Deck is running: look for its icon in the menu bar or the system tray. Then unplug the deck and plug it back in. The app's Deck page shows the connection state.

"Quit the StreamDock or VSD Craft app to use Token Deck." Another program has the deck. Quit it and replug the deck.

"Deck not responding. Unplug it and plug it back in." The deck stopped answering. Replugging resets it.

A key doesn't bring the window forward. Give Token Deck Accessibility in System Settings → Privacy & Security, and allow the Automation prompts. The app's This Mac page says when Accessibility is missing.

The usage key shows --. Claude Code only reports limits on Pro and Max plans, after a session's first reply, and only through the status line, so connect Claude Code first. Codex needs a ChatGPT sign-in. O

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →