companion-cli 1.0.0 → 1.1.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 +171 -1
- package/dist/index.js +1 -9974
- package/package.json +5 -5
- package/agents/example.json +0 -9
- package/agents/fontendengineer.json +0 -9
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1 +1,171 @@
|
|
|
1
|
-
#
|
|
1
|
+
# companion-cli
|
|
2
|
+
|
|
3
|
+
A model-agnostic AI assistant for your terminal. Chat with OpenAI, Anthropic, or Google models — with built-in tools for file operations, git, image generation, video creation, desktop automation, smart home control, and more.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g companion-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires **Node.js 20+**.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Start interactive chat
|
|
17
|
+
companion-cli
|
|
18
|
+
|
|
19
|
+
# Configure your API key (at least one provider required)
|
|
20
|
+
# Inside the chat, run:
|
|
21
|
+
/config set providers.openai.apiKey sk-...
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or set environment variables:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
export OPENAI_API_KEY=sk-...
|
|
28
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
29
|
+
export GOOGLE_API_KEY=AIza...
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Supported Providers & Models
|
|
33
|
+
|
|
34
|
+
| Provider | Models |
|
|
35
|
+
|----------|--------|
|
|
36
|
+
| **OpenAI** | GPT-5.4, GPT-4.1, GPT-4.1 Mini, GPT-4.1 Nano, o3, o3-mini, o4-mini, GPT-4o, GPT-4o Mini |
|
|
37
|
+
| **Anthropic** | Claude Opus 4.6, Claude Sonnet 4.6, Claude Opus 4, Claude Sonnet 4, Claude Haiku 4.5 |
|
|
38
|
+
| **Google** | Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.0 Flash, Gemini 2.0 Flash Lite, Gemini 1.5 Pro, Gemini 1.5 Flash |
|
|
39
|
+
|
|
40
|
+
Switch models on the fly with `/model` or `/model openai:gpt-4.1`.
|
|
41
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
| Command | Alias | Description |
|
|
45
|
+
|---------|-------|-------------|
|
|
46
|
+
| `/help` | `/h`, `/?` | Show available commands |
|
|
47
|
+
| `/model` | `/m` | Switch AI provider and model |
|
|
48
|
+
| `/config` | `/cfg` | Manage settings (API keys, theme, defaults) |
|
|
49
|
+
| `/agent` | `/a` | Create, run, and manage custom agents |
|
|
50
|
+
| `/devices` | `/dev` | Manage smart home devices |
|
|
51
|
+
| `/clear` | | Clear screen and chat history |
|
|
52
|
+
| `/exit` | `/quit`, `/q` | Exit |
|
|
53
|
+
|
|
54
|
+
## Built-in Tools
|
|
55
|
+
|
|
56
|
+
The AI has access to a rich set of tools it can use to help you:
|
|
57
|
+
|
|
58
|
+
### Filesystem
|
|
59
|
+
- **Read/write/edit files** with surgical string replacement
|
|
60
|
+
- **Search files** by content (grep) or glob patterns
|
|
61
|
+
- **File stats**, directory creation, deletion
|
|
62
|
+
|
|
63
|
+
### Shell & Git
|
|
64
|
+
- **Run shell commands** with timeout and output capping
|
|
65
|
+
- **Git operations** — status, diff, log, commit, branch management
|
|
66
|
+
|
|
67
|
+
### Image & Video
|
|
68
|
+
- **DALL-E 3** image generation — saved directly to disk
|
|
69
|
+
- **Sora** video generation — up to 5 minutes, with async progress tracking
|
|
70
|
+
|
|
71
|
+
### Canvas & Drawing
|
|
72
|
+
- **14 brush types** — round, flat, fan, airbrush, watercolor, ink, chalk, and more
|
|
73
|
+
- Gradients, flood fill, smudge, blur effects
|
|
74
|
+
- Compositing and text rendering — save to PNG
|
|
75
|
+
|
|
76
|
+
### Desktop Automation (Windows)
|
|
77
|
+
- **Screenshots** — capture full screen or regions
|
|
78
|
+
- **Window management** — list, move, resize, focus windows
|
|
79
|
+
- **Mouse & keyboard** — click, type, send key combos
|
|
80
|
+
- **Launch applications**
|
|
81
|
+
|
|
82
|
+
### Smart Home
|
|
83
|
+
- **Google Cast** (Chromecast, Google Home, Nest) — play media, TTS, volume control
|
|
84
|
+
- **Amazon Alexa** (Echo, Fire TV) — playback control, notifications
|
|
85
|
+
- **YouTube search & play** — find and play music on your speakers
|
|
86
|
+
- **Device discovery** via mDNS scanning
|
|
87
|
+
|
|
88
|
+
### Web
|
|
89
|
+
- **Fetch URLs** with SSRF protection
|
|
90
|
+
|
|
91
|
+
## Custom Agents
|
|
92
|
+
|
|
93
|
+
Create specialized AI personas with custom system prompts, specific models, and curated tool sets:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
/agent create my-coder
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Run agents directly:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
/agent run my-coder "refactor this function to use async/await"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Run multiple agents in parallel:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
/agent run-parallel coder,reviewer "analyze this pull request"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Agents are stored in your config directory alongside your settings.
|
|
112
|
+
|
|
113
|
+
## Configuration
|
|
114
|
+
|
|
115
|
+
All configuration is stored in your OS config directory:
|
|
116
|
+
|
|
117
|
+
| OS | Path |
|
|
118
|
+
|----|------|
|
|
119
|
+
| Windows | `%APPDATA%\companion-cli-nodejs\config.json` |
|
|
120
|
+
| macOS | `~/Library/Preferences/companion-cli-nodejs/config.json` |
|
|
121
|
+
| Linux | `~/.config/companion-cli-nodejs/config.json` |
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Set config values
|
|
125
|
+
/config set providers.openai.apiKey sk-...
|
|
126
|
+
/config set defaultProvider anthropic
|
|
127
|
+
/config set defaultModel claude-sonnet-4-6
|
|
128
|
+
/config set theme.userColor cyan
|
|
129
|
+
|
|
130
|
+
# View config
|
|
131
|
+
/config list
|
|
132
|
+
/config path
|
|
133
|
+
|
|
134
|
+
# Or use the interactive wizard
|
|
135
|
+
/config
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
API key priority: **environment variables** > **config file**.
|
|
139
|
+
|
|
140
|
+
## CLI Usage
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Interactive chat (default)
|
|
144
|
+
companion-cli
|
|
145
|
+
|
|
146
|
+
# With flags
|
|
147
|
+
companion-cli --verbose
|
|
148
|
+
companion-cli --debug
|
|
149
|
+
companion-cli --quiet
|
|
150
|
+
|
|
151
|
+
# Direct config management
|
|
152
|
+
companion-cli config set <key> <value>
|
|
153
|
+
companion-cli config get <key>
|
|
154
|
+
companion-cli config list
|
|
155
|
+
|
|
156
|
+
# Run agents from the command line
|
|
157
|
+
companion-cli agent list
|
|
158
|
+
companion-cli agent run <name> "<prompt>"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Security
|
|
162
|
+
|
|
163
|
+
- Mutating file operations and shell commands require user confirmation
|
|
164
|
+
- Path traversal protection on all filesystem tools
|
|
165
|
+
- SSRF protection on URL fetching
|
|
166
|
+
- Dangerous shell commands are blocked
|
|
167
|
+
- API keys are masked in output
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
MIT
|