Quick Start
A path from clone to a verified running session. Choose OpenClaw, Codex, Claude Code, DeepSeek Harness, pi, or OpenCode at each host-specific step below.
1. Prepare the Repository
git clone https://github.com/zjunlp/LightRSI.git
cd LightRSI
corepack enable
pnpm installThe host-specific commands below build and install the selected integration. DeepSeek Harness also requires a working Harness checkout and Node.js matching the adapter requirements.
2. Pick Your Host
Choose your agent host and run the matching install command:
pnpm component:install:tokenpilot:openclawcorepack pnpm cleaner:install:codexcorepack pnpm cleaner:install:claude-code# From the LightRSI repository
corepack pnpm --filter @lightrsi/deepseek-harness-adapter build
corepack pnpm --filter @lightrsi/deepseek-harness-adapter pack --pack-destination ./artifacts
# Then, from your DeepSeek Harness checkout
node --import tsx/esm apps/cli/src/bin.ts plugin --profile web add /absolute/path/to/lightrsi-deepseek-harness-adapter-<version>.tgznpm --prefix components/adapters/pi run build
npm --prefix components/adapters/pi run install:pinpm --prefix components/adapters/opencode run build
npm --prefix components/adapters/opencode run install:opencodeOpenClaw, Codex, Claude Code, pi, and OpenCode installers configure their host integrations. See Install Your First Plugin for the changes each installer makes.
For OpenClaw, the release installer builds one archive containing the plugin and the shared lightrsi CLI, installs both, and attempts to restart the gateway. On Linux and WSL the command is installed in ~/.local/bin by default; ensure that directory is on your PATH:
export PATH="$HOME/.local/bin:$PATH"If you set LIGHTRSI_BIN_DIR, add that directory instead. The installer also supports the Windows launchers used by the final package. Codex and Claude Code's cleaner:install:* commands build and install the shared CLI through their own host installers.
DeepSeek Harness installs the tokenpilot-dsh Cordis plugin into the selected profile. Replace the archive path with the generated .tgz and web with your profile. The plugin is disabled by default: supply a persistent stateDir and estimator and eviction settings, then enable it as described in Configure and Enable.
3. Start a Session
Open or restart your host, then start a new session.
Use a lightrsi/<model> model like lightrsi/gpt-5.4-mini
Run: /lightrsi statusStart Codex normally, approve TokenPilot hooks if prompted
Open a new session so SessionStart can start the proxyStart Claude Code normally
Open a new session so SessionStart can start the gatewayLoad the profile containing the configured and enabled tokenpilot-dsh plugin
Open a Harness session
Run: /tokenpilot-statusStart pi, or run /reload in a running session, so the extension loadsRestart OpenCode so the plugin and the MCP server load4. Verify It Works
Use the verification command for your host:
/lightrsi doctor
# Or outside OpenClaw:
lightrsi openclaw doctorlightrsi codex doctorlightrsi claude-code doctor/tokenpilot-statuslightrsi pi doctorlightrsi opencode doctorFor OpenClaw, Codex, Claude Code, pi, and OpenCode, check the relevant status fields:
plugin entry enabledconfig enabledmode normalstabilizer enabledreduction enabled
Only OpenClaw, Codex, and Claude Code also report proxy healthy: yes; pi and OpenCode run no proxy or gateway.
For DeepSeek Harness, inspect estimator activity, scheduling, application, and deferrals. The command is read-only and does not create a model turn. See status field meanings; an enabled plugin does not imply an eviction has already occurred.
5. Inspect Runtime Results
After a few turns, inspect your host's report or status:
/lightrsi reportlightrsi codex reportlightrsi claude-code report/tokenpilot-statuslightrsi pi reportlightrsi opencode reportFor the shared CLI reports, token and cost metrics replace "No TokenPilot session stats yet" once session statistics are available. DeepSeek Harness exposes estimator, scheduled, applied, and deferred state through its native status command; it does not use lightrsi report.
6. Visual Inspector
For OpenClaw, Codex, Claude Code, pi, and OpenCode, open the built-in visual inspector:
lightrsi visualThis opens a browser view showing stable-prefix, reduction, and eviction snapshots.
DeepSeek Harness uses /tokenpilot-status for the documented session status workflow; this shared Visual command does not apply to it.
What's Next
- Context Cleaner — review and clean eligible task context with explicit approval
- Install Your First Plugin — detailed install walkthrough
- Runtime Modes — choose conservative, normal, or aggressive
- CLI Reference — all commands and flags