{"id":40064098,"url":"https://github.com/jwill9999/openrouter-cli","last_synced_at":"2026-01-20T17:56:56.093Z","repository":{"id":313654786,"uuid":"1051882209","full_name":"jwill9999/openrouter-cli","owner":"jwill9999","description":"CLI tool for OpenRouter","archived":false,"fork":false,"pushed_at":"2025-09-24T22:11:44.000Z","size":783,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-25T00:11:54.311Z","etag":null,"topics":["ai","chatbot","cli","models","openrouter"],"latest_commit_sha":null,"homepage":"http://letuscode.co.uk/openrouter-cli/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwill9999.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-09-06T23:20:42.000Z","updated_at":"2025-09-24T22:11:39.000Z","dependencies_parsed_at":"2025-09-07T17:23:24.410Z","dependency_job_id":"325e02db-5c73-463f-9ea7-6365c05f35ce","html_url":"https://github.com/jwill9999/openrouter-cli","commit_stats":null,"previous_names":["jwill9999/openrouter-cli"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/jwill9999/openrouter-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwill9999%2Fopenrouter-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwill9999%2Fopenrouter-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwill9999%2Fopenrouter-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwill9999%2Fopenrouter-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwill9999","download_url":"https://codeload.github.com/jwill9999/openrouter-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwill9999%2Fopenrouter-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chatbot","cli","models","openrouter"],"created_at":"2026-01-19T07:34:08.543Z","updated_at":"2026-01-19T07:34:09.202Z","avatar_url":"https://github.com/jwill9999.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openrouter-cli\n\n[![npm latest](https://img.shields.io/npm/v/@letuscode/openrouter-cli)](https://www.npmjs.com/package/@letuscode/openrouter-cli)\n[![npm beta](https://img.shields.io/npm/v/@letuscode/openrouter-cli/beta)](https://www.npmjs.com/package/@letuscode/openrouter-cli?activeTab=versions)\n\n\n## 📽️ Video Overview\n\nWant to see OpenRouter CLI in action? Watch our [video overview](https://youtu.be/UhWFaFXR1Vs?si=O1nr95-VMvXEbXZ0)!\n\n[![Spec Kit video header](https://img.youtube.com/vi/UhWFaFXR1Vs/0.jpg)](https://youtu.be/UhWFaFXR1Vs?si=O1nr95-VMvXEbXZ0)\n\nOpenAI‑compatible CLI for `OpenRouter`. Ask questions, chat in a REPL, and fuzzy‑search models.\n\n\u003e **Note**: This project is in MVP development. Beta releases are for testing, and stable releases are for general use. See [Release Strategy](docs/RELEASE_STRATEGY.md) for details.\n\nYou can change your model any time. In a terminal, run `openrouter models` to browse, or in the REPL type `/model` to search inline. Tip: search for `free` to see free models.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n\u003cimg src=\"assets/img/session.png\" width=\"400\" /\u003e\n\u003cbr\u003e\u003cem\u003eMonitor your current session costs\u003c/em\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n\u003cimg src=\"assets/img/billing.png\" width=\"400\" /\u003e\n\u003cbr\u003e\u003cem\u003eGet Billing Information\u003c/em\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Fuzzy Search Models\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n\u003cimg src=\"assets/img/fuzzy search.png\" width=\"100%\" /\u003e\n\u003cbr\u003e\u003cem\u003eMonitor your current session costs\u003c/em\u003e\n\u003c/td\u003e\n\u003c/tr \u003e\n\u003c/table\u003e\n\n## Repl Chat Configurations\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n\u003cimg src=\"assets/img/chat.png\" width=\"100%\" /\u003e\n\u003cbr\u003e\u003cem\u003eRepl Chat Configurations\u003c/em\u003e\n\u003c/td\u003e\n\u003c/tr \u003e\n\u003c/table\u003e\n\n## Install\n\n### Stable Release (Recommended)\n\n- Global: `npm i -g @letuscode/openrouter-cli`\n- One‑off: `npx @letuscode/openrouter-cli --help`\n\n### Beta Release (Testing)\n\n- Global: `npm i -g @letuscode/openrouter-cli@beta`\n- One‑off: `npx @letuscode/openrouter-cli@beta --help`\n\nTip: Running `openrouter` with no args starts the setup wizard and then opens the REPL (in a terminal).\n\n### Requirements\n\n- Node.js 18.17+ (ESM)\n\n## Quick start\n\n1. Create an API key: https://openrouter.ai/keys\n2. Run setup: `openrouter` (or `openrouter init`) — enter your key if asked, then pick a model\n3. Ask once: `openrouter ask \"Hello!\"` — formatted answer by default\n4. Chat: `openrouter repl` — formatted replies; toggle streaming when you like\n\n## Everyday commands\n\n- `openrouter` (or `openrouter init`) — setup; uses the OpenRouter domain automatically; asks for a key only if missing; lets you pick a model; opens the REPL afterwards\n- `openrouter ask \"…\"` — answer a single question (formatted by default)\n- `openrouter repl` — interactive chat\n  - In the REPL:\n    - `/model` → inline search; type a few letters, pick a match\n    - `/model \u003cid\u003e` → set a specific model\n    - `/format md|plain` → formatted or plain replies (non‑stream)\n    - `/stream on|off` → stream tokens or wait for a full reply\n    - `exit` → quit\n- `openrouter models [query]` — browse models (fuzzy search) in a terminal; prints a table in non‑TTY\n- `openrouter config --list` — show current settings (keys are masked)\n- `openrouter config --api-key sk-…` — set your key once (or use the env var below)\n\n## Behavior \u0026 defaults\n\n- Ask: non‑stream + markdown rendering by default. Add `--stream` to stream tokens.\n- REPL: streaming OFF by default; markdown rendering for full replies; inline `/model` search.\n\n## Configuration\n\n- API key via env (recommended): `export OPENROUTER_API_KEY=…` (or `OPENAI_API_KEY`)\n- Global config file: `~/.config/openrouter-cli/config.json` (private; keys never logged)\n- Project overrides: add `.openrouterrc` (JSON or YAML) in your project root\n  - Example `.openrouterrc` (JSON):\n    {\n    \"domain\": \"https://openrouter.ai/api/v1\",\n    \"model\": \"openrouter/auto\"\n    }\n- Domain: fixed to the OpenRouter domain today (no prompt); kept in config for future provider choices\n- Change your default model any time by running `openrouter` again\n- Precedence: project rc \u003e profile \u003e global; env keys override persisted keys\n\n## Model search\n\n- `openrouter models` opens an interactive search in a terminal (type 2–3 letters)\n- `openrouter models llama` starts with “llama” suggestions; prints a table in non‑TTY\n\n### Example: inline model search in REPL\n\n```text\n(openai/gpt-oss-20b:free) \u003e /model\nSearch models (\u003e=2 chars, blank to cancel): free\nMatches:\n1. openai/gpt-oss-120b:free — OpenAI: gpt-oss-120b (free)\n2. openai/gpt-oss-20b:free — OpenAI: gpt-oss-20b (free)\n…\nPick 1-10 or type a model id:\n```\n\n## Output \u0026 accessibility\n\n- Non‑stream answers render markdown (bold/italic, headings, lists, inline code). Streaming prints raw tokens for responsiveness.\n- A “Thinking” spinner shows while waiting; colors/spinners honor `NO_COLOR` and TTY detection.\n\n## Troubleshooting\n\n- Missing API key: set `OPENROUTER_API_KEY` or run `openrouter` again. View current config: `openrouter config --list`.\n- “Policy / free endpoints” error: open https://openrouter.ai/settings/privacy and enable free endpoints, or choose a different model (`openrouter models`).\n- Picker shows a table: run in a terminal (TTY). Check: `node -p \"process.stdout.isTTY \u0026\u0026 process.stdin.isTTY\"`.\n- Friendly errors are shown; details are logged to `~/.config/openrouter-cli/cli.log`.\n\n## Advanced flags (optional)\n\n- Ask: `--stream`, `--format auto|plain|md`, `-s, --system \u003ctext\u003e`, `--profile \u003cname\u003e`, `--no-init`\n- Models: `--non-interactive`\n- Config (debug): `--danger-reset`, `--override-json '\u003cjson\u003e'`\n\n## License\n\n- Polyform Noncommercial License 1.0.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwill9999%2Fopenrouter-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwill9999%2Fopenrouter-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwill9999%2Fopenrouter-cli/lists"}