aipd-codex-cli
v0.1.1
Published
Companion CLI for the AIPD Codex Claude Code plugin: login, project picker, 90-day API key in OS keychain.
Readme
@aipd/codex-cli (v0.2)
Companion CLI for the aipd-codex Claude Code plugin.
Logs you into the AIPD platform with username + password, picks a project,
and stores the resulting 90-day api-key in the OS keychain. The plugin reads
it via the AIPD_CODEX_KEY env var.
Install
cd aipd-codex-cli
npm install && npm run build
npm linkCommands
| Command | Purpose |
| ------------------------------ | ------------------------------------------------------------- |
| aipd-codex login [-u email] | Prompt user + password → list projects → pick → store api-key |
| aipd-codex switch-project | Logout + login again to bind to a different project |
| aipd-codex rotate | Issue a fresh 90-day key (same user + project) before expiry |
| aipd-codex logout | Revoke + clear keychain |
| aipd-codex status | Show user, project, expiry, daysLeft (masked key) |
| aipd-codex set-mcp-url <url> | Override the MCP gateway URL |
| aipd-codex env | Print export AIPD_CODEX_KEY=… lines — use with eval |
Daily workflow
eval "$(aipd-codex env)"
claudeEnv vars
| Var | Default | Purpose |
| --------------- | ----------------------- | ------------------------------- |
| AIPD_API_BASE | http://localhost:3000 | Backend URL for /codex/auth/* |
Storage
| What | Where |
| ------------------------ | ------------------------------------------------------------------------ |
| API key | OS keychain (keytar) — macOS Keychain / libsecret / Win Credential Vault |
| Fallback if keytar fails | ~/.aipd-codex/api-key mode 0600 |
| Project, expiry, mcpUrl | ~/.aipd-codex/state.json mode 0600 |
The status command prints which backend is active.
