Install Your First Plugin
After installing LightRSI, install a plugin to add capabilities. Currently, TokenPilot is the only official plugin.
Install TokenPilot
Pick your host:
OpenClaw
bash
pnpm component:install:tokenpilot:openclawThis command:
- Updates
~/.openclaw/openclaw.json - Enables the TokenPilot plugin
- Switches
plugins.slots.contextEnginetolayered-context - Sets the default
normalmode - Attempts to restart the OpenClaw gateway
Custom paths:
bash
export LIGHTRSI_OPENCLAW_HOME="/path/to/openclaw-home"
export OPENCLAW_CONFIG_PATH="/path/to/openclaw.json"
pnpm component:install:tokenpilot:openclawCodex
bash
corepack pnpm cleaner:install:codexThis command:
- Reroutes your active Codex provider through the local TokenPilot proxy
- Writes
~/.codex/tokenpilot.json - Registers hooks in
~/.codex/hooks.json - Registers the shared
tokenpilot_memory_fault_recoverMCP server - Builds and installs the shared
lightrsiCLI and the explicit-onlylightrsi-clean,lightrsi-clean-status,lightrsi-clean-apply, andlightrsi-clean-cancelskills
Custom paths:
bash
export CODEX_CONFIG_PATH="/path/to/config.toml"
export CODEX_HOOKS_CONFIG_PATH="/path/to/hooks.json"
export TOKENPILOT_CODEX_CONFIG="/path/to/tokenpilot.json"
corepack pnpm cleaner:install:codexClaude Code
bash
corepack pnpm cleaner:install:claude-codeThis command:
- Updates
~/.claude/settings.jsonfor local gateway routing - Writes
~/.claude/tokenpilot.json - Registers the shared
tokenpilot_memory_fault_recoverMCP server - Installs a
SessionStarthook that auto-starts the gateway - Backs up existing Claude files as
.tokenpilot.bak - Builds and installs the shared
lightrsiCLI and the explicit-only Cleaner analysis, status, apply, and cancel skills
Custom paths:
bash
export CLAUDE_CODE_SETTINGS_PATH="/path/to/settings.json"
export CLAUDE_CODE_MCP_CONFIG_PATH="/path/to/.claude.json"
export TOKENPILOT_CLAUDE_CODE_CONFIG="/path/to/tokenpilot.json"
corepack pnpm cleaner:install:claude-codeVerify Installation
bash
lightrsi doctorOr check per-host:
bash
lightrsi openclaw doctor
lightrsi codex doctor
lightrsi claude-code doctor
lightrsi codex clean --help
lightrsi claude-code clean --helpLook for: plugin entry enabled, config enabled, proxy healthy: yes.
What Changed
The installer modifies these files (backups saved as .tokenpilot.bak):
| Host | Files Modified |
|---|---|
| OpenClaw | ~/.openclaw/openclaw.json |
| Codex | ~/.codex/tokenpilot.json, ~/.codex/hooks.json |
| Claude Code | ~/.claude/settings.json, ~/.claude/tokenpilot.json, ~/.claude/.claude.json |
Next
- Runtime Modes — choose your risk/aggressiveness level
- CLI Reference — all available commands
- Troubleshooting — common install issues