{"_id":"@0xtrail/arcli","name":"@0xtrail/arcli","dist-tags":{"latest":"0.3.1"},"versions":{"0.3.1":{"name":"@0xtrail/arcli","version":"0.3.1","description":"Point Claude Code, Codex, and Claude Desktop at AgentRouter","type":"module","bin":{"arcli":"dist/index.js"},"engines":{"node":">=22.0.0"},"scripts":{"build":"tsc","test":"vitest run","verify":"tsc --noEmit && tsc && vitest run","typecheck":"tsc --noEmit"},"dependencies":{"smol-toml":"^1.7.1"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.6.0","vitest":"^2.1.0"},"license":"MIT","keywords":["agentrouter","claude-code","codex","claude-desktop","cli","ai","gateway"],"repository":{"type":"git","url":"git+https://github.com/0xtrail/arcli.git"},"homepage":"https://agentrouter.org","publishConfig":{"access":"public"},"_id":"@0xtrail/arcli@0.3.1","gitHead":"06ed6140f7069291eb6ef6a9a090100ff8b258f1","bugs":{"url":"https://github.com/0xtrail/arcli/issues"},"_nodeVersion":"22.23.2","_npmVersion":"10.9.8","dist":{"integrity":"sha512-O55nAXzrmWMb0EAVIwWZyfX2mAj3AcMz6lv8Dv59ZUp7RElSH44UCc8qGfdyWyBGxfhHIWZW8wPM5mGWOR7W0A==","shasum":"1bf22292ed30b945025ad1cbe83af586d9d1644a","tarball":"https://registry.npmjs.org/@0xtrail/arcli/-/arcli-0.3.1.tgz","fileCount":26,"unpackedSize":101957,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHed/cgQkZkT9TGN75QHfSQ0gmESpW+mtqoDXKYL851HAiEA2JHwD924gNjjJ/yR+kOAGN9c7PyoQ+/uRNHq8HTOtvs="}]},"_npmUser":{"name":"0xtrail","email":"leanmaheswa@gmail.com"},"directories":{},"maintainers":[{"name":"0xtrail","email":"leanmaheswa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/arcli_0.3.1_1788799805035_0.7480186679120167"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-07T16:50:04.868Z","0.3.1":"2026-09-07T16:50:05.181Z","modified":"2026-09-07T16:50:05.383Z"},"maintainers":[{"name":"0xtrail","email":"leanmaheswa@gmail.com"}],"description":"Point Claude Code, Codex, and Claude Desktop at AgentRouter","homepage":"https://agentrouter.org","keywords":["agentrouter","claude-code","codex","claude-desktop","cli","ai","gateway"],"repository":{"type":"git","url":"git+https://github.com/0xtrail/arcli.git"},"bugs":{"url":"https://github.com/0xtrail/arcli/issues"},"license":"MIT","readme":"# arcli\n\nPoint your AI coding tools at [AgentRouter](https://agentrouter.org) — one command, no\nhand-editing config files.\n\nSupports **Claude Code CLI** (Anthropic protocol), **Codex CLI** (OpenAI protocol),\nand **Claude Desktop (Cowork)**. The model list is fetched live from the gateway, so\nyou always pick from models your key can actually reach — the menu is filtered per\napp by the gateway's own `supported_endpoint_types`.\n\n## Install\n\n```\nnpm install -g @0xtrail/arcli\n```\n\nRequires Node.js 22 or newer. The package is scoped, but the command you type\nis just `arcli`.\n\n## Use\n\n```\narcli\n```\n\nYou will be asked for your API key once — grab one at\nhttps://agentrouter.org/console/token and paste it in. The key is verified against\nthe gateway before anything is stored, so a typo fails fast with nothing written.\nThen a menu opens:\n\n```\n █████╗ ██████╗\n██╔══██╗██╔══██╗\n███████║██████╔╝\n██╔══██║██╔══██╗\n██║  ██║██║  ██║\n╚═╝  ╚═╝╚═╝  ╚═╝\npoint your AI coding tools at AgentRouter\n\nAPI key ····kt5y\n────────────────────────────────────────────\n\nWhat would you like to do?\n\n❯ Install to apps\n  Restore originals\n  View status\n  Log out\n  Quit\n\n↑↓ navigate · enter confirm · esc cancel\n```\n\n- **Install to apps** — pick an app, pick from your live model list, done. If the\n  model list can't be reached (offline, gateway hiccup), you type the model name\n  instead — setup never strands you.\n- **Restore originals** — restores your original configs, byte for byte\n  (checksum-verified backups, including deleting files that didn't exist before).\n- **View status** — which apps are currently using AgentRouter.\n- **Log out** — deletes the stored API key. Your apps keep pointing at AgentRouter\n  until you choose **Restore originals**.\n\n### What setup writes\n\n**Claude Code** (`~/.claude/settings.json`, `env` block) — bare origin on purpose,\nbecause the Anthropic SDK appends `/v1/messages` itself:\n\n```\nANTHROPIC_BASE_URL=https://agentrouter.org\nANTHROPIC_AUTH_TOKEN=<your key>\nAPI_TIMEOUT_MS=600000\nCLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT=1\nCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1\nANTHROPIC_DEFAULT_OPUS_MODEL=<your pick>\nANTHROPIC_DEFAULT_SONNET_MODEL=<your pick>\nANTHROPIC_DEFAULT_HAIKU_MODEL=<your pick>\n```\n\n**Codex** (`~/.codex/config.toml` + `~/.codex/auth.json`) — full `/v1` prefix on\npurpose, because Codex appends only `/responses`:\n\n```toml\nmodel = \"gpt-5.6-sol\"\nmodel_provider = \"agentrouter\"\n\n[model_providers.agentrouter]\nname = \"AgentRouter\"\nbase_url = \"https://agentrouter.org/v1\"\nwire_api = \"responses\"\n```\n\n## Your configs are safe\n\nBefore writing anything, `arcli` backs up every file it will touch and\nverifies the backup with a checksum. **Restore originals** puts your original files\nback exactly as they were — including deleting files that didn't exist before.\n\nIf a write fails halfway, the old config is automatically restored before the\ncommand exits. A rejected or revoked API key is never written anywhere.\n\n## What's stored on your machine\n\n`~/.arcli/` holds:\n\n- `config.json` — your API key and gateway address (mode `0600`, readable only\n  by you)\n- `backups/` — per-app config backups\n\n**Log out** deletes the stored credentials. Your apps keep pointing at AgentRouter until\nyou choose **Restore originals**.\n\n## Options\n\n```\narcli --panel <url>    Use a gateway other than https://agentrouter.org\narcli --help           Show help\n```\n\nPiped or redirected output is automatically plain — no color, no screen control —\nso it's safe in scripts. `NO_COLOR` is also respected.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-3cd258c6e4a61e3bbe6b110feddab064"}