askii-cli 0.2.3 → 0.2.4

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 CHANGED
@@ -1,238 +1,238 @@
1
- # ASKII CLI ( •\_•)>⌐■-■ (⌐■_■)
2
-
3
- AI code assistant for your terminal. Powered by Ollama or LM Studio.
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install -g askii-cli
9
- ```
10
-
11
- Or run without installing:
12
-
13
- ```bash
14
- npx askii-cli <command>
15
- ```
16
-
17
- ## Commands
18
-
19
- ### `ask` — Ask a question about code
20
-
21
- Pipe code via stdin or use `--code`:
22
-
23
- **bash**
24
-
25
- ```bash
26
- cat myfile.ts | askii ask "what does this do?"
27
- askii ask --code "const x = 1 + 1" "is this correct?"
28
- ```
29
-
30
- **PowerShell**
31
-
32
- ```powershell
33
- Get-Content myfile.ts | askii ask "what does this do?"
34
- askii ask --code "const x = 1 + 1" "is this correct?"
35
- ```
36
-
37
- ---
38
-
39
- ### `edit` — Edit code
40
-
41
- Returns the modified code to stdout (pipe-friendly):
42
-
43
- **bash**
44
-
45
- ```bash
46
- cat myfile.ts | askii edit "add error handling" > myfile-edited.ts
47
- cat myfile.ts | askii edit "convert to async/await"
48
- ```
49
-
50
- **PowerShell**
51
-
52
- ```powershell
53
- Get-Content myfile.ts | askii edit "add error handling" | Set-Content myfile-edited.ts
54
- Get-Content myfile.ts | askii edit "convert to async/await"
55
- ```
56
-
57
- ---
58
-
59
- ### `explain` — Explain a line of code
60
-
61
- **bash**
62
-
63
- ```bash
64
- askii explain "arr.reduce((a, b) => a + b, 0)"
65
- cat myfile.ts | askii explain
66
- ```
67
-
68
- **PowerShell**
69
-
70
- ```powershell
71
- askii explain "arr.reduce((a, b) => a + b, 0)"
72
- Get-Content myfile.ts | askii explain
73
- ```
74
-
75
- ---
76
-
77
- ### `do` — Agentic task runner
78
-
79
- Prints the working directory's top-level file listing, then runs an agent loop that creates, modifies, renames, deletes, views, and lists files until the task is done or `--max-rounds` is reached.
80
-
81
- **bash**
82
-
83
- ```bash
84
- askii do "create a Jest test file for src/utils.ts"
85
- askii do "rename all .js files to .ts in the src folder"
86
- askii do "add a .gitignore for a Node.js project"
87
- askii do --yes "scaffold a README for this project" # auto-confirm all
88
- askii do --dir ./my-project "refactor index.ts"
89
- ```
90
-
91
- **PowerShell**
92
-
93
- ```powershell
94
- askii do "create a Jest test file for src/utils.ts"
95
- askii do "rename all .js files to .ts in the src folder"
96
- askii do "add a .gitignore for a Node.js project"
97
- askii do --yes "scaffold a README for this project" # auto-confirm all
98
- askii do --dir .\my-project "refactor index.ts"
99
- ```
100
-
101
- The agent can use the following actions each round:
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 |
111
-
112
- The loop continues after every round — not only after reads — until the AI returns `[]` or the round limit is hit.
113
-
114
- ---
115
-
116
- ### `control` — Screen control agent
117
-
118
- Takes a screenshot, sends it to the AI, and executes the returned mouse/keyboard action. Repeats until the AI returns `DONE` or `--max-rounds` is reached. Requires a **vision-capable model** (e.g. `llava`, `moondream2`).
119
-
120
- > **Linux**: requires `xdotool` for mouse/keyboard control (`sudo apt install xdotool` or equivalent).
121
-
122
- **bash**
123
-
124
- ```bash
125
- askii control --ollama-model llava "open Notepad and type hello world"
126
- askii control --yes --ollama-model llava "click the search bar and search for cats"
127
- askii control --max-rounds 10 --ollama-model llava "fill in the login form"
128
- askii control -p lmstudio --lmstudio-model llava-1.5 "open the browser"
129
- ```
130
-
131
- **PowerShell**
132
-
133
- ```powershell
134
- askii control --ollama-model llava "open Notepad and type hello world"
135
- askii control --yes --ollama-model llava "click the search bar and search for cats"
136
- askii control --max-rounds 10 --ollama-model llava "fill in the login form"
137
- askii control -p lmstudio --lmstudio-model llava-1.5 "open the browser"
138
- ```
139
-
140
- Each round the AI can return one of:
141
- - **mouse_move** — move the cursor to `(x, y)`
142
- - **mouse_left_click** — left-click at `(x, y)`
143
- - **mouse_right_click** — right-click at `(x, y)`
144
- - **keyboard_input** — type a string
145
- - **DONE** — task complete, stop the loop
146
-
147
- Without `--yes`, each proposed action is shown with its reasoning and requires `y` confirmation before executing.
148
-
149
- ---
150
-
151
- ## Options
152
-
153
- | Flag | Short | Description | Default |
154
- | --------------------- | ----- | ----------------------------------------------- | -------------------------- |
155
- | `--platform` | `-p` | LLM platform: `ollama`, `lmstudio` | `ollama` |
156
- | `--ollama-url` | | Ollama server URL | `http://localhost:11434` |
157
- | `--lmstudio-url` | | LM Studio server URL | `ws://localhost:1234` |
158
- | `--ollama-model` | | Ollama model | `gemma3:270m` |
159
- | `--lmstudio-model` | | LM Studio model | `qwen/qwen3-coder-30b` |
160
- | `--mode` | | Response style: `helpful`, `funny` | `funny` |
161
- | `--max-rounds` | | Max agent rounds for `do` / `control` | `5` |
162
- | `--dir` | | Working directory for `do` | cwd |
163
- | `--code` | `-c` | Code input (alternative to stdin) | |
164
- | `--yes` | `-y` | Auto-confirm all actions | |
165
-
166
- ## Environment Variables
167
-
168
- **bash**
169
-
170
- ```bash
171
- export ASKII_PLATFORM=ollama
172
-
173
- # Ollama
174
- export ASKII_OLLAMA_URL=http://localhost:11434
175
- export ASKII_OLLAMA_MODEL=gemma3:270m
176
-
177
- # LM Studio
178
- export ASKII_LMSTUDIO_URL=ws://localhost:1234
179
- export ASKII_LMSTUDIO_MODEL=qwen/qwen3-coder-30b
180
-
181
- # Shared
182
- export ASKII_MODE=funny
183
- export ASKII_MAX_ROUNDS=5
184
- ```
185
-
186
- **PowerShell**
187
-
188
- ```powershell
189
- $env:ASKII_PLATFORM = "ollama"
190
-
191
- # Ollama
192
- $env:ASKII_OLLAMA_URL = "http://localhost:11434"
193
- $env:ASKII_OLLAMA_MODEL = "gemma3:270m"
194
-
195
- # LM Studio
196
- $env:ASKII_LMSTUDIO_URL = "ws://localhost:1234"
197
- $env:ASKII_LMSTUDIO_MODEL = "qwen/qwen3-coder-30b"
198
-
199
- # Shared
200
- $env:ASKII_MODE = "funny"
201
- $env:ASKII_MAX_ROUNDS = "5"
202
- ```
203
-
204
- ## Platforms
205
-
206
- ### Ollama (default)
207
-
208
- **bash**
209
-
210
- ```bash
211
- ollama pull gemma3:270m
212
- askii ask "what is a closure?"
213
- ```
214
-
215
- **PowerShell**
216
-
217
- ```powershell
218
- ollama pull gemma3:270m
219
- askii ask "what is a closure?"
220
- ```
221
-
222
- ### LM Studio
223
-
224
- **bash**
225
-
226
- ```bash
227
- # Start LM Studio with local server enabled
228
- askii -p lmstudio ask "explain this function"
229
- askii -p lmstudio --lmstudio-model "my-model" ask "explain this function"
230
- ```
231
-
232
- **PowerShell**
233
-
234
- ```powershell
235
- # Start LM Studio with local server enabled
236
- askii -p lmstudio ask "explain this function"
237
- askii -p lmstudio --lmstudio-model "my-model" ask "explain this function"
238
- ```
1
+ # ASKII CLI ( •\_•)>⌐■-■ (⌐■_■)
2
+
3
+ AI code assistant for your terminal. Powered by Ollama or LM Studio.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g askii-cli
9
+ ```
10
+
11
+ Or run without installing:
12
+
13
+ ```bash
14
+ npx askii-cli <command>
15
+ ```
16
+
17
+ ## Commands
18
+
19
+ ### `ask` — Ask a question about code
20
+
21
+ Pipe code via stdin or use `--code`:
22
+
23
+ **bash**
24
+
25
+ ```bash
26
+ cat myfile.ts | askii ask "what does this do?"
27
+ askii ask --code "const x = 1 + 1" "is this correct?"
28
+ ```
29
+
30
+ **PowerShell**
31
+
32
+ ```powershell
33
+ Get-Content myfile.ts | askii ask "what does this do?"
34
+ askii ask --code "const x = 1 + 1" "is this correct?"
35
+ ```
36
+
37
+ ---
38
+
39
+ ### `edit` — Edit code
40
+
41
+ Returns the modified code to stdout (pipe-friendly):
42
+
43
+ **bash**
44
+
45
+ ```bash
46
+ cat myfile.ts | askii edit "add error handling" > myfile-edited.ts
47
+ cat myfile.ts | askii edit "convert to async/await"
48
+ ```
49
+
50
+ **PowerShell**
51
+
52
+ ```powershell
53
+ Get-Content myfile.ts | askii edit "add error handling" | Set-Content myfile-edited.ts
54
+ Get-Content myfile.ts | askii edit "convert to async/await"
55
+ ```
56
+
57
+ ---
58
+
59
+ ### `explain` — Explain a line of code
60
+
61
+ **bash**
62
+
63
+ ```bash
64
+ askii explain "arr.reduce((a, b) => a + b, 0)"
65
+ cat myfile.ts | askii explain
66
+ ```
67
+
68
+ **PowerShell**
69
+
70
+ ```powershell
71
+ askii explain "arr.reduce((a, b) => a + b, 0)"
72
+ Get-Content myfile.ts | askii explain
73
+ ```
74
+
75
+ ---
76
+
77
+ ### `do` — Agentic task runner
78
+
79
+ Prints the working directory's top-level file listing, then runs an agent loop that creates, modifies, renames, deletes, views, and lists files until the task is done or `--max-rounds` is reached.
80
+
81
+ **bash**
82
+
83
+ ```bash
84
+ askii do "create a Jest test file for src/utils.ts"
85
+ askii do "rename all .js files to .ts in the src folder"
86
+ askii do "add a .gitignore for a Node.js project"
87
+ askii do --yes "scaffold a README for this project" # auto-confirm all
88
+ askii do --dir ./my-project "refactor index.ts"
89
+ ```
90
+
91
+ **PowerShell**
92
+
93
+ ```powershell
94
+ askii do "create a Jest test file for src/utils.ts"
95
+ askii do "rename all .js files to .ts in the src folder"
96
+ askii do "add a .gitignore for a Node.js project"
97
+ askii do --yes "scaffold a README for this project" # auto-confirm all
98
+ askii do --dir .\my-project "refactor index.ts"
99
+ ```
100
+
101
+ The agent can use the following actions each round:
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 |
111
+
112
+ The loop continues after every round — not only after reads — until the AI returns `[]` or the round limit is hit.
113
+
114
+ ---
115
+
116
+ ### `control` — Screen control agent
117
+
118
+ Takes a screenshot, sends it to the AI, and executes the returned mouse/keyboard action. Repeats until the AI returns `DONE` or `--max-rounds` is reached. Requires a **vision-capable model** (e.g. `llava`, `moondream2`).
119
+
120
+ > **Linux**: requires `xdotool` for mouse/keyboard control (`sudo apt install xdotool` or equivalent).
121
+
122
+ **bash**
123
+
124
+ ```bash
125
+ askii control --ollama-model llava "open Notepad and type hello world"
126
+ askii control --yes --ollama-model llava "click the search bar and search for cats"
127
+ askii control --max-rounds 10 --ollama-model llava "fill in the login form"
128
+ askii control -p lmstudio --lmstudio-model llava-1.5 "open the browser"
129
+ ```
130
+
131
+ **PowerShell**
132
+
133
+ ```powershell
134
+ askii control --ollama-model llava "open Notepad and type hello world"
135
+ askii control --yes --ollama-model llava "click the search bar and search for cats"
136
+ askii control --max-rounds 10 --ollama-model llava "fill in the login form"
137
+ askii control -p lmstudio --lmstudio-model llava-1.5 "open the browser"
138
+ ```
139
+
140
+ Each round the AI can return one of:
141
+ - **mouse_move** — move the cursor to `(x, y)`
142
+ - **mouse_left_click** — left-click at `(x, y)`
143
+ - **mouse_right_click** — right-click at `(x, y)`
144
+ - **keyboard_input** — type a string
145
+ - **DONE** — task complete, stop the loop
146
+
147
+ Without `--yes`, each proposed action is shown with its reasoning and requires `y` confirmation before executing.
148
+
149
+ ---
150
+
151
+ ## Options
152
+
153
+ | Flag | Short | Description | Default |
154
+ | --------------------- | ----- | ----------------------------------------------- | -------------------------- |
155
+ | `--platform` | `-p` | LLM platform: `ollama`, `lmstudio` | `ollama` |
156
+ | `--ollama-url` | | Ollama server URL | `http://localhost:11434` |
157
+ | `--lmstudio-url` | | LM Studio server URL | `ws://localhost:1234` |
158
+ | `--ollama-model` | | Ollama model | `gemma3:270m` |
159
+ | `--lmstudio-model` | | LM Studio model | `qwen/qwen3-coder-30b` |
160
+ | `--mode` | | Response style: `helpful`, `funny` | `funny` |
161
+ | `--max-rounds` | | Max agent rounds for `do` / `control` | `5` |
162
+ | `--dir` | | Working directory for `do` | cwd |
163
+ | `--code` | `-c` | Code input (alternative to stdin) | |
164
+ | `--yes` | `-y` | Auto-confirm all actions | |
165
+
166
+ ## Environment Variables
167
+
168
+ **bash**
169
+
170
+ ```bash
171
+ export ASKII_PLATFORM=ollama
172
+
173
+ # Ollama
174
+ export ASKII_OLLAMA_URL=http://localhost:11434
175
+ export ASKII_OLLAMA_MODEL=gemma3:270m
176
+
177
+ # LM Studio
178
+ export ASKII_LMSTUDIO_URL=ws://localhost:1234
179
+ export ASKII_LMSTUDIO_MODEL=qwen/qwen3-coder-30b
180
+
181
+ # Shared
182
+ export ASKII_MODE=funny
183
+ export ASKII_MAX_ROUNDS=5
184
+ ```
185
+
186
+ **PowerShell**
187
+
188
+ ```powershell
189
+ $env:ASKII_PLATFORM = "ollama"
190
+
191
+ # Ollama
192
+ $env:ASKII_OLLAMA_URL = "http://localhost:11434"
193
+ $env:ASKII_OLLAMA_MODEL = "gemma3:270m"
194
+
195
+ # LM Studio
196
+ $env:ASKII_LMSTUDIO_URL = "ws://localhost:1234"
197
+ $env:ASKII_LMSTUDIO_MODEL = "qwen/qwen3-coder-30b"
198
+
199
+ # Shared
200
+ $env:ASKII_MODE = "funny"
201
+ $env:ASKII_MAX_ROUNDS = "5"
202
+ ```
203
+
204
+ ## Platforms
205
+
206
+ ### Ollama (default)
207
+
208
+ **bash**
209
+
210
+ ```bash
211
+ ollama pull gemma3:270m
212
+ askii ask "what is a closure?"
213
+ ```
214
+
215
+ **PowerShell**
216
+
217
+ ```powershell
218
+ ollama pull gemma3:270m
219
+ askii ask "what is a closure?"
220
+ ```
221
+
222
+ ### LM Studio
223
+
224
+ **bash**
225
+
226
+ ```bash
227
+ # Start LM Studio with local server enabled
228
+ askii -p lmstudio ask "explain this function"
229
+ askii -p lmstudio --lmstudio-model "my-model" ask "explain this function"
230
+ ```
231
+
232
+ **PowerShell**
233
+
234
+ ```powershell
235
+ # Start LM Studio with local server enabled
236
+ askii -p lmstudio ask "explain this function"
237
+ askii -p lmstudio --lmstudio-model "my-model" ask "explain this function"
238
+ ```