klaudiak
v2.1.94
Published
Klaudia Kode is a production-grade coding agent that supports many LLMs through a local OpenRouter-compatible proxy.
Downloads
759
Readme
Klaudia Kode
Klaudia Kode is a coding agent wrapper CLI that can run against many LLM providers through a local OpenRouter-compatible proxy.

Use the CLI as klaudiak.
Quick Start
- Install and verify:
npm i -g klaudiak
klaudiak --help- Start the proxy in one terminal:
klaudiak proxy deepseek/deepseek-chat-v3-0324 key sk-or-v1-... --port=10000- Start the coding agent in another terminal:
klaudiak --port=10000If your proxy runs on default port 9090, you can simply run:
klaudiakLaziest Setup (Two Commands)
If you want daily usage to be exactly:
klaudiak proxy
klaudiakset the default profile once:
klaudiak defaults set default type proxy
klaudiak defaults set default openrouterModel deepseek/deepseek-chat-v3-0324
klaudiak defaults set default openrouterApiKey sk-or-v1-...
klaudiak defaults set default proxyPort 9090
klaudiak defaults set default anthropicBaseUrl http://localhost:9090Then every day:
- Terminal A:
klaudiak proxy - Terminal B:
klaudiak
If you choose another port, keep proxyPort and anthropicBaseUrl aligned to the same value.
Screenshots of this exact lazy flow:
klaudiak proxy

klaudiak

Recommended Daily Workflow
For repeat usage, set profile defaults once and then launch with short commands.
# Create a dedicated profile
klaudiak defaults create deepseek
# Save proxy settings to that profile
klaudiak defaults set deepseek type proxy
klaudiak defaults set deepseek openrouterModel deepseek/deepseek-chat-v3-0324
klaudiak defaults set deepseek openrouterApiKey sk-or-v1-...
klaudiak defaults set deepseek proxyPort 10000
# Terminal A: run proxy from profile (no model/key arguments needed)
klaudiak proxy --profile=deepseek
# Terminal B: run agent against the same proxy port
klaudiak --profile=deepseek --port=10000This gives you predictable, reusable setup with minimal typing.
Command Reference
Start agent
klaudiak
klaudiak [agentArgs...]
klaudiak --profile=<name>
klaudiak --defaults=<name>
klaudiak --port=<port>
klaudiak --port <port>klaudiakstarts the coding agent.- Any additional args are forwarded to
cli.js(for example-p "..."). --profile=<name>loads settings from~/.klaudiakprofile<name>.--defaults=<name>is an alias of--profile=<name>.--port=<port>setsANTHROPIC_BASE_URL=http://localhost:<port>for this run (overrides profile/env base URL).--port <port>is also supported.
When no profile flag is passed, Klaudiak always uses the default profile.
Behavior details that matter:
- Agent arguments are forwarded to
cli.jsafter removing--profile/--defaultsand--port. - If running against
localhost/127.0.0.1, Klaudiak auto-enables--bareunless you already passed it. - If running against
localhostand no Anthropic auth env vars are set, Klaudiak injects local placeholder auth values to avoid OAuth/login fallback.
Start proxy
klaudiak proxy
klaudiak proxy --profile=<name>
klaudiak proxy <model> key <apiKey> --port=<port>
klaudiak proxy <model> key <apiKey> --port <port>Example:
klaudiak proxy openai/gpt-4o-mini key sk-or-v1-... --port=9090<model>is passed toOPENROUTER_MODEL.<apiKey>is passed toOPENROUTER_API_KEY.--port=<port>is passed toPROXY_PORT.--port <port>is also supported.
You can also run proxy from a profile with no model/key arguments when that profile includes openrouterModel and openrouterApiKey:
klaudiak proxy
klaudiak proxy --profile=<name>Global defaults profiles
Klaudiak stores global profile defaults in ~/.klaudiak (JSON). The file is auto-created whenever klaudiak runs.
Common commands:
klaudiak defaults list
klaudiak defaults show default
klaudiak defaults create gemini
klaudiak defaults set gemini type proxy
klaudiak defaults set gemini openrouterModel google/gemini-2.5-pro
klaudiak defaults set gemini openrouterApiKey sk-or-v1-...
klaudiak defaults unset gemini anthropicApiKey
klaudiak defaults delete geminiSupported fields:
type(agentorproxy)anthropicBaseUrlanthropicApiKeyanthropicModelproxyPortopenrouterModelopenrouterApiKey
Notes:
- Profile names must match
^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$. defaultprofile always exists and cannot be deleted.klaudiakauto-creates~/.klaudiakon first run.
Configuration Precedence
For agent startup, effective values follow this order:
- Existing environment variables (for example
ANTHROPIC_API_KEY,ANTHROPIC_MODEL,ANTHROPIC_BASE_URL) - Selected profile values from
~/.klaudiak - CLI
--port(overrides base URL tohttp://localhost:<port>)
Practical rule: if you pass --port, that port wins for ANTHROPIC_BASE_URL.
How It Works
Klaudia Kode CLI --> local proxy (default :9090) --> OpenRouter/providerThe agent speaks Anthropic-compatible protocol to the local proxy. The proxy translates and routes requests to the model/provider you selected.
Power Tips
- Use profiles per provider/model combo so you can switch quickly with
--profile=<name>. - Keep proxy and agent ports explicit when debugging:
klaudiak proxy ... --port=10000andklaudiak --port=10000. - Use
klaudiak defaults show <name>to confirm values before running. - Store secrets in profile only on trusted machines, and rotate keys periodically.
Troubleshooting
Proxy not running
If you see a startup error about proxy connectivity:
- Start proxy with the same port you want to use.
- Start agent with matching
--port=<port>or setANTHROPIC_BASE_URLmanually.
Wrong port
Use the same explicit port in both commands:
klaudiak proxy <model> key <apiKey> --port=10000
klaudiak --port=10000Invalid key or model
Make sure:
- API key starts with an OpenRouter key format such as
sk-or-v1-... - Model string is valid for your provider account
Profile not found
If you pass --profile=<name> and get a not-found error:
- Check available profiles with
klaudiak defaults list. - Create it with
klaudiak defaults create <name>. - Set required fields using
klaudiak defaults set ....
Invalid profile file JSON
If ~/.klaudiak contains invalid JSON, Klaudiak recreates it with defaults and prints a warning.
Migration from Klaudiak
- Package/command is now
klaudiak - Legacy aliases are removed
- Proxy command contract is standardized as:
klaudiak proxy <model> key <apiKey> --port=<port>
Requirements
- Node.js 18+
License
MIT
