Skip to content

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.

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.

PlatformSurfaceRecommended commandInstall page
Claude CodeCLI, all OS/plugin marketplace add alexgreensh/token-optimizerClaude Code (CLI)
Claude CodeVS Code, Cursor, Windsurfcode --install-extension token-optimizer-statusline-<version>.vsixClaude Code (VS Code)
CodexCLIcodex plugin marketplace add alexgreensh/token-optimizerCodex (CLI)
CodexDesktopSame adapter as CLI, no separate installCodex (Desktop)
GitHub CopilotCLI, betabash install.sh --copilotCopilot (CLI)
GitHub CopilotVS Code, betaSame adapter, plus one manual settings stepCopilot (VS Code)
OpenCodepluginopencode plugin token-optimizer-opencodeOpenCode
OpenClawpluginopenclaw plugins install github:alexgreensh/token-optimizerOpenClaw
Hermesplugin, betatoken-optimizer/install.sh --hermesHermes
  • 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.

Each platform serves its dashboard on its own port, so several can run at once without conflict.

PlatformPortURL
Claude Code (CLI and VS Code)24842http://localhost:24842/token-optimizer
Codex (CLI and Desktop)24843http://localhost:24843/token-optimizer
Hermes24844http://localhost:24844
Copilot24845http://localhost:24845/token-optimizer (verify)

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.