askii-cli 0.1.2 → 0.2.0
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 +138 -23
- package/dist/index.js +139 -113
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ASKII CLI (
|
|
1
|
+
# ASKII CLI ( •\_•)>⌐■-■ (⌐■_■)
|
|
2
2
|
|
|
3
3
|
AI code assistant for your terminal. Powered by Ollama or LM Studio.
|
|
4
4
|
|
|
@@ -20,31 +20,66 @@ npx askii-cli <command>
|
|
|
20
20
|
|
|
21
21
|
Pipe code via stdin or use `--code`:
|
|
22
22
|
|
|
23
|
+
**bash**
|
|
24
|
+
|
|
23
25
|
```bash
|
|
24
26
|
cat myfile.ts | askii ask "what does this do?"
|
|
25
27
|
askii ask --code "const x = 1 + 1" "is this correct?"
|
|
26
28
|
```
|
|
27
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
|
+
|
|
28
39
|
### `edit` — Edit code
|
|
29
40
|
|
|
30
41
|
Returns the modified code to stdout (pipe-friendly):
|
|
31
42
|
|
|
43
|
+
**bash**
|
|
44
|
+
|
|
32
45
|
```bash
|
|
33
46
|
cat myfile.ts | askii edit "add error handling" > myfile-edited.ts
|
|
34
47
|
cat myfile.ts | askii edit "convert to async/await"
|
|
35
48
|
```
|
|
36
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
|
+
|
|
37
59
|
### `explain` — Explain a line of code
|
|
38
60
|
|
|
61
|
+
**bash**
|
|
62
|
+
|
|
39
63
|
```bash
|
|
40
64
|
askii explain "arr.reduce((a, b) => a + b, 0)"
|
|
41
65
|
cat myfile.ts | askii explain
|
|
42
66
|
```
|
|
43
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
|
+
|
|
44
77
|
### `do` — Agentic task runner
|
|
45
78
|
|
|
46
79
|
Reads the workspace structure, then creates/modifies/deletes files with your confirmation:
|
|
47
80
|
|
|
81
|
+
**bash**
|
|
82
|
+
|
|
48
83
|
```bash
|
|
49
84
|
askii do "create a Jest test file for src/utils.ts"
|
|
50
85
|
askii do "add a .gitignore for a Node.js project"
|
|
@@ -52,55 +87,135 @@ askii do --yes "scaffold a README for this project" # auto-confirm all
|
|
|
52
87
|
askii do --dir ./my-project "refactor index.ts"
|
|
53
88
|
```
|
|
54
89
|
|
|
90
|
+
**PowerShell**
|
|
91
|
+
|
|
92
|
+
```powershell
|
|
93
|
+
askii do "create a Jest test file for src/utils.ts"
|
|
94
|
+
askii do "add a .gitignore for a Node.js project"
|
|
95
|
+
askii do --yes "scaffold a README for this project" # auto-confirm all
|
|
96
|
+
askii do --dir .\my-project "refactor index.ts"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### `control` — Screen control agent
|
|
102
|
+
|
|
103
|
+
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`).
|
|
104
|
+
|
|
105
|
+
**bash**
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
askii control --ollama-model llava "open Notepad and type hello world"
|
|
109
|
+
askii control --yes --ollama-model llava "click the search bar and search for cats"
|
|
110
|
+
askii control --max-rounds 10 --ollama-model llava "fill in the login form"
|
|
111
|
+
askii control -p lmstudio --lmstudio-model llava-1.5 "open the browser"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**PowerShell**
|
|
115
|
+
|
|
116
|
+
```powershell
|
|
117
|
+
askii control --ollama-model llava "open Notepad and type hello world"
|
|
118
|
+
askii control --yes --ollama-model llava "click the search bar and search for cats"
|
|
119
|
+
askii control --max-rounds 10 --ollama-model llava "fill in the login form"
|
|
120
|
+
askii control -p lmstudio --lmstudio-model llava-1.5 "open the browser"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Each round the AI can return one of:
|
|
124
|
+
- **mouse_move** — move the cursor to `(x, y)`
|
|
125
|
+
- **mouse_left_click** — left-click at `(x, y)`
|
|
126
|
+
- **mouse_right_click** — right-click at `(x, y)`
|
|
127
|
+
- **keyboard_input** — type a string
|
|
128
|
+
- **DONE** — task complete, stop the loop
|
|
129
|
+
|
|
130
|
+
Without `--yes`, each proposed action is shown with its reasoning and requires `y` confirmation before executing.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
55
134
|
## Options
|
|
56
135
|
|
|
57
|
-
| Flag
|
|
58
|
-
|
|
59
|
-
| `--platform`
|
|
60
|
-
| `--url`
|
|
61
|
-
| `--
|
|
62
|
-
| `--
|
|
63
|
-
| `--
|
|
64
|
-
| `--
|
|
65
|
-
| `--
|
|
66
|
-
| `--
|
|
136
|
+
| Flag | Short | Description | Default |
|
|
137
|
+
| --------------------- | ----- | ----------------------------------------------- | -------------------------- |
|
|
138
|
+
| `--platform` | `-p` | LLM platform: `ollama`, `lmstudio` | `ollama` |
|
|
139
|
+
| `--ollama-url` | | Ollama server URL | `http://localhost:11434` |
|
|
140
|
+
| `--lmstudio-url` | | LM Studio server URL | `ws://localhost:1234` |
|
|
141
|
+
| `--ollama-model` | | Ollama model | `gemma3:270m` |
|
|
142
|
+
| `--lmstudio-model` | | LM Studio model | `qwen/qwen3-coder-30b` |
|
|
143
|
+
| `--mode` | | Response style: `helpful`, `funny` | `funny` |
|
|
144
|
+
| `--max-rounds` | | Max agent rounds for `do` / `control` | `5` |
|
|
145
|
+
| `--dir` | | Working directory for `do` | cwd |
|
|
146
|
+
| `--code` | `-c` | Code input (alternative to stdin) | |
|
|
147
|
+
| `--yes` | `-y` | Auto-confirm all actions | |
|
|
67
148
|
|
|
68
149
|
## Environment Variables
|
|
69
150
|
|
|
70
|
-
|
|
151
|
+
**bash**
|
|
71
152
|
|
|
72
153
|
```bash
|
|
73
154
|
export ASKII_PLATFORM=ollama
|
|
74
|
-
|
|
75
|
-
|
|
155
|
+
|
|
156
|
+
# Ollama
|
|
157
|
+
export ASKII_OLLAMA_URL=http://localhost:11434
|
|
158
|
+
export ASKII_OLLAMA_MODEL=gemma3:270m
|
|
159
|
+
|
|
160
|
+
# LM Studio
|
|
161
|
+
export ASKII_LMSTUDIO_URL=ws://localhost:1234
|
|
162
|
+
export ASKII_LMSTUDIO_MODEL=qwen/qwen3-coder-30b
|
|
163
|
+
|
|
164
|
+
# Shared
|
|
76
165
|
export ASKII_MODE=funny
|
|
77
166
|
export ASKII_MAX_ROUNDS=5
|
|
78
167
|
```
|
|
79
168
|
|
|
169
|
+
**PowerShell**
|
|
170
|
+
|
|
171
|
+
```powershell
|
|
172
|
+
$env:ASKII_PLATFORM = "ollama"
|
|
173
|
+
|
|
174
|
+
# Ollama
|
|
175
|
+
$env:ASKII_OLLAMA_URL = "http://localhost:11434"
|
|
176
|
+
$env:ASKII_OLLAMA_MODEL = "gemma3:270m"
|
|
177
|
+
|
|
178
|
+
# LM Studio
|
|
179
|
+
$env:ASKII_LMSTUDIO_URL = "ws://localhost:1234"
|
|
180
|
+
$env:ASKII_LMSTUDIO_MODEL = "qwen/qwen3-coder-30b"
|
|
181
|
+
|
|
182
|
+
# Shared
|
|
183
|
+
$env:ASKII_MODE = "funny"
|
|
184
|
+
$env:ASKII_MAX_ROUNDS = "5"
|
|
185
|
+
```
|
|
186
|
+
|
|
80
187
|
## Platforms
|
|
81
188
|
|
|
82
189
|
### Ollama (default)
|
|
83
190
|
|
|
191
|
+
**bash**
|
|
192
|
+
|
|
84
193
|
```bash
|
|
85
|
-
# Start Ollama and pull a model
|
|
86
194
|
ollama pull gemma3:270m
|
|
195
|
+
askii ask "what is a closure?"
|
|
196
|
+
```
|
|
87
197
|
|
|
198
|
+
**PowerShell**
|
|
199
|
+
|
|
200
|
+
```powershell
|
|
201
|
+
ollama pull gemma3:270m
|
|
88
202
|
askii ask "what is a closure?"
|
|
89
203
|
```
|
|
90
204
|
|
|
91
205
|
### LM Studio
|
|
92
206
|
|
|
207
|
+
**bash**
|
|
208
|
+
|
|
93
209
|
```bash
|
|
94
210
|
# Start LM Studio with local server enabled
|
|
95
|
-
askii -p lmstudio
|
|
211
|
+
askii -p lmstudio ask "explain this function"
|
|
212
|
+
askii -p lmstudio --lmstudio-model "my-model" ask "explain this function"
|
|
96
213
|
```
|
|
97
214
|
|
|
98
|
-
|
|
215
|
+
**PowerShell**
|
|
99
216
|
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
217
|
+
```powershell
|
|
218
|
+
# Start LM Studio with local server enabled
|
|
219
|
+
askii -p lmstudio ask "explain this function"
|
|
220
|
+
askii -p lmstudio --lmstudio-model "my-model" ask "explain this function"
|
|
104
221
|
```
|
|
105
|
-
|
|
106
|
-
The compiled binary lands at `cli/dist/index.js`.
|