CLI reference
Manage profiles, Accounts Pool, licenses, cloud sync, and headless daemon workflows straight from the terminal.
Install
codexuse command inside the desktop app bundle.
Install with npm:
npm install -g codexuse-cli
Verify:
codexuse --version
Commands
codexuse profile list
codexuse profile list --no-usage
codexuse profile list --compact
codexuse profile current
codexuse profile add <name> [--skip-login] [--device-auth] [--login=browser|device]
codexuse profile refresh <name> [--skip-login] [--device-auth] [--login=browser|device]
codexuse profile switch <name>
codexuse profile autoroll [--threshold=50-100] [--dry-run] [--watch] [--interval=seconds]
codexuse profile delete <name>
codexuse profile rename <old> <new>
codexuse license status
codexuse license activate <license-key>
codexuse sync status
codexuse sync pull
codexuse sync push
codexuse account-pool status [--runtime=desktop|daemon] [--state-dir=/abs/path] [--port=NNNN]
codexuse account-pool enable
codexuse account-pool disable
codexuse account-pool routing <least-used|round-robin>
codexuse account-pool profiles <list|set|add|remove|reset> [names...]
codexuse account-pool models <list|add|remove|reset> [model-ids...]
codexuse account-pool reasoning <list|add|remove|reset> [values...]
codexuse account-pool fast-mode <list|add|remove|reset> [values...]
codexuse account-pool keys <list|create|revoke> [id]
codexuse account-pool sessions list [--runtime=desktop|daemon] [--state-dir=/abs/path]
codexuse daemon start [--port=NNNN] [--telegram-bot-token=<token>] [--project-path=/abs/path]
Examples
codexuse profile list --compact
codexuse profile add Work --login=device
codexuse profile switch Personal
codexuse profile autoroll --dry-run
codexuse profile autoroll --watch --interval=30 --threshold=95
codexuse account-pool status
codexuse account-pool keys create --runtime=daemon
codexuse daemon start --port=3773
codexuse license status
codexuse daemon start --port=3773 --telegram-bot-token=123456:AA...
Accounts Pool from CLI Pro
Use the CLI when you want to manage pooled profiles, exposed model names, runtime keys, and daemon inspection without opening the desktop app.
codexuse account-pool status
codexuse account-pool enable
codexuse account-pool profiles list
codexuse account-pool keys create
codexuse account-pool keys create --runtime=daemon
codexuse account-pool status --runtime=daemon --port=3773
- Accounts Pool settings are shared with the desktop app on the same machine.
- API keys and live sessions are runtime-specific: desktop and daemon each keep their own pool store.
- The plain
account-pool keys createcommand mints a desktop key. If your client is calling a headless daemon URL, create the key with--runtime=daemon.
Daemon mode
Run CodexUse headless on a VPS, Linux server, or SSH session. The daemon serves the Projects/chat server, can power Accounts Pool, and optionally enables Telegram remote control when you pass a bot token.
codexuse daemon start [--port=3773] [--telegram-bot-token=<token>] [--project-path=/abs/path]
- Requires Bun on PATH because the bundled Projects server runs on Bun.
- Starts the headless Projects/chat server in the terminal.
- Pass
--portwhen another local client should keep one stable Accounts Pool base URL across restarts. - The Telegram bot token can also be set via the
CODEXUSE_TELEGRAM_BOT_TOKENenvironment variable. --project-pathauto-registers that folder and makes it the default project for new chats.- Runs until you stop it with
Ctrl+CorSIGTERM. - Use with a process manager (
systemd,pm2,supervisord) for always-on setups. - All Telegram bot commands (
/projects,/threads,/new, etc.) work the same as in the desktop app when Telegram is enabled.
Example with a pinned port, environment variable, and project path:
export CODEXUSE_TELEGRAM_BOT_TOKEN=123456:AA...
codexuse daemon start --port=3773 --project-path=/home/user/my-project
For the full Telegram setup guide (creating a bot, available commands), see the Telegram remote control guide. For Accounts Pool specifics, see the Accounts Pool docs.
Cross-device handoff Pro
Common pattern: push from your main laptop, then pull on a second machine so your profiles and config are ready.
# on the second machine
codexuse sync status
codexuse sync pull
codexuse profile list --compact
Notes
profile addandrefreshruncodex login(Codex CLI required).- Use
--no-usageto skip live rate-limit fetch. profile autorollruns once by default; use--watchfor continuous checks.profile autorollsupports--dry-runto preview a switch without applying it.- In terminal/other clients, profile changes usually apply on the next resumed/new turn, not mid-turn.
- On SSH/headless, login defaults to device auth.
- License state is shared between the desktop app and CLI.
- Accounts Pool settings are shared with the desktop app, but daemon and desktop API keys are separate.
- Cloud sync commands are Pro-only and manual (no background auto-sync).
daemon startdoes not require Telegram. Pass a bot token only when you want Telegram remote control.- Accounts Pool still requires a Pro license before it can serve requests.