askii-cli 0.2.5 → 0.2.7

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.
Files changed (3) hide show
  1. package/README.md +130 -14
  2. package/dist/index.js +840 -298
  3. package/package.json +5 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ASKII CLI ( •\_•)>⌐■-■ (⌐■_■)
2
2
 
3
- AI code assistant for your terminal. Powered by Ollama or LM Studio.
3
+ AI code assistant for your terminal. Powered by Ollama, LM Studio, OpenAI, or Anthropic.
4
4
 
5
5
  ## Install
6
6
 
@@ -149,12 +149,52 @@ Without `--yes`, each proposed action is shown with its reasoning and requires `
149
149
 
150
150
  ---
151
151
 
152
+ ### `wiki-reload` — Index wiki documentation
153
+
154
+ Walks all `.md` files under `--wiki-path`, splits them into sections by heading, builds a [MiniSearch](https://github.com/lucaong/minisearch) BM25 index, and saves it as `.askii-wiki-index.json` inside the wiki folder. Run this once after pointing `--wiki-path` at your docs, and again whenever the docs change.
155
+
156
+ **bash**
157
+
158
+ ```bash
159
+ askii wiki-reload --wiki-path ./docs
160
+ askii wiki-reload --wiki-path /home/user/my-project/docs
161
+ ```
162
+
163
+ **PowerShell**
164
+
165
+ ```powershell
166
+ askii wiki-reload --wiki-path .\docs
167
+ askii wiki-reload --wiki-path C:\my-project\docs
168
+ ```
169
+
170
+ After indexing, pass `--wiki-path` and `--use-wiki` to any `ask`, `edit`, or `do` command to inject the top matching documentation chunks as context:
171
+
172
+ **bash**
173
+
174
+ ```bash
175
+ askii ask --wiki-path ./docs --use-wiki "how do I configure the database?"
176
+ cat src/db.ts | askii edit --wiki-path ./docs --use-wiki "add connection pooling"
177
+ askii do --wiki-path ./docs --use-wiki "implement the auth flow described in the docs"
178
+ ```
179
+
180
+ **PowerShell**
181
+
182
+ ```powershell
183
+ askii ask --wiki-path .\docs --use-wiki "how do I configure the database?"
184
+ Get-Content src\db.ts | askii edit --wiki-path .\docs --use-wiki "add connection pooling"
185
+ askii do --wiki-path .\docs --use-wiki "implement the auth flow described in the docs"
186
+ ```
187
+
188
+ ---
189
+
152
190
  ### `browse` — Browser agent
153
191
 
154
192
  Launches a Puppeteer browser, takes a screenshot of the current page and its URL, sends both to the AI, and executes the returned action. Repeats until the AI returns `DONE` or `--max-rounds` is reached. Requires a **vision-capable model** (e.g. `llava`, `moondream2`).
155
193
 
156
194
  By default the browser window is **visible**. Pass `--headless` to run in the background.
157
195
 
196
+ > **Requires Chrome or Chromium** to be installed. Use `--chrome-path` (or `ASKII_CHROME_PATH`) to specify the executable path if it is not detected automatically.
197
+
158
198
  **bash**
159
199
 
160
200
  ```bash
@@ -163,6 +203,7 @@ askii browse --yes --ollama-model llava "search Google for Node.js and open the
163
203
  askii browse --headless --yes --ollama-model llava "check the title of https://github.com"
164
204
  askii browse --max-rounds 10 --ollama-model llava "fill in the login form on example.com"
165
205
  askii browse -p lmstudio --lmstudio-model llava-1.5 "go to news.ycombinator.com"
206
+ askii browse --chrome-path "/usr/bin/chromium" --ollama-model llava "go to example.com"
166
207
  ```
167
208
 
168
209
  **PowerShell**
@@ -173,6 +214,7 @@ askii browse --yes --ollama-model llava "search Google for Node.js and open the
173
214
  askii browse --headless --yes --ollama-model llava "check the title of https://github.com"
174
215
  askii browse --max-rounds 10 --ollama-model llava "fill in the login form on example.com"
175
216
  askii browse -p lmstudio --lmstudio-model llava-1.5 "go to news.ycombinator.com"
217
+ askii browse --chrome-path "C:\Program Files\Google\Chrome\Application\chrome.exe" --ollama-model llava "go to example.com"
176
218
  ```
177
219
 
178
220
  Each round the AI can return one of:
@@ -191,19 +233,27 @@ Without `--yes`, each proposed action is shown with its reasoning and requires `
191
233
 
192
234
  ## Options
193
235
 
194
- | Flag | Short | Description | Default |
195
- | ------------------ | ----- | ------------------------------------------------ | ------------------------ |
196
- | `--platform` | `-p` | LLM platform: `ollama`, `lmstudio` | `ollama` |
197
- | `--ollama-url` | | Ollama server URL | `http://localhost:11434` |
198
- | `--lmstudio-url` | | LM Studio server URL | `ws://localhost:1234` |
199
- | `--ollama-model` | | Ollama model | `gemma3:270m` |
200
- | `--lmstudio-model` | | LM Studio model | `qwen/qwen3-coder-30b` |
201
- | `--mode` | | Response style: `helpful`, `funny` | `funny` |
202
- | `--max-rounds` | | Max agent rounds for `do` / `control` / `browse` | `5` |
203
- | `--dir` | | Working directory for `do` | cwd |
204
- | `--code` | `-c` | Code input (alternative to stdin) | |
205
- | `--yes` | `-y` | Auto-confirm all actions | |
206
- | `--headless` | | Run Puppeteer headlessly for `browse` | `false` (visible) |
236
+ | Flag | Short | Description | Default |
237
+ | ------------------- | ----- | --------------------------------------------------------- | ------------------------ |
238
+ | `--platform` | `-p` | LLM platform: `ollama`, `lmstudio`, `openai`, `anthropic` | `ollama` |
239
+ | `--ollama-url` | | Ollama server URL | `http://localhost:11434` |
240
+ | `--lmstudio-url` | | LM Studio server URL | `ws://localhost:1234` |
241
+ | `--ollama-model` | | Ollama model | `gemma3:270m` |
242
+ | `--lmstudio-model` | | LM Studio model | `qwen/qwen3-coder-30b` |
243
+ | `--openai-key` | | OpenAI API key (env: `ASKII_OPENAI_KEY`) | |
244
+ | `--openai-model` | | OpenAI model | `gpt-4o` |
245
+ | `--openai-url` | | OpenAI-compatible base URL (env: `ASKII_OPENAI_URL`) | |
246
+ | `--anthropic-key` | | Anthropic API key (env: `ASKII_ANTHROPIC_KEY`) | |
247
+ | `--anthropic-model` | | Anthropic model (env: `ASKII_ANTHROPIC_MODEL`) | `claude-opus-4-6` |
248
+ | `--mode` | | Response style: `helpful`, `funny` | `funny` |
249
+ | `--max-rounds` | | Max agent rounds for `do` / `control` / `browse` | `5` |
250
+ | `--dir` | | Working directory for `do` | cwd |
251
+ | `--code` | `-c` | Code input (alternative to stdin) | |
252
+ | `--yes` | `-y` | Auto-confirm all actions | |
253
+ | `--headless` | | Run Puppeteer headlessly for `browse` | `false` (visible) |
254
+ | `--chrome-path` | | Path to Chrome/Chromium executable for `browse` | |
255
+ | `--wiki-path` | | Path to folder with `.md` docs for wiki RAG (env: `ASKII_WIKI_PATH`) | |
256
+ | `--use-wiki` | | Inject wiki context into `ask` / `edit` / `do` (env: `ASKII_USE_WIKI=1`) | |
207
257
 
208
258
  ## Environment Variables
209
259
 
@@ -220,9 +270,23 @@ export ASKII_OLLAMA_MODEL=gemma3:270m
220
270
  export ASKII_LMSTUDIO_URL=ws://localhost:1234
221
271
  export ASKII_LMSTUDIO_MODEL=qwen/qwen3-coder-30b
222
272
 
273
+ # OpenAI
274
+ export ASKII_OPENAI_KEY=sk-...
275
+ export ASKII_OPENAI_MODEL=gpt-4o
276
+ export ASKII_OPENAI_URL= # leave empty for api.openai.com
277
+
278
+ # Anthropic
279
+ export ASKII_ANTHROPIC_KEY=sk-ant-...
280
+ export ASKII_ANTHROPIC_MODEL=claude-opus-4-6
281
+
223
282
  # Shared
224
283
  export ASKII_MODE=funny
225
284
  export ASKII_MAX_ROUNDS=5
285
+ export ASKII_CHROME_PATH=/usr/bin/chromium
286
+
287
+ # Wiki RAG
288
+ export ASKII_WIKI_PATH=./docs
289
+ export ASKII_USE_WIKI=1
226
290
  ```
227
291
 
228
292
  **PowerShell**
@@ -238,9 +302,23 @@ $env:ASKII_OLLAMA_MODEL = "gemma3:270m"
238
302
  $env:ASKII_LMSTUDIO_URL = "ws://localhost:1234"
239
303
  $env:ASKII_LMSTUDIO_MODEL = "qwen/qwen3-coder-30b"
240
304
 
305
+ # OpenAI
306
+ $env:ASKII_OPENAI_KEY = "sk-..."
307
+ $env:ASKII_OPENAI_MODEL = "gpt-4o"
308
+ $env:ASKII_OPENAI_URL = "" # leave empty for api.openai.com
309
+
310
+ # Anthropic
311
+ $env:ASKII_ANTHROPIC_KEY = "sk-ant-..."
312
+ $env:ASKII_ANTHROPIC_MODEL = "claude-opus-4-6"
313
+
241
314
  # Shared
242
315
  $env:ASKII_MODE = "funny"
243
316
  $env:ASKII_MAX_ROUNDS = "5"
317
+ $env:ASKII_CHROME_PATH = "C:\Program Files\Google\Chrome\Application\chrome.exe"
318
+
319
+ # Wiki RAG
320
+ $env:ASKII_WIKI_PATH = ".\docs"
321
+ $env:ASKII_USE_WIKI = "1"
244
322
  ```
245
323
 
246
324
  ## Platforms
@@ -278,3 +356,41 @@ askii -p lmstudio --lmstudio-model "my-model" ask "explain this function"
278
356
  askii -p lmstudio ask "explain this function"
279
357
  askii -p lmstudio --lmstudio-model "my-model" ask "explain this function"
280
358
  ```
359
+
360
+ ### OpenAI
361
+
362
+ **bash**
363
+
364
+ ```bash
365
+ askii -p openai --openai-key sk-... ask "what does this do?"
366
+ askii -p openai --openai-key sk-... --openai-model gpt-4-turbo do "add error handling"
367
+ # Azure OpenAI or any compatible API:
368
+ askii -p openai --openai-key sk-... --openai-url https://my-resource.openai.azure.com ask "explain"
369
+ ```
370
+
371
+ **PowerShell**
372
+
373
+ ```powershell
374
+ askii -p openai --openai-key sk-... ask "what does this do?"
375
+ askii -p openai --openai-key sk-... --openai-model gpt-4-turbo do "add error handling"
376
+ # Azure OpenAI or any compatible API:
377
+ askii -p openai --openai-key sk-... --openai-url https://my-resource.openai.azure.com ask "explain"
378
+ ```
379
+
380
+ ### Anthropic
381
+
382
+ **bash**
383
+
384
+ ```bash
385
+ askii -p anthropic --anthropic-key sk-ant-... ask "what does this do?"
386
+ askii -p anthropic --anthropic-key sk-ant-... --anthropic-model claude-sonnet-4-6 do "add error handling"
387
+ askii -p anthropic --anthropic-key sk-ant-... --anthropic-model claude-haiku-4-5 explain "arr.reduce((a, b) => a + b, 0)"
388
+ ```
389
+
390
+ **PowerShell**
391
+
392
+ ```powershell
393
+ askii -p anthropic --anthropic-key sk-ant-... ask "what does this do?"
394
+ askii -p anthropic --anthropic-key sk-ant-... --anthropic-model claude-sonnet-4-6 do "add error handling"
395
+ askii -p anthropic --anthropic-key sk-ant-... --anthropic-model claude-haiku-4-5 explain "arr.reduce((a, b) => a + b, 0)"
396
+ ```