A Windows launcher for Claude Code that indexes your project, installs the right tooling, and keeps a session alive across five different backends when one runs dry.
Point TokenOptimizer at a project and it:
autoskills is updated/uninstalled as a legacy dependency when present).claude-mem, headroom, and a few other companion plugins.FreeToken (local MoE) provider): the desktop engine from flashml.ai speaks Anthropic's API natively on 127.0.0.1:1919, so Claude Code can run against a local Qwen3.6-35B-A3B / GLM-5.2-class model with no proxy or translation layer. See freetoken_local/README.md for the companion Python handler and live self-test.Hermes Agent provider) as an encompassing peer layer: launches real hermes chat sessions in your project, and scripts/Setup-HermesIntegration.ps1 points Hermes' own custom-endpoint config at TokenOptimizer-managed local engines - so Hermes sessions ride the same local MoE engine through one ecosystem. See docs/ARCHITECTURE.md for the full design.Everything above is one Avalonia desktop app (app/). A companion VS Code extension gives you the same launcher and a live dashboard from inside the editor.
Download the latest TokenOptimizer.msi from Releases and run it. No PowerShell, no manual dependency installs - the installer bundles the app itself and the VS Code extension, with Start Menu shortcuts from the WiX-built MSI.
Prerequisites:
dotnet buildcd app
dotnet build TokenOptimizer.slnx
dotnet run --project src\TokenOptimizer.App
Run the test suite:
dotnet test TokenOptimizer.slnx
To build the installable TokenOptimizer.msi yourself (what CI/Releases produce):
# one-time setup
dotnet tool install --global wix --version 5.0.2
cd app\installer
wix extension add WixToolset.UI.wixext/5.0.2 WixToolset.Util.wixext/5.0.2
# build the MSI
.\build-installer.ps1
WiX is pinned to 5.0.2 on purpose - v6+ requires a paid-tier EULA for some usage, and 5.0.2 predates that and is free. The output lands at app\installer\TokenOptimizer.msi.
| Piece | What it is | Where |
|---|---|---|
| TokenOptimizer.App | The product itself - an Avalonia desktop app with provider adapters for Claude Code, Antigravity, Groq, OpenCode Go, Codex/Cursor handoff, Unsloth local models, FreeToken local MoE, and Hermes Agent, all behind one fallback-chain resolver. | app/src/TokenOptimizer.App |
| TokenOptimizer.Sandbox | The master layer - preflight gate, opensandbox-server lifecycle, sandbox creation/streaming, image catalog baking in companion tools incl. graft. | app/src/TokenOptimizer.Sandbox |
| VS Code extension | Sidebar/chat-participant that launches TokenOptimizer.App.exe. | vscode-extension/ |
Automatic, no setup beyond saving credentials once:
Manual only - reachable by picking them directly, since they're separate products rather than swappable backends:
AGENTS.md so the receiving tool sees it on openIssues and pull requests are welcome. See CONTRIBUTING.md for the development setup, test commands, and PR checklist, and CODE_OF_CONDUCT.md for community expectations.
MIT - see LICENSE. A rough example EULA for a compiled-binary distribution (not required for the MIT-licensed source itself) lives at docs/EULA-example.md.
LLM-TokenOptimizer.ps1 is the original self-bootstrapping launcher that the C# app replaced in v6.0. It still works and is kept for reference, but new users should use the MSI/app path above instead. Full behavior, flags, and troubleshooting for it are documented in AUDIT.md, which covers v5.0 through v5.5 and predates the v6.0 app - treat it as project history, not current-state documentation.
Before first use:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
.\LLM-TokenOptimizer.ps1
Quick reference for the flags most people actually reach for:
| Flag | Effect |
|---|---|
-ProjectPath "C:\path" | Opens a single project directly (bypasses the multi-window picker). |
-Model sonnet | -Model opus | Forces this one session onto Sonnet 5 or Opus 5. |
-IsolateClaudeConfig | Gives this project its own CLAUDE_CONFIG_DIR, separate from your normal ~/.claude. |
-SetupProxy | Interactive credential setup for the Antigravity/Codex/Cursor fallback backends. |
-TransferTo Codex | -TransferTo Cursor | Hands off the current session to Codex or Cursor with context bundled in. |
For the full flag list, run Get-Help .\LLM-TokenOptimizer.ps1 -Full, or see AUDIT.md for historical documentation (predates v6.0, may not reflect every current flag).
C#
64.8%
PowerShell
28.1%
TypeScript
3.6%
Python
3.2%
A Windows launcher for Claude Code that indexes your project, installs the right tooling, and keeps a session alive across five different backends when one runs dry.
Point TokenOptimizer at a project and it:
autoskills is updated/uninstalled as a legacy dependency when present).claude-mem, headroom, and a few other companion plugins.FreeToken (local MoE) provider): the desktop engine from flashml.ai speaks Anthropic's API natively on 127.0.0.1:1919, so Claude Code can run against a local Qwen3.6-35B-A3B / GLM-5.2-class model with no proxy or translation layer. See freetoken_local/README.md for the companion Python handler and live self-test.Hermes Agent provider) as an encompassing peer layer: launches real hermes chat sessions in your project, and scripts/Setup-HermesIntegration.ps1 points Hermes' own custom-endpoint config at TokenOptimizer-managed local engines - so Hermes sessions ride the same local MoE engine through one ecosystem. See docs/ARCHITECTURE.md for the full design.Everything above is one Avalonia desktop app (app/). A companion VS Code extension gives you the same launcher and a live dashboard from inside the editor.
Download the latest TokenOptimizer.msi from Releases and run it. No PowerShell, no manual dependency installs - the installer bundles the app itself and the VS Code extension, with Start Menu shortcuts from the WiX-built MSI.
Prerequisites:
dotnet buildcd app
dotnet build TokenOptimizer.slnx
dotnet run --project src\TokenOptimizer.App
Run the test suite:
dotnet test TokenOptimizer.slnx
To build the installable TokenOptimizer.msi yourself (what CI/Releases produce):
# one-time setup
dotnet tool install --global wix --version 5.0.2
cd app\installer
wix extension add WixToolset.UI.wixext/5.0.2 WixToolset.Util.wixext/5.0.2
# build the MSI
.\build-installer.ps1
WiX is pinned to 5.0.2 on purpose - v6+ requires a paid-tier EULA for some usage, and 5.0.2 predates that and is free. The output lands at app\installer\TokenOptimizer.msi.
| Piece | What it is | Where |
|---|---|---|
| TokenOptimizer.App | The product itself - an Avalonia desktop app with provider adapters for Claude Code, Antigravity, Groq, OpenCode Go, Codex/Cursor handoff, Unsloth local models, FreeToken local MoE, and Hermes Agent, all behind one fallback-chain resolver. | app/src/TokenOptimizer.App |
| TokenOptimizer.Sandbox | The master layer - preflight gate, opensandbox-server lifecycle, sandbox creation/streaming, image catalog baking in companion tools incl. graft. | app/src/TokenOptimizer.Sandbox |
| VS Code extension | Sidebar/chat-participant that launches TokenOptimizer.App.exe. | vscode-extension/ |
Automatic, no setup beyond saving credentials once:
Manual only - reachable by picking them directly, since they're separate products rather than swappable backends:
AGENTS.md so the receiving tool sees it on openIssues and pull requests are welcome. See CONTRIBUTING.md for the development setup, test commands, and PR checklist, and CODE_OF_CONDUCT.md for community expectations.
MIT - see LICENSE. A rough example EULA for a compiled-binary distribution (not required for the MIT-licensed source itself) lives at docs/EULA-example.md.
LLM-TokenOptimizer.ps1 is the original self-bootstrapping launcher that the C# app replaced in v6.0. It still works and is kept for reference, but new users should use the MSI/app path above instead. Full behavior, flags, and troubleshooting for it are documented in AUDIT.md, which covers v5.0 through v5.5 and predates the v6.0 app - treat it as project history, not current-state documentation.
Before first use:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
.\LLM-TokenOptimizer.ps1
Quick reference for the flags most people actually reach for:
| Flag | Effect |
|---|---|
-ProjectPath "C:\path" | Opens a single project directly (bypasses the multi-window picker). |
-Model sonnet | -Model opus | Forces this one session onto Sonnet 5 or Opus 5. |
-IsolateClaudeConfig | Gives this project its own CLAUDE_CONFIG_DIR, separate from your normal ~/.claude. |
-SetupProxy | Interactive credential setup for the Antigravity/Codex/Cursor fallback backends. |
-TransferTo Codex | -TransferTo Cursor | Hands off the current session to Codex or Cursor with context bundled in. |
For the full flag list, run Get-Help .\LLM-TokenOptimizer.ps1 -Full, or see AUDIT.md for historical documentation (predates v6.0, may not reflect every current flag).
C#
64.8%
PowerShell
28.1%
TypeScript
3.6%
Python
3.2%