iivo-sub
v0.1.21
Published
IIVO AI gateway quick configuration CLI
Readme
iivo-sub
Interactive quick configuration tool for IIVO internal AI gateway clients.
npx iivo-subLocal development:
node cli/iivo-sub/bin/iivo-sub.jsPublishing:
npm run publish:webThe publish script uses npm login --auth-type=web, verifies that the current package version has not already been published, runs npm pack --dry-run, and then publishes with npm publish --access public.
The CLI asks for:
- API Key
- API Host, defaulting to
https://sub.iivo.net - Model, including
gpt-5.6-sol,gpt-5.6-terra, andgpt-5.6-luna - Quick configuration scenario: OpenClaw, Hermes, Codex, or Claude Code
In an interactive terminal, press Esc to return to the previous step.
The main menu includes:
- Quick configuration
- Backup configuration
- Restore backup
- Backup chat records
- Restore chat records
- Clear cache and backups
- Exit
Backup configuration lets you choose Codex, Claude Code, Hermes, OpenClaw, or all targets. You can name the backup yourself; the default name is <date-time>_<target>.
Chat record backup and restore currently support Codex only. Claude Code remains visible in the backup menu as pending implementation; Hermes, OpenClaw, and all-target chat backup options are not shown. Restore creates a safety backup before replacing existing chat record paths.
For Codex, chat backup includes sessions, the recent-task index, history, attachments, shell snapshots, and local state files. SQLite state files are backed up with a consistent SQLite snapshot when sqlite3 is available. Restore normalizes restored session metadata to the currently configured Codex model_provider, preserves VS Code project ownership metadata such as source, thread_source, and cwd, syncs session file mtimes from recorded event timestamps, then rebuilds the recent-task index and the Codex SQLite threads task list plus backfill_state when possible. Recent Codex builds read the task list from ~/.codex/state_*.sqlite and the VS Code sidebar filters recent tasks by the active model provider and project source metadata.
After restoring Codex chats in VS Code, run Developer: Reload Window or fully restart the VS Code/Codex window. The Codex extension keeps an in-process task-list cache, so the sidebar may continue to show the old small list until the window reloads.
On Windows, close Codex App, VS Code/Codex extensions, and any running codex terminal before restoring chat records. Codex SQLite files under ~/.codex can be locked while those programs are open, and Windows will reject replacing them.
After you enter an API key once, it is cached in ~/.iivo-sub/cache.json. Next time the prompt shows a masked key such as sk-x...abcd; press Enter to reuse it or type a new key to replace it.
Clear cache and backups also removes iivo-sub's Codex third-party API leftovers from ~/.codex/config.toml and ~/.codex/auth.json, while preserving Codex chat records and OAuth login tokens when present. This lets Codex switch back to a Google/OpenAI subscription login without continuing to use the old OPENAI_API_KEY.
Existing config files are backed up under ~/.iivo-sub/backups/ before being replaced.
Hermes quick configuration writes a fresh ~/.hermes/config.yaml using Hermes' named custom_providers schema (custom:iivo-sub) and the Responses API mode required by GPT-5 models; the API key is stored in ~/.hermes/.env as IIVO_SUB_API_KEY. The previous config is backed up under ~/.iivo-sub/backups/ before replacement. It also keeps helper files under ~/.hermes and updates the active iivo-cc state under the user config directory (~/.config/iivo-cc on Linux, %APPDATA%\iivo-cc on Windows, or ~/Library/Application Support/iivo-cc on macOS).
