Choosing your install
Find your platform and surface in the matrix below, then open the matching install page. Each page carries the prerequisites, the exact commands, the verify step, and the uninstall path for that one surface.
The one rule
Section titled “The one rule”Pick a single install method per platform. Never combine the plugin install and the script install on the same machine.
On Claude Code the plugin lives in ~/.claude/plugins/marketplaces/alexgreensh-token-optimizer and the script install lives in ~/.claude/token-optimizer/. Running both produces two copies of the hooks, doubled session writes, and a status line that fights itself. Choose the plugin (every OS) or the script (macOS and Linux only), not both.
Platform and surface matrix
Section titled “Platform and surface matrix”| Platform | Surface | Recommended command | Install page |
|---|---|---|---|
| Claude Code | CLI, all OS | /plugin marketplace add alexgreensh/token-optimizer | Claude Code (CLI) |
| Claude Code | VS Code, Cursor, Windsurf | code --install-extension token-optimizer-statusline-<version>.vsix | Claude Code (VS Code) |
| Codex | CLI | codex plugin marketplace add alexgreensh/token-optimizer | Codex (CLI) |
| Codex | Desktop | Same adapter as CLI, no separate install | Codex (Desktop) |
| GitHub Copilot | CLI, beta | bash install.sh --copilot | Copilot (CLI) |
| GitHub Copilot | VS Code, beta | Same adapter, plus one manual settings step | Copilot (VS Code) |
| OpenCode | plugin | opencode plugin token-optimizer-opencode | OpenCode |
| OpenClaw | plugin | openclaw plugins install github:alexgreensh/token-optimizer | OpenClaw |
| Hermes | plugin, beta | token-optimizer/install.sh --hermes | Hermes |
Which surface do I have
Section titled “Which surface do I have”- Claude Code in a terminal: use Claude Code (CLI). The plugin install runs the engine and the hooks.
- Claude Code inside VS Code, Cursor, or Windsurf: install the CLI plugin first, then add the VS Code extension for the status bar. The extension surfaces what the plugin writes; it is not a standalone install.
- Codex Desktop: install the Codex CLI hooks. Desktop loads the same
~/.codex/hooks.json, so nothing extra installs. See Codex (Desktop) for what differs. - Copilot in VS Code: run the Copilot CLI install, then follow the one manual debug-log step on the Copilot (VS Code) page to turn on per-request credit costs.
Dashboard ports by platform
Section titled “Dashboard ports by platform”Each platform serves its dashboard on its own port, so several can run at once without conflict.
| Platform | Port | URL |
|---|---|---|
| Claude Code (CLI and VS Code) | 24842 | http://localhost:24842/token-optimizer |
| Codex (CLI and Desktop) | 24843 | http://localhost:24843/token-optimizer |
| Hermes | 24844 | http://localhost:24844 |
| Copilot | 24845 | http://localhost:24845/token-optimizer (verify) |
Zero dependencies
Section titled “Zero dependencies”Every Python adapter (Claude Code, Codex, Hermes, Copilot) is pure standard library. No pip install, no telemetry. The TypeScript plugins (OpenCode, OpenClaw) add nothing beyond their host runtime. Minimum Python is 3.9 for Claude Code and Codex, 3.x for Hermes and Copilot.