askii-cli 0.1.2
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 +106 -0
- package/dist/index.js +493 -0
- package/dist/index.js.map +6 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
cat myfile.ts | askii ask "what does this do?"
|
|
25
|
+
askii ask --code "const x = 1 + 1" "is this correct?"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### `edit` — Edit code
|
|
29
|
+
|
|
30
|
+
Returns the modified code to stdout (pipe-friendly):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cat myfile.ts | askii edit "add error handling" > myfile-edited.ts
|
|
34
|
+
cat myfile.ts | askii edit "convert to async/await"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### `explain` — Explain a line of code
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
askii explain "arr.reduce((a, b) => a + b, 0)"
|
|
41
|
+
cat myfile.ts | askii explain
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### `do` — Agentic task runner
|
|
45
|
+
|
|
46
|
+
Reads the workspace structure, then creates/modifies/deletes files with your confirmation:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
askii do "create a Jest test file for src/utils.ts"
|
|
50
|
+
askii do "add a .gitignore for a Node.js project"
|
|
51
|
+
askii do --yes "scaffold a README for this project" # auto-confirm all
|
|
52
|
+
askii do --dir ./my-project "refactor index.ts"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Options
|
|
56
|
+
|
|
57
|
+
| Flag | Short | Description | Default |
|
|
58
|
+
|------|-------|-------------|---------|
|
|
59
|
+
| `--platform` | `-p` | LLM platform: `ollama`, `lmstudio` | `ollama` |
|
|
60
|
+
| `--url` | | Server URL | `http://localhost:11434` |
|
|
61
|
+
| `--model` | `-m` | Model name | `gemma3:270m` |
|
|
62
|
+
| `--mode` | | Response style: `helpful`, `funny` | `funny` |
|
|
63
|
+
| `--max-rounds` | | Max agent rounds for `do` | `5` |
|
|
64
|
+
| `--dir` | | Working directory for `do` | cwd |
|
|
65
|
+
| `--code` | `-c` | Code input (alternative to stdin) | |
|
|
66
|
+
| `--yes` | `-y` | Auto-confirm file operations in `do` | |
|
|
67
|
+
|
|
68
|
+
## Environment Variables
|
|
69
|
+
|
|
70
|
+
You can set defaults via environment variables:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
export ASKII_PLATFORM=ollama
|
|
74
|
+
export ASKII_URL=http://localhost:11434
|
|
75
|
+
export ASKII_MODEL=gemma3:270m
|
|
76
|
+
export ASKII_MODE=funny
|
|
77
|
+
export ASKII_MAX_ROUNDS=5
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Platforms
|
|
81
|
+
|
|
82
|
+
### Ollama (default)
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Start Ollama and pull a model
|
|
86
|
+
ollama pull gemma3:270m
|
|
87
|
+
|
|
88
|
+
askii ask "what is a closure?"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### LM Studio
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Start LM Studio with local server enabled
|
|
95
|
+
askii -p lmstudio -m "qwen/qwen3-coder-30b" ask "explain this function"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Build from source
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
cd cli
|
|
102
|
+
npm install
|
|
103
|
+
npm run build
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The compiled binary lands at `cli/dist/index.js`.
|