Skip to content

Configuration Integration

Config Files by Host

From source:

HostConfig LocationPurpose
OpenClawPlugin entry in ~/.openclaw/openclaw.jsonTokenPilot registered as a plugin within OpenClaw configuration
Codex CLI~/.codex/tokenpilot.json (runtime config) + ~/.codex/hooks.json (hook registration)tokenpilot.json stores provider config and runtime settings. hooks.json registers hooks (SessionStart, PreToolUse, PostToolUse, Stop). Host's config.toml modified to reroute provider base_url to local proxy
Claude Code~/.claude/tokenpilot.json (runtime config) + ~/.claude/settings.json (gateway routing) + ~/.claude/.claude.json (MCP registration)tokenpilot.json stores runtime config. settings.json updated for gateway routing. .claude.json registers tokenpilot_memory_fault_recover MCP server

Environment Variables

From source:

AdapterEnvironment VariableDefault Path
OpenClawLIGHTMEM2_OPENCLAW_HOME~/.openclaw/
OpenClawOPENCLAW_CONFIG_PATH~/.openclaw/openclaw.json
CodexCODEX_CONFIG_PATH~/.codex/config.toml
CodexCODEX_HOOKS_CONFIG_PATH~/.codex/hooks.json
CodexTOKENPILOT_CODEX_CONFIG~/.codex/tokenpilot.json
Claude CodeCLAUDE_CODE_SETTINGS_PATH~/.claude/settings.json
Claude CodeCLAUDE_CODE_MCP_CONFIG_PATH~/.claude/.claude.json
Claude CodeTOKENPILOT_CLAUDE_CODE_CONFIG~/.claude/tokenpilot.json

Backup Strategy

Before modifying existing host config files, the installer creates .tokenpilot.bak backups. This applies to Codex (~/.codex/config.toml) and Claude Code (~/.claude/settings.json, ~/.claude/.claude.json).

Released under the MIT License.