askii-cli 0.2.4 → 0.2.6
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/README.md +103 -21
- package/dist/index.js +1119 -260
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ASKII CLI ( •\_•)>⌐■-■ (⌐■_■)
|
|
2
2
|
|
|
3
|
-
AI code assistant for your terminal. Powered by Ollama
|
|
3
|
+
AI code assistant for your terminal. Powered by Ollama, LM Studio, or OpenAI.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -100,14 +100,14 @@ 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
|
|
104
|
-
| -------- |
|
|
105
|
-
| `list` | List files in a folder (`[file]` / `[folder]` labels)
|
|
106
|
-
| `view` | Read a file's contents
|
|
107
|
-
| `create` | Create a new file
|
|
108
|
-
| `modify` | Replace text in an existing file
|
|
109
|
-
| `rename` | Rename or move a file
|
|
110
|
-
| `delete` | Delete a file
|
|
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 |
|
|
111
111
|
|
|
112
112
|
The loop continues after every round — not only after reads — until the AI returns `[]` or the round limit is hit.
|
|
113
113
|
|
|
@@ -138,6 +138,7 @@ askii control -p lmstudio --lmstudio-model llava-1.5 "open the browser"
|
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
Each round the AI can return one of:
|
|
141
|
+
|
|
141
142
|
- **mouse_move** — move the cursor to `(x, y)`
|
|
142
143
|
- **mouse_left_click** — left-click at `(x, y)`
|
|
143
144
|
- **mouse_right_click** — right-click at `(x, y)`
|
|
@@ -148,20 +149,69 @@ Without `--yes`, each proposed action is shown with its reasoning and requires `
|
|
|
148
149
|
|
|
149
150
|
---
|
|
150
151
|
|
|
152
|
+
### `browse` — Browser agent
|
|
153
|
+
|
|
154
|
+
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
|
+
|
|
156
|
+
By default the browser window is **visible**. Pass `--headless` to run in the background.
|
|
157
|
+
|
|
158
|
+
> **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.
|
|
159
|
+
|
|
160
|
+
**bash**
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
askii browse --ollama-model llava "go to https://example.com and click Learn more"
|
|
164
|
+
askii browse --yes --ollama-model llava "search Google for Node.js and open the first result"
|
|
165
|
+
askii browse --headless --yes --ollama-model llava "check the title of https://github.com"
|
|
166
|
+
askii browse --max-rounds 10 --ollama-model llava "fill in the login form on example.com"
|
|
167
|
+
askii browse -p lmstudio --lmstudio-model llava-1.5 "go to news.ycombinator.com"
|
|
168
|
+
askii browse --chrome-path "/usr/bin/chromium" --ollama-model llava "go to example.com"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**PowerShell**
|
|
172
|
+
|
|
173
|
+
```powershell
|
|
174
|
+
askii browse --ollama-model llava "go to https://example.com and click Learn more"
|
|
175
|
+
askii browse --yes --ollama-model llava "search Google for Node.js and open the first result"
|
|
176
|
+
askii browse --headless --yes --ollama-model llava "check the title of https://github.com"
|
|
177
|
+
askii browse --max-rounds 10 --ollama-model llava "fill in the login form on example.com"
|
|
178
|
+
askii browse -p lmstudio --lmstudio-model llava-1.5 "go to news.ycombinator.com"
|
|
179
|
+
askii browse --chrome-path "C:\Program Files\Google\Chrome\Application\chrome.exe" --ollama-model llava "go to example.com"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Each round the AI can return one of:
|
|
183
|
+
|
|
184
|
+
- **goto** — navigate to a URL
|
|
185
|
+
- **click** — click an element by CSS selector
|
|
186
|
+
- **type** — type text into an element by CSS selector (clears existing value first)
|
|
187
|
+
- **wait_for** — wait until a CSS selector appears in the DOM
|
|
188
|
+
- **back** — navigate back in browser history
|
|
189
|
+
- **forward** — navigate forward in browser history
|
|
190
|
+
- **DONE** — task complete, stop the loop
|
|
191
|
+
|
|
192
|
+
Without `--yes`, each proposed action is shown with its reasoning and requires `y` confirmation before executing.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
151
196
|
## Options
|
|
152
197
|
|
|
153
|
-
| Flag
|
|
154
|
-
|
|
|
155
|
-
| `--platform`
|
|
156
|
-
| `--ollama-url`
|
|
157
|
-
| `--lmstudio-url`
|
|
158
|
-
| `--ollama-model`
|
|
159
|
-
| `--lmstudio-model`
|
|
160
|
-
| `--
|
|
161
|
-
| `--
|
|
162
|
-
| `--
|
|
163
|
-
| `--
|
|
164
|
-
| `--
|
|
198
|
+
| Flag | Short | Description | Default |
|
|
199
|
+
| ------------------ | ----- | ---------------------------------------------------- | ------------------------ |
|
|
200
|
+
| `--platform` | `-p` | LLM platform: `ollama`, `lmstudio`, `openai` | `ollama` |
|
|
201
|
+
| `--ollama-url` | | Ollama server URL | `http://localhost:11434` |
|
|
202
|
+
| `--lmstudio-url` | | LM Studio server URL | `ws://localhost:1234` |
|
|
203
|
+
| `--ollama-model` | | Ollama model | `gemma3:270m` |
|
|
204
|
+
| `--lmstudio-model` | | LM Studio model | `qwen/qwen3-coder-30b` |
|
|
205
|
+
| `--openai-key` | | OpenAI API key (env: `ASKII_OPENAI_KEY`) | |
|
|
206
|
+
| `--openai-model` | | OpenAI model | `gpt-4o` |
|
|
207
|
+
| `--openai-url` | | OpenAI-compatible base URL (env: `ASKII_OPENAI_URL`) | |
|
|
208
|
+
| `--mode` | | Response style: `helpful`, `funny` | `funny` |
|
|
209
|
+
| `--max-rounds` | | Max agent rounds for `do` / `control` / `browse` | `5` |
|
|
210
|
+
| `--dir` | | Working directory for `do` | cwd |
|
|
211
|
+
| `--code` | `-c` | Code input (alternative to stdin) | |
|
|
212
|
+
| `--yes` | `-y` | Auto-confirm all actions | |
|
|
213
|
+
| `--headless` | | Run Puppeteer headlessly for `browse` | `false` (visible) |
|
|
214
|
+
| `--chrome-path` | | Path to Chrome/Chromium executable for `browse` | |
|
|
165
215
|
|
|
166
216
|
## Environment Variables
|
|
167
217
|
|
|
@@ -178,9 +228,15 @@ export ASKII_OLLAMA_MODEL=gemma3:270m
|
|
|
178
228
|
export ASKII_LMSTUDIO_URL=ws://localhost:1234
|
|
179
229
|
export ASKII_LMSTUDIO_MODEL=qwen/qwen3-coder-30b
|
|
180
230
|
|
|
231
|
+
# OpenAI
|
|
232
|
+
export ASKII_OPENAI_KEY=sk-...
|
|
233
|
+
export ASKII_OPENAI_MODEL=gpt-4o
|
|
234
|
+
export ASKII_OPENAI_URL= # leave empty for api.openai.com
|
|
235
|
+
|
|
181
236
|
# Shared
|
|
182
237
|
export ASKII_MODE=funny
|
|
183
238
|
export ASKII_MAX_ROUNDS=5
|
|
239
|
+
export ASKII_CHROME_PATH=/usr/bin/chromium
|
|
184
240
|
```
|
|
185
241
|
|
|
186
242
|
**PowerShell**
|
|
@@ -196,9 +252,15 @@ $env:ASKII_OLLAMA_MODEL = "gemma3:270m"
|
|
|
196
252
|
$env:ASKII_LMSTUDIO_URL = "ws://localhost:1234"
|
|
197
253
|
$env:ASKII_LMSTUDIO_MODEL = "qwen/qwen3-coder-30b"
|
|
198
254
|
|
|
255
|
+
# OpenAI
|
|
256
|
+
$env:ASKII_OPENAI_KEY = "sk-..."
|
|
257
|
+
$env:ASKII_OPENAI_MODEL = "gpt-4o"
|
|
258
|
+
$env:ASKII_OPENAI_URL = "" # leave empty for api.openai.com
|
|
259
|
+
|
|
199
260
|
# Shared
|
|
200
261
|
$env:ASKII_MODE = "funny"
|
|
201
262
|
$env:ASKII_MAX_ROUNDS = "5"
|
|
263
|
+
$env:ASKII_CHROME_PATH = "C:\Program Files\Google\Chrome\Application\chrome.exe"
|
|
202
264
|
```
|
|
203
265
|
|
|
204
266
|
## Platforms
|
|
@@ -236,3 +298,23 @@ askii -p lmstudio --lmstudio-model "my-model" ask "explain this function"
|
|
|
236
298
|
askii -p lmstudio ask "explain this function"
|
|
237
299
|
askii -p lmstudio --lmstudio-model "my-model" ask "explain this function"
|
|
238
300
|
```
|
|
301
|
+
|
|
302
|
+
### OpenAI
|
|
303
|
+
|
|
304
|
+
**bash**
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
askii -p openai --openai-key sk-... ask "what does this do?"
|
|
308
|
+
askii -p openai --openai-key sk-... --openai-model gpt-4-turbo do "add error handling"
|
|
309
|
+
# Azure OpenAI or any compatible API:
|
|
310
|
+
askii -p openai --openai-key sk-... --openai-url https://my-resource.openai.azure.com ask "explain"
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
**PowerShell**
|
|
314
|
+
|
|
315
|
+
```powershell
|
|
316
|
+
askii -p openai --openai-key sk-... ask "what does this do?"
|
|
317
|
+
askii -p openai --openai-key sk-... --openai-model gpt-4-turbo do "add error handling"
|
|
318
|
+
# Azure OpenAI or any compatible API:
|
|
319
|
+
askii -p openai --openai-key sk-... --openai-url https://my-resource.openai.azure.com ask "explain"
|
|
320
|
+
```
|