@aiiware/aii 0.2.1 → 0.2.3
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 +100 -77
- package/bin/aii +327 -309
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
# @aiiware/aii
|
|
2
2
|
|
|
3
|
-
**AI-powered CLI assistant**
|
|
3
|
+
**AI-powered CLI assistant** with autonomous tool execution. An intelligent agent that can read, write, search, and execute commands in your terminal.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
Install globally to use the `aii` command anywhere:
|
|
8
|
-
|
|
9
7
|
```bash
|
|
10
8
|
npm install -g @aiiware/aii
|
|
11
9
|
```
|
|
@@ -18,105 +16,109 @@ npm install -g @aiiware/aii
|
|
|
18
16
|
## Quick Start
|
|
19
17
|
|
|
20
18
|
```bash
|
|
21
|
-
#
|
|
22
|
-
aii
|
|
19
|
+
# Start interactive agent mode
|
|
20
|
+
aii
|
|
21
|
+
|
|
22
|
+
# Or run a single query
|
|
23
|
+
aii "explain what this project does"
|
|
23
24
|
|
|
24
25
|
# Pipe content for processing
|
|
25
26
|
cat error.log | aii "summarize the errors"
|
|
26
27
|
|
|
27
|
-
#
|
|
28
|
-
aii
|
|
29
|
-
|
|
30
|
-
# Clean output (just the result)
|
|
31
|
-
aii "translate hello to spanish" --clean
|
|
32
|
-
|
|
33
|
-
# Use a specific model
|
|
34
|
-
aii "complex analysis" --model gpt-4o
|
|
28
|
+
# Auto-approve tool execution
|
|
29
|
+
aii --auto
|
|
35
30
|
```
|
|
36
31
|
|
|
37
|
-
##
|
|
32
|
+
## Agent Mode (Default)
|
|
33
|
+
|
|
34
|
+
Aii runs as an intelligent agent that can autonomously execute tools to complete tasks:
|
|
38
35
|
|
|
39
|
-
### AI Query (default)
|
|
40
36
|
```bash
|
|
41
|
-
aii
|
|
42
|
-
aii "your
|
|
43
|
-
aii "your question" --standard # Result + metrics (default)
|
|
44
|
-
aii "your question" --thinking # Full reasoning
|
|
37
|
+
aii # Start interactive session
|
|
38
|
+
aii "your task" # Run single task and exit
|
|
45
39
|
```
|
|
46
40
|
|
|
47
|
-
###
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
41
|
+
### Available Tools
|
|
42
|
+
|
|
43
|
+
| Tool | Description |
|
|
44
|
+
|---------------|--------------------------------|
|
|
45
|
+
| **Read** | Read file contents |
|
|
46
|
+
| **Write** | Create or overwrite files |
|
|
47
|
+
| **Edit** | Make targeted edits to files |
|
|
48
|
+
| **Glob** | Find files by pattern |
|
|
49
|
+
| **Grep** | Search code with regex |
|
|
50
|
+
| **Bash** | Execute shell commands |
|
|
51
|
+
| **WebSearch** | Search the web |
|
|
52
|
+
|
|
53
|
+
### Interactive Commands
|
|
54
|
+
|
|
55
|
+
In agent mode, use these commands:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
/help Show available commands
|
|
59
|
+
/clear Clear conversation history
|
|
60
|
+
/history Show conversation history
|
|
61
|
+
/stats Show session statistics (tokens, cost)
|
|
62
|
+
/model <model> Switch LLM model
|
|
63
|
+
/provider <name> Switch LLM provider
|
|
64
|
+
/exit Exit the session
|
|
58
65
|
```
|
|
59
66
|
|
|
60
|
-
###
|
|
67
|
+
### Keyboard Shortcuts
|
|
68
|
+
|
|
69
|
+
| Key | Action |
|
|
70
|
+
|------------|----------------------------|
|
|
71
|
+
| `Enter` | Submit input |
|
|
72
|
+
| `Esc` | Cancel current request |
|
|
73
|
+
| `Ctrl+C` | Exit immediately |
|
|
74
|
+
| `Up/Down` | Navigate input history |
|
|
75
|
+
| `Tab` | Autocomplete commands |
|
|
76
|
+
|
|
77
|
+
## Output Modes
|
|
61
78
|
|
|
62
79
|
```bash
|
|
63
|
-
aii
|
|
64
|
-
aii
|
|
65
|
-
aii
|
|
80
|
+
aii "query" --clean # Just the result
|
|
81
|
+
aii "query" --standard # Result + metrics (default)
|
|
82
|
+
aii "query" --thinking # Full reasoning chain
|
|
66
83
|
```
|
|
67
84
|
|
|
68
|
-
|
|
85
|
+
## Prompt Templates
|
|
86
|
+
|
|
87
|
+
Use pre-built templates for common tasks:
|
|
88
|
+
|
|
69
89
|
```bash
|
|
70
|
-
aii
|
|
71
|
-
aii
|
|
72
|
-
aii
|
|
73
|
-
aii config model <model> # Change LLM model
|
|
74
|
-
aii config provider <provider> # Change LLM provider
|
|
90
|
+
aii prompt list # List available prompts
|
|
91
|
+
aii prompt show <name> # Show prompt details
|
|
92
|
+
aii prompt use <name> --var value # Use a prompt template
|
|
75
93
|
```
|
|
76
94
|
|
|
77
|
-
|
|
95
|
+
## Configuration
|
|
96
|
+
|
|
78
97
|
```bash
|
|
79
|
-
aii
|
|
80
|
-
aii
|
|
81
|
-
aii
|
|
98
|
+
aii config show # Show current configuration
|
|
99
|
+
aii config validate # Validate configuration
|
|
100
|
+
aii config set <key> <value> # Set a configuration value
|
|
101
|
+
aii config model <model> # Change LLM model
|
|
102
|
+
aii config provider <provider> # Change LLM provider
|
|
82
103
|
```
|
|
83
104
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
| Option | Description |
|
|
87
|
-
|--------|-------------|
|
|
88
|
-
| `--clean` | Clean output mode (just the result) |
|
|
89
|
-
| `--standard` | Standard output mode (result + metrics) |
|
|
90
|
-
| `--thinking` | Thinking mode (full reasoning) |
|
|
91
|
-
| `--model <model>` | Override LLM model |
|
|
92
|
-
| `--host <host:port>` | API server host |
|
|
93
|
-
| `-y, --yes` | Auto-confirm shell commands |
|
|
94
|
-
| `--offline` | Offline mode (no web/MCP) |
|
|
95
|
-
| `--no-colors` | Disable colored output |
|
|
96
|
-
| `--no-emojis` | Disable emoji icons |
|
|
97
|
-
| `--no-streaming` | Disable streaming output |
|
|
98
|
-
|
|
99
|
-
## Configuration
|
|
105
|
+
### Config Files
|
|
100
106
|
|
|
101
107
|
Configuration is stored in `~/.aii/`:
|
|
102
|
-
- `config.yaml` - Main configuration
|
|
103
|
-
- `secrets.yaml` - API keys
|
|
104
108
|
|
|
105
|
-
|
|
109
|
+
**config.yaml** - Main configuration:
|
|
106
110
|
|
|
107
111
|
```yaml
|
|
108
112
|
llm:
|
|
109
|
-
provider:
|
|
110
|
-
model:
|
|
113
|
+
provider: anthropic
|
|
114
|
+
model: claude-sonnet-4
|
|
111
115
|
temperature: 0.7
|
|
112
116
|
|
|
113
117
|
api:
|
|
114
118
|
url: http://localhost:26169
|
|
115
119
|
```
|
|
116
120
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
Store your LLM provider API keys in `~/.aii/secrets.yaml`:
|
|
121
|
+
**secrets.yaml** - API keys:
|
|
120
122
|
|
|
121
123
|
```yaml
|
|
122
124
|
anthropic_api_key: sk-ant-...
|
|
@@ -124,19 +126,40 @@ openai_api_key: sk-...
|
|
|
124
126
|
deepseek_api_key: sk-...
|
|
125
127
|
```
|
|
126
128
|
|
|
127
|
-
Or
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
Or use environment variables: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `DEEPSEEK_API_KEY`
|
|
130
|
+
|
|
131
|
+
## CLI Options
|
|
132
|
+
|
|
133
|
+
| Option | Description |
|
|
134
|
+
|----------------------|----------------------------------|
|
|
135
|
+
| `--auto` | Auto-approve all tool executions |
|
|
136
|
+
| `--clean` | Clean output mode |
|
|
137
|
+
| `--standard` | Standard output mode (default) |
|
|
138
|
+
| `--thinking` | Show full reasoning |
|
|
139
|
+
| `--model <model>` | Override LLM model |
|
|
140
|
+
| `--host <host:port>` | API server host |
|
|
141
|
+
| `--no-streaming` | Disable streaming output |
|
|
142
|
+
| `--quiet` | Minimal output |
|
|
143
|
+
| `--verbose` | Show detailed stats |
|
|
144
|
+
|
|
145
|
+
## System Commands
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
aii doctor # System health check
|
|
149
|
+
aii --help # Show help
|
|
150
|
+
aii --version # Show version
|
|
151
|
+
```
|
|
131
152
|
|
|
132
153
|
## Features
|
|
133
154
|
|
|
155
|
+
- **Autonomous Agent**: Executes multi-step tasks with tool use
|
|
134
156
|
- **Real-time Streaming**: Token-by-token response display
|
|
135
|
-
- **Interactive
|
|
157
|
+
- **Interactive Mode**: Multi-turn conversations with full context
|
|
158
|
+
- **Tool Execution**: Read, write, search, and run commands
|
|
159
|
+
- **Multiple Providers**: Claude, GPT, Gemini, DeepSeek
|
|
136
160
|
- **Prompt Templates**: Pre-built templates for common tasks
|
|
137
|
-
- **
|
|
138
|
-
- **
|
|
139
|
-
- **Output Modes**: Clean, standard, or thinking mode
|
|
161
|
+
- **Input History**: Navigate previous inputs with arrow keys
|
|
162
|
+
- **Cancellation**: Press Esc to cancel any request
|
|
140
163
|
|
|
141
164
|
## Links
|
|
142
165
|
|
|
@@ -145,4 +168,4 @@ Or set via environment variables:
|
|
|
145
168
|
|
|
146
169
|
## License
|
|
147
170
|
|
|
148
|
-
Proprietary - Copyright 2025-present AiiWare.com. All Rights Reserved.
|
|
171
|
+
Proprietary - Copyright 2025-present AiiWare.com. All Rights Reserved.
|