klaudiak 2.1.92 → 2.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/screenshots/klaudiak.png +0 -0
- package/.docs/screenshots/openrouter-proxy.png +0 -0
- package/README.md +116 -7
- package/klaudiak-help.md +24 -6
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
package/README.md
CHANGED
|
@@ -2,26 +2,94 @@
|
|
|
2
2
|
|
|
3
3
|
Klaudia Kode is a coding agent wrapper CLI that can run against many LLM providers through a local OpenRouter-compatible proxy.
|
|
4
4
|
|
|
5
|
+
Use the CLI as `klaudiak`.
|
|
6
|
+
|
|
5
7
|
## Quick Start
|
|
6
8
|
|
|
7
|
-
1.
|
|
9
|
+
1. Install and verify:
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
|
-
|
|
12
|
+
npm i -g klaudiak
|
|
13
|
+
klaudiak --help
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
2. Start the
|
|
16
|
+
2. Start the proxy in one terminal:
|
|
14
17
|
|
|
15
18
|
```bash
|
|
16
|
-
|
|
19
|
+
klaudiak proxy deepseek/deepseek-chat-v3-0324 key sk-or-v1-... --port=10000
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
3. Start the coding agent in another terminal:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
klaudiak --port=10000
|
|
17
26
|
```
|
|
18
27
|
|
|
19
28
|
If your proxy runs on default port 9090, you can simply run:
|
|
20
29
|
|
|
21
30
|
```bash
|
|
22
|
-
|
|
31
|
+
klaudiak
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Laziest Setup (Two Commands)
|
|
35
|
+
|
|
36
|
+
If you want daily usage to be exactly:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
klaudiak proxy
|
|
40
|
+
klaudiak
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
set the `default` profile once:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
klaudiak defaults set default type proxy
|
|
47
|
+
klaudiak defaults set default openrouterModel deepseek/deepseek-chat-v3-0324
|
|
48
|
+
klaudiak defaults set default openrouterApiKey sk-or-v1-...
|
|
49
|
+
klaudiak defaults set default proxyPort 9090
|
|
50
|
+
klaudiak defaults set default anthropicBaseUrl http://localhost:9090
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Then every day:
|
|
54
|
+
|
|
55
|
+
1. Terminal A: `klaudiak proxy`
|
|
56
|
+
2. Terminal B: `klaudiak`
|
|
57
|
+
|
|
58
|
+
If you choose another port, keep `proxyPort` and `anthropicBaseUrl` aligned to the same value.
|
|
59
|
+
|
|
60
|
+
Screenshots of this exact lazy flow:
|
|
61
|
+
|
|
62
|
+
### `klaudiak proxy`
|
|
63
|
+
|
|
64
|
+

|
|
65
|
+
|
|
66
|
+
### `klaudiak`
|
|
67
|
+
|
|
68
|
+

|
|
69
|
+
|
|
70
|
+
## Recommended Daily Workflow
|
|
71
|
+
|
|
72
|
+
For repeat usage, set profile defaults once and then launch with short commands.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Create a dedicated profile
|
|
76
|
+
klaudiak defaults create deepseek
|
|
77
|
+
|
|
78
|
+
# Save proxy settings to that profile
|
|
79
|
+
klaudiak defaults set deepseek type proxy
|
|
80
|
+
klaudiak defaults set deepseek openrouterModel deepseek/deepseek-chat-v3-0324
|
|
81
|
+
klaudiak defaults set deepseek openrouterApiKey sk-or-v1-...
|
|
82
|
+
klaudiak defaults set deepseek proxyPort 10000
|
|
83
|
+
|
|
84
|
+
# Terminal A: run proxy from profile (no model/key arguments needed)
|
|
85
|
+
klaudiak proxy --profile=deepseek
|
|
86
|
+
|
|
87
|
+
# Terminal B: run agent against the same proxy port
|
|
88
|
+
klaudiak --profile=deepseek --port=10000
|
|
23
89
|
```
|
|
24
90
|
|
|
91
|
+
This gives you predictable, reusable setup with minimal typing.
|
|
92
|
+
|
|
25
93
|
## Command Reference
|
|
26
94
|
|
|
27
95
|
### Start agent
|
|
@@ -39,11 +107,17 @@ klaudiak --port <port>
|
|
|
39
107
|
- Any additional args are forwarded to `cli.js` (for example `-p "..."`).
|
|
40
108
|
- `--profile=<name>` loads settings from `~/.klaudiak` profile `<name>`.
|
|
41
109
|
- `--defaults=<name>` is an alias of `--profile=<name>`.
|
|
42
|
-
- `--port=<port>` sets `ANTHROPIC_BASE_URL=http://localhost:<port>` for this run
|
|
110
|
+
- `--port=<port>` sets `ANTHROPIC_BASE_URL=http://localhost:<port>` for this run (overrides profile/env base URL).
|
|
43
111
|
- `--port <port>` is also supported.
|
|
44
112
|
|
|
45
113
|
When no profile flag is passed, Klaudiak always uses the `default` profile.
|
|
46
114
|
|
|
115
|
+
Behavior details that matter:
|
|
116
|
+
|
|
117
|
+
- Agent arguments are forwarded to `cli.js` after removing `--profile/--defaults` and `--port`.
|
|
118
|
+
- If running against `localhost`/`127.0.0.1`, Klaudiak auto-enables `--bare` unless you already passed it.
|
|
119
|
+
- If running against `localhost` and no Anthropic auth env vars are set, Klaudiak injects local placeholder auth values to avoid OAuth/login fallback.
|
|
120
|
+
|
|
47
121
|
### Start proxy
|
|
48
122
|
|
|
49
123
|
```bash
|
|
@@ -98,6 +172,22 @@ Supported fields:
|
|
|
98
172
|
- `openrouterModel`
|
|
99
173
|
- `openrouterApiKey`
|
|
100
174
|
|
|
175
|
+
Notes:
|
|
176
|
+
|
|
177
|
+
- Profile names must match `^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$`.
|
|
178
|
+
- `default` profile always exists and cannot be deleted.
|
|
179
|
+
- `klaudiak` auto-creates `~/.klaudiak` on first run.
|
|
180
|
+
|
|
181
|
+
## Configuration Precedence
|
|
182
|
+
|
|
183
|
+
For agent startup, effective values follow this order:
|
|
184
|
+
|
|
185
|
+
1. Existing environment variables (for example `ANTHROPIC_API_KEY`, `ANTHROPIC_MODEL`, `ANTHROPIC_BASE_URL`)
|
|
186
|
+
2. Selected profile values from `~/.klaudiak`
|
|
187
|
+
3. CLI `--port` (overrides base URL to `http://localhost:<port>`)
|
|
188
|
+
|
|
189
|
+
Practical rule: if you pass `--port`, that port wins for `ANTHROPIC_BASE_URL`.
|
|
190
|
+
|
|
101
191
|
## How It Works
|
|
102
192
|
|
|
103
193
|
```text
|
|
@@ -106,6 +196,13 @@ Klaudia Kode CLI --> local proxy (default :9090) --> OpenRouter/provider
|
|
|
106
196
|
|
|
107
197
|
The agent speaks Anthropic-compatible protocol to the local proxy. The proxy translates and routes requests to the model/provider you selected.
|
|
108
198
|
|
|
199
|
+
## Power Tips
|
|
200
|
+
|
|
201
|
+
- Use profiles per provider/model combo so you can switch quickly with `--profile=<name>`.
|
|
202
|
+
- Keep proxy and agent ports explicit when debugging: `klaudiak proxy ... --port=10000` and `klaudiak --port=10000`.
|
|
203
|
+
- Use `klaudiak defaults show <name>` to confirm values before running.
|
|
204
|
+
- Store secrets in profile only on trusted machines, and rotate keys periodically.
|
|
205
|
+
|
|
109
206
|
## Troubleshooting
|
|
110
207
|
|
|
111
208
|
### Proxy not running
|
|
@@ -131,12 +228,24 @@ Make sure:
|
|
|
131
228
|
- API key starts with an OpenRouter key format such as `sk-or-v1-...`
|
|
132
229
|
- Model string is valid for your provider account
|
|
133
230
|
|
|
231
|
+
### Profile not found
|
|
232
|
+
|
|
233
|
+
If you pass `--profile=<name>` and get a not-found error:
|
|
234
|
+
|
|
235
|
+
1. Check available profiles with `klaudiak defaults list`.
|
|
236
|
+
2. Create it with `klaudiak defaults create <name>`.
|
|
237
|
+
3. Set required fields using `klaudiak defaults set ...`.
|
|
238
|
+
|
|
239
|
+
### Invalid profile file JSON
|
|
240
|
+
|
|
241
|
+
If `~/.klaudiak` contains invalid JSON, Klaudiak recreates it with defaults and prints a warning.
|
|
242
|
+
|
|
134
243
|
## Migration from Klaudiak
|
|
135
244
|
|
|
136
245
|
- Package/command is now `klaudiak`
|
|
137
246
|
- Legacy aliases are removed
|
|
138
247
|
- Proxy command contract is standardized as:
|
|
139
|
-
|
|
248
|
+
- `klaudiak proxy <model> key <apiKey> --port=<port>`
|
|
140
249
|
|
|
141
250
|
## Requirements
|
|
142
251
|
|
package/klaudiak-help.md
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
Klaudia Kode CLI
|
|
2
2
|
|
|
3
|
-
install using
|
|
4
|
-
$ npm install -g klaudiak
|
|
5
|
-
|
|
6
3
|
Usage:
|
|
7
|
-
klaudiak
|
|
8
|
-
klaudiak --
|
|
9
|
-
klaudiak
|
|
4
|
+
klaudiak [agentArgs...]
|
|
5
|
+
klaudiak [agentArgs...] --profile=<name>
|
|
6
|
+
klaudiak [agentArgs...] --defaults=<name>
|
|
7
|
+
klaudiak [agentArgs...] --port=<port>
|
|
8
|
+
klaudiak [agentArgs...] --port <port>
|
|
9
|
+
klaudiak defaults <list|show|create|delete|set|unset>
|
|
10
|
+
klaudiak proxy
|
|
11
|
+
klaudiak proxy --profile=<name>
|
|
12
|
+
klaudiak proxy <model> key <apiKey> [--port=<port>|--port <port>]
|
|
10
13
|
|
|
11
14
|
Examples:
|
|
12
15
|
klaudiak
|
|
16
|
+
klaudiak -p "say hi"
|
|
17
|
+
klaudiak --profile=gemini
|
|
18
|
+
klaudiak --defaults=gemini
|
|
13
19
|
klaudiak --port=10000
|
|
20
|
+
klaudiak --port 10000
|
|
21
|
+
klaudiak proxy
|
|
22
|
+
klaudiak proxy --profile=default
|
|
23
|
+
klaudiak defaults create gemini
|
|
24
|
+
klaudiak defaults list
|
|
25
|
+
klaudiak defaults show gemini
|
|
26
|
+
klaudiak defaults set gemini type proxy
|
|
27
|
+
klaudiak defaults set gemini openrouterModel google/gemini-2.5-pro
|
|
28
|
+
klaudiak defaults set gemini openrouterApiKey sk-or-v1-...
|
|
29
|
+
klaudiak defaults unset gemini anthropicApiKey
|
|
30
|
+
klaudiak defaults delete gemini
|
|
14
31
|
klaudiak proxy deepseek/deepseek-chat-v3-0324 key sk-or-v1-... --port=10000
|
|
32
|
+
klaudiak proxy deepseek/deepseek-chat-v3-0324 key sk-or-v1-... --port 10000
|