askii-cli 0.2.9 → 0.2.11

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 +65 -10
  2. package/dist/index.js +356 -336
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -100,14 +100,18 @@ askii do --dir .\my-project "refactor index.ts"
100
100
 
101
101
  The agent can use the following actions each round:
102
102
 
103
- | Action | Description | Requires confirmation |
104
- | -------- | ----------------------------------------------------- | --------------------- |
105
- | `list` | List files in a folder (`[file]` / `[folder]` labels) | No |
106
- | `view` | Read a file's contents | No |
107
- | `create` | Create a new file | Yes |
108
- | `modify` | Replace text in an existing file | Yes |
109
- | `rename` | Rename or move a file | Yes |
110
- | `delete` | Delete a file | Yes |
103
+ | Action | Description | Requires confirmation |
104
+ | ------------- | ----------------------------------------------------- | --------------------- |
105
+ | `list` | List files in a folder (`[file]` / `[folder]` labels) | No |
106
+ | `view` | Read a file's contents | No |
107
+ | `search` | Grep workspace files for a pattern | No |
108
+ | `wiki_search` | BM25 search over indexed `.md` docs (requires `--use-wiki`) | No |
109
+ | `code_search` | BM25 search over indexed code files (requires `--use-code-wiki`) | No |
110
+ | `create` | Create a new file | Yes |
111
+ | `modify` | Replace text in an existing file | Yes |
112
+ | `rename` | Rename or move a file | Yes |
113
+ | `delete` | Delete a file | Yes |
114
+ | `run` | Run a shell command | Yes (always) |
111
115
 
112
116
  The loop continues after every round — not only after reads — until the AI returns `[]` or the round limit is hit.
113
117
 
@@ -187,6 +191,47 @@ askii do --wiki-path .\docs --use-wiki "implement the auth flow described in the
187
191
 
188
192
  ---
189
193
 
194
+ ### `code-wiki-reload` — Index workspace code files
195
+
196
+ Walks all supported code files in a directory (TypeScript, Python, Go, Rust, C/C++, and more), splits them into 60-line overlapping chunks, builds a [MiniSearch](https://github.com/lucaong/minisearch) BM25 index, and saves it as `.askii-code-wiki-index.json` in the target directory. Run this once against your codebase and again whenever the code changes significantly.
197
+
198
+ Skips: `node_modules`, `dist`, `out`, `build`, `target`, `bin`, `obj`, `coverage`, `__pycache__`, `venv`, and files over 200 KB.
199
+
200
+ **bash**
201
+
202
+ ```bash
203
+ askii code-wiki-reload # indexes current directory
204
+ askii code-wiki-reload --code-wiki-path ./src # indexes a specific directory
205
+ ```
206
+
207
+ **PowerShell**
208
+
209
+ ```powershell
210
+ askii code-wiki-reload
211
+ askii code-wiki-reload --code-wiki-path .\src
212
+ ```
213
+
214
+ After indexing, pass `--code-wiki-path` and `--use-code-wiki` to any `ask`, `edit`, or `do` command to inject the top matching code chunks as context:
215
+
216
+ **bash**
217
+
218
+ ```bash
219
+ askii ask --use-code-wiki "where is the wiki index built?"
220
+ askii ask --use-code-wiki "how does the debounce work in the inline completer?"
221
+ cat src/commands.ts | askii edit --use-code-wiki "add code wiki context to the ask command"
222
+ askii do --use-code-wiki "refactor the provider functions to share a common helper"
223
+ ```
224
+
225
+ **PowerShell**
226
+
227
+ ```powershell
228
+ askii ask --use-code-wiki "where is the wiki index built?"
229
+ Get-Content src\commands.ts | askii edit --use-code-wiki "add code wiki context to the ask command"
230
+ askii do --use-code-wiki "refactor the provider functions to share a common helper"
231
+ ```
232
+
233
+ ---
234
+
190
235
  ### `browse` — Browser agent
191
236
 
192
237
  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`).
@@ -254,6 +299,8 @@ Without `--yes`, each proposed action is shown with its reasoning and requires `
254
299
  | `--chrome-path` | | Path to Chrome/Chromium executable for `browse` | |
255
300
  | `--wiki-path` | | Path to folder with `.md` docs for wiki RAG (env: `ASKII_WIKI_PATH`) | |
256
301
  | `--use-wiki` | | Inject wiki context into `ask` / `edit` / `do` (env: `ASKII_USE_WIKI=1`) | |
302
+ | `--code-wiki-path` | | Path to codebase root to index / search (env: `ASKII_CODE_WIKI_PATH`) | cwd |
303
+ | `--use-code-wiki` | | Inject code wiki context into `ask` / `edit` / `do` (env: `ASKII_USE_CODE_WIKI=1`) | |
257
304
 
258
305
  ## Environment Variables
259
306
 
@@ -284,9 +331,13 @@ export ASKII_MODE=funny
284
331
  export ASKII_MAX_ROUNDS=5
285
332
  export ASKII_CHROME_PATH=/usr/bin/chromium
286
333
 
287
- # Wiki RAG
334
+ # Docs wiki RAG
288
335
  export ASKII_WIKI_PATH=./docs
289
336
  export ASKII_USE_WIKI=1
337
+
338
+ # Code wiki RAG
339
+ export ASKII_CODE_WIKI_PATH=./src # defaults to cwd
340
+ export ASKII_USE_CODE_WIKI=1
290
341
  ```
291
342
 
292
343
  **PowerShell**
@@ -316,9 +367,13 @@ $env:ASKII_MODE = "funny"
316
367
  $env:ASKII_MAX_ROUNDS = "5"
317
368
  $env:ASKII_CHROME_PATH = "C:\Program Files\Google\Chrome\Application\chrome.exe"
318
369
 
319
- # Wiki RAG
370
+ # Docs wiki RAG
320
371
  $env:ASKII_WIKI_PATH = ".\docs"
321
372
  $env:ASKII_USE_WIKI = "1"
373
+
374
+ # Code wiki RAG
375
+ $env:ASKII_CODE_WIKI_PATH = ".\src" # defaults to cwd
376
+ $env:ASKII_USE_CODE_WIKI = "1"
322
377
  ```
323
378
 
324
379
  ## Platforms