TokenPilot Installation
TokenPilot is installed as part of installing your first plugin. This page covers TokenPilot-specific details.
Prerequisites
Before installing TokenPilot, complete Install LightMem2.
Install Commands
bash
pnpm component:install:tokenpilot:openclawbash
npm --prefix components/adapters/codex run build
npm --prefix components/adapters/codex run install:codexbash
npm --prefix components/adapters/claude-code run build
npm --prefix components/adapters/claude-code run install:claude-codeWhat the Installer Does
- Builds the adapter for your host
- Updates host configuration files with TokenPilot settings
- Enables the plugin (sets
enabled: true) - Sets default mode to
normal - Registers hooks/MCP/proxy needed for runtime operation
- Creates backups of modified files as
.tokenpilot.bak
Verify Installation
Run the doctor command for your host:
bash
lightmem2 openclaw doctor
lightmem2 codex doctor
lightmem2 claude-code doctorAll three should report:
plugin entry enabledconfig enabledmode normalstabilizer enabledreduction enabled
For Codex and Claude Code, also check:
proxy healthy: yes
Install with Custom Paths
If your host files are not in the default locations, set environment variables before running the install command. See Install Your First Plugin for the full list.
Failed Install?
Check Troubleshooting for common install problems. If install fails, your original config files are safe — the installer backs up everything before making changes.
Quick recovery
bash
# Restore from backups
cp ~/.openclaw/openclaw.json.tokenpilot.bak ~/.openclaw/openclaw.json
cp ~/.claude/settings.json.tokenpilot.bak ~/.claude/settings.json
# etc.Next
- Configuration — tune TokenPilot settings
- Quick Start — start using TokenPilot