cade-cli 0.3.3__tar.gz → 0.4.0__tar.gz

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.
Files changed (68) hide show
  1. {cade_cli-0.3.3 → cade_cli-0.4.0}/.gitignore +3 -0
  2. cade_cli-0.4.0/PKG-INFO +364 -0
  3. cade_cli-0.4.0/README.md +310 -0
  4. {cade_cli-0.3.3 → cade_cli-0.4.0}/pyproject.toml +2 -2
  5. cade_cli-0.4.0/src/cadecoder/__init__.py +1 -0
  6. cade_cli-0.4.0/src/cadecoder/ai/prompts.py +240 -0
  7. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/cli/app.py +15 -2
  8. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/cli/commands/chat.py +128 -39
  9. cade_cli-0.4.0/src/cadecoder/cli/commands/context.py +323 -0
  10. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/cli/commands/mcp.py +83 -37
  11. cade_cli-0.4.0/src/cadecoder/cli/commands/model.py +152 -0
  12. cade_cli-0.4.0/src/cadecoder/cli/commands/thread.py +202 -0
  13. cade_cli-0.4.0/src/cadecoder/cli/commands/tools.py +339 -0
  14. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/core/config.py +30 -17
  15. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/core/constants.py +1 -3
  16. cade_cli-0.4.0/src/cadecoder/core/errors.py +65 -0
  17. cade_cli-0.4.0/src/cadecoder/core/names.py +139 -0
  18. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/core/types.py +2 -0
  19. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/execution/__init__.py +3 -3
  20. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/execution/context_window.py +123 -11
  21. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/execution/orchestrator.py +51 -13
  22. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/execution/parallel.py +4 -4
  23. cade_cli-0.4.0/src/cadecoder/providers/__init__.py +131 -0
  24. cade_cli-0.4.0/src/cadecoder/providers/anthropic.py +567 -0
  25. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/providers/base.py +1 -0
  26. cade_cli-0.4.0/src/cadecoder/providers/ollama.py +308 -0
  27. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/providers/openai.py +29 -4
  28. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/storage/threads.py +27 -1
  29. cade_cli-0.4.0/src/cadecoder/tools/__init__.py +49 -0
  30. cade_cli-0.4.0/src/cadecoder/tools/local/__init__.py +78 -0
  31. cade_cli-0.4.0/src/cadecoder/tools/local/filesystem.py +364 -0
  32. cade_cli-0.4.0/src/cadecoder/tools/local/git.py +345 -0
  33. cade_cli-0.4.0/src/cadecoder/tools/local/search.py +356 -0
  34. cade_cli-0.4.0/src/cadecoder/tools/local/shell.py +123 -0
  35. cade_cli-0.4.0/src/cadecoder/tools/manager/__init__.py +33 -0
  36. cade_cli-0.4.0/src/cadecoder/tools/manager/base.py +58 -0
  37. cade_cli-0.4.0/src/cadecoder/tools/manager/composite.py +267 -0
  38. cade_cli-0.4.0/src/cadecoder/tools/manager/config.py +219 -0
  39. cade_cli-0.4.0/src/cadecoder/tools/manager/mcp.py +927 -0
  40. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/ui/display.py +59 -27
  41. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/ui/session.py +144 -31
  42. cade_cli-0.3.3/PKG-INFO +0 -151
  43. cade_cli-0.3.3/README.md +0 -97
  44. cade_cli-0.3.3/src/cadecoder/__init__.py +0 -1
  45. cade_cli-0.3.3/src/cadecoder/ai/prompts.py +0 -572
  46. cade_cli-0.3.3/src/cadecoder/cli/commands/tools.py +0 -226
  47. cade_cli-0.3.3/src/cadecoder/core/errors.py +0 -145
  48. cade_cli-0.3.3/src/cadecoder/core/utils.py +0 -279
  49. cade_cli-0.3.3/src/cadecoder/providers/__init__.py +0 -60
  50. cade_cli-0.3.3/src/cadecoder/tools/__init__.py +0 -19
  51. cade_cli-0.3.3/src/cadecoder/tools/builtin.py +0 -644
  52. cade_cli-0.3.3/src/cadecoder/tools/filesystem.py +0 -315
  53. cade_cli-0.3.3/src/cadecoder/tools/git.py +0 -221
  54. cade_cli-0.3.3/src/cadecoder/tools/manager.py +0 -1635
  55. cade_cli-0.3.3/src/cadecoder/ui/input.py +0 -145
  56. cade_cli-0.3.3/src/cadecoder/ui/state.py +0 -20
  57. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/ai/__init__.py +0 -0
  58. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/cli/__init__.py +0 -0
  59. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/cli/auth.py +0 -0
  60. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/cli/commands/__init__.py +0 -0
  61. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/cli/commands/auth.py +0 -0
  62. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/core/__init__.py +0 -0
  63. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/core/logging.py +0 -0
  64. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/storage/__init__.py +0 -0
  65. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/templates/login_failed.html +0 -0
  66. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/templates/login_success.html +0 -0
  67. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/templates/styles.css +0 -0
  68. {cade_cli-0.3.3 → cade_cli-0.4.0}/src/cadecoder/ui/__init__.py +0 -0
@@ -41,3 +41,6 @@ build/
41
41
  .venv
42
42
  activate.sh
43
43
  docs/
44
+
45
+ # uv
46
+ uv.lock
@@ -0,0 +1,364 @@
1
+ Metadata-Version: 2.4
2
+ Name: cade-cli
3
+ Version: 0.4.0
4
+ Summary: Cade - The CLI Agent from Arcade.dev
5
+ Project-URL: Homepage, https://arcade.dev
6
+ Project-URL: Documentation, https://docs.arcade.dev
7
+ Project-URL: Repository, https://github.com/arcadeai-labs/cade
8
+ Project-URL: Issues, https://github.com/arcadeai-labs/cade/issues
9
+ Project-URL: Changelog, https://github.com/arcadeai-labs/cade/releases
10
+ Author-email: "Arcade AI Inc." <dev@arcade.dev>
11
+ License: MIT
12
+ Keywords: agent,ai,arcade,cli,coding-assistant,llm,mcp
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development
22
+ Classifier: Topic :: Software Development :: Code Generators
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: anthropic<1.0.0,>=0.34.0
26
+ Requires-Dist: arcade-core<5.0.0,>=4.1.0
27
+ Requires-Dist: arcade-mcp-server>=1.0.0
28
+ Requires-Dist: arcade-tdk>=2.0.0
29
+ Requires-Dist: authlib<2.0.0,>=1.6.0
30
+ Requires-Dist: httpx<1.0.0,>=0.27.0
31
+ Requires-Dist: openai<2.0.0,>=1.0.0
32
+ Requires-Dist: prompt-toolkit>=3.0.52
33
+ Requires-Dist: pydantic[email]<3.0.0,>=2.0.0
34
+ Requires-Dist: pyperclip<2.0.0,>=1.8.0
35
+ Requires-Dist: pyyaml<7.0.0,>=6.0
36
+ Requires-Dist: rich<14.0.0,>=13.0.0
37
+ Requires-Dist: tiktoken>=0.11.0
38
+ Requires-Dist: toml<1.0.0,>=0.10.0
39
+ Requires-Dist: typer>0.10.0
40
+ Requires-Dist: ulid==1.1
41
+ Provides-Extra: dev
42
+ Requires-Dist: mypy<2.0.0,>=1.10.0; extra == 'dev'
43
+ Requires-Dist: pytest-asyncio<1.0.0,>=0.24.0; extra == 'dev'
44
+ Requires-Dist: pytest-cov<5.0.0,>=4.0.0; extra == 'dev'
45
+ Requires-Dist: pytest-mock<4.0.0,>=3.11.0; extra == 'dev'
46
+ Requires-Dist: pytest<9.0.0,>=8.0.0; extra == 'dev'
47
+ Requires-Dist: ruff<1.0.0,>=0.5.0; extra == 'dev'
48
+ Provides-Extra: training
49
+ Requires-Dist: accelerate>=0.27.0; extra == 'training'
50
+ Requires-Dist: safetensors>=0.4.2; extra == 'training'
51
+ Requires-Dist: torch>=2.1.0; extra == 'training'
52
+ Requires-Dist: transformers>=4.38.0; extra == 'training'
53
+ Description-Content-Type: text/markdown
54
+
55
+ # Cade
56
+
57
+ An AI-powered CLI agent for coding and everyday tasks. Powered by [Arcade.dev](https://arcade.dev).
58
+
59
+ ## Installation
60
+
61
+ ### Prerequisites
62
+
63
+ - Python 3.11+
64
+ - Arcade account ([arcade.dev](https://arcade.dev))
65
+ - AI provider API key: `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`
66
+
67
+ ### Homebrew (macOS/Linux)
68
+
69
+ ```bash
70
+ brew tap ArcadeAI/tap
71
+ brew install cade
72
+ ```
73
+
74
+ ### Install with uv
75
+
76
+ ```bash
77
+ curl -LsSf https://astral.sh/uv/install.sh | sh
78
+ uv tool install cade-cli
79
+ ```
80
+
81
+ ### Install with pip
82
+
83
+ ```bash
84
+ pip install cade-cli
85
+ ```
86
+
87
+ ### From Source
88
+
89
+ ```bash
90
+ git clone https://github.com/arcadeai-labs/cade.git
91
+ cd cade
92
+ uv venv --python 3.11
93
+ source .venv/bin/activate
94
+ uv sync
95
+ ```
96
+
97
+ ### Authenticate
98
+
99
+ ```bash
100
+ cade login
101
+ ```
102
+
103
+ ## Usage
104
+
105
+ ### Start a Chat
106
+
107
+ ```bash
108
+ cade
109
+ ```
110
+
111
+ ### Resume a Thread
112
+
113
+ ```bash
114
+ cade -r # Resume most recent
115
+ cade resume "my-project" # Resume by name
116
+ ```
117
+
118
+ ### Authentication
119
+
120
+ Cade uses Arcade Cloud for authentication and shares credentials with arcade-cli.
121
+
122
+ ```bash
123
+ cade login # Log in to Arcade Cloud
124
+ cade logout # Log out
125
+ cade whoami # Show current login status
126
+ ```
127
+
128
+ ### Context Management
129
+
130
+ Switch between organizations and projects for Arcade Cloud features.
131
+
132
+ ```bash
133
+ cade context show # Show current org/project
134
+ cade context list # List available orgs and projects
135
+ cade context switch -i # Interactive selection
136
+ cade context switch --org my-org --project my-project
137
+ ```
138
+
139
+ ### Single Message Mode
140
+
141
+ ```bash
142
+ cade -m "What files are in this directory?"
143
+ cat error.log | cade -m "What went wrong?"
144
+ ```
145
+
146
+ ### Options
147
+
148
+ | Option | Description |
149
+ |--------|-------------|
150
+ | `-r`, `--resume` | Resume the most recent thread |
151
+ | `-m`, `--message` | Single message mode (non-interactive) |
152
+ | `-L`, `--local-only` | Disable remote tools (use only local tools) |
153
+ | `-v`, `--verbose` | Enable debug logging |
154
+ | `--version` | Show version |
155
+
156
+ ### In-Chat Commands
157
+
158
+ | Command | Description |
159
+ |---------|-------------|
160
+ | `/help` | Show available commands |
161
+ | `/logs` | View recent log entries |
162
+ | `/clear` | Clear the screen |
163
+ | `/copy` | Copy last response to clipboard |
164
+ | `Ctrl+C` | Exit |
165
+
166
+ ## Thread Management
167
+
168
+ ```bash
169
+ cade thread list # List all threads
170
+ cade thread list --branch main # Filter by branch
171
+ cade thread get <thread-id> # Get thread details
172
+ cade thread get <thread-id> --messages # Show messages
173
+ cade thread delete <thread-id> # Delete thread
174
+ ```
175
+
176
+ ## Tool Management
177
+
178
+ Tools come from three sources: local, Arcade Cloud, and MCP servers.
179
+
180
+ ```bash
181
+ cade tool list # List all tools
182
+ cade tool list --source local # Filter by source
183
+ cade tool search "file" # Search tools
184
+ cade tool info Local_ReadFile # Tool details
185
+ ```
186
+
187
+ ### Built-in Tools
188
+
189
+ | Tool | Description |
190
+ |------|-------------|
191
+ | `Local_ReadFile` | Read file contents |
192
+ | `Local_WriteFile` | Write or append to files |
193
+ | `Local_ListFiles` | List directory contents |
194
+ | `Local_SearchText` | Search for text patterns |
195
+ | `Local_ExecuteShell` | Run shell commands |
196
+ | `Local_CreateDirectory` | Create directories |
197
+ | `Local_DeleteFile` | Delete files |
198
+ | `Local_GetGitStatus` | Get git status |
199
+
200
+ ## MCP Servers
201
+
202
+ Connect to [MCP](https://modelcontextprotocol.io/) servers for extended capabilities.
203
+
204
+ ```bash
205
+ cade mcp list # List servers
206
+ cade mcp add my-server http://localhost:8080 # Add server
207
+ cade mcp add my-server http://localhost:8080 --auth bearer -t <token> # With auth
208
+ cade mcp test my-server # Test connection
209
+ cade mcp enable my-server # Enable
210
+ cade mcp disable my-server # Disable
211
+ cade mcp rm my-server # Remove
212
+ ```
213
+
214
+ ## Configuration
215
+
216
+ Config is stored in `~/.cadecoder/`:
217
+
218
+ | File | Description |
219
+ |------|-------------|
220
+ | `cadecoder.toml` | Settings |
221
+ | `cadecoder_history.db` | Thread history |
222
+ | `cadecoder.log` | Logs |
223
+ | `mcp_servers.yaml` | MCP server configs |
224
+
225
+ ### Environment Variables
226
+
227
+ | Variable | Description |
228
+ |----------|-------------|
229
+ | `OPENAI_API_KEY` | OpenAI API key |
230
+ | `OPENAI_BASE_URL` | Custom OpenAI-compatible API endpoint |
231
+ | `ANTHROPIC_API_KEY` | Anthropic API key |
232
+ | `ARCADE_API_KEY` | Arcade API key (alternative to OAuth) |
233
+ | `ARCADE_BASE_URL` | Custom Arcade API endpoint |
234
+ | `CADE_LOCAL_ONLY` | Set to `1` to disable remote tools |
235
+ | `CADECODER_HOME` | Override config directory |
236
+
237
+ ### Example Config
238
+
239
+ ```toml
240
+ # ~/.cadecoder/cadecoder.toml
241
+
242
+ default_model = "gpt-4.1"
243
+ debug_mode = false
244
+ use_responses_api = true
245
+
246
+ [responses_config]
247
+ enabled = true
248
+ streaming_enabled = true
249
+
250
+ [model_settings]
251
+ provider = "openai"
252
+ model = "gpt-4.1"
253
+
254
+ [tool_settings]
255
+ # Tool filtering is managed via MCP server configuration
256
+ # See: cade mcp add --help
257
+ ```
258
+
259
+ ## Using Local or Custom LLMs
260
+
261
+ Cade works with any OpenAI-compatible API, including local servers (Ollama, vLLM, llama.cpp) and alternative cloud providers (Together AI, Groq, Fireworks).
262
+
263
+ ### Local-Only Mode
264
+
265
+ When using local LLMs, you can skip Arcade Cloud authentication entirely with `--local-only`:
266
+
267
+ ```bash
268
+ # Local Ollama server without Arcade Cloud
269
+ cade chat --local-only --endpoint "http://localhost:11434/v1" --model "llama3"
270
+
271
+ # Or via environment variable
272
+ CADE_LOCAL_ONLY=1 cade chat --endpoint "http://localhost:11434/v1" --model "llama3"
273
+ ```
274
+
275
+ This disables remote tools and uses only local tools. Cade will also gracefully fall back to local-only mode if Arcade Cloud authentication is not configured.
276
+
277
+ ### Via CLI Flags
278
+
279
+ ```bash
280
+ # Local Ollama server
281
+ cade chat --endpoint "http://localhost:11434/v1" --model "glm-4.7-flash:latest"
282
+
283
+ # vLLM server
284
+ cade chat -e http://localhost:8000/v1 -m mistral-7b
285
+ ```
286
+
287
+ ### Via Environment Variables
288
+
289
+ ```bash
290
+ export OPENAI_BASE_URL="http://localhost:11434/v1"
291
+ export OPENAI_API_KEY="ollama" # Dummy key for local model
292
+ cade chat --model glm-4.7-flash:latest
293
+ ```
294
+
295
+ ### Via Config File
296
+
297
+ ```toml
298
+ # ~/.cadecoder/cadecoder.toml
299
+
300
+ default_model = "glm-4.7-flash:latest"
301
+
302
+ [model_settings]
303
+ host = "http://localhost:11434/v1"
304
+ api_key = "ollama"
305
+ ```
306
+
307
+ After configuring the TOML file:
308
+
309
+ ```bash
310
+ cade chat
311
+ ```
312
+
313
+ ### `cade chat` Configuration Precedence
314
+
315
+ Settings are resolved in this order (first is used):
316
+
317
+ 1. CLI flags (`--endpoint`, `--model`)
318
+ 2. Environment variables (`OPENAI_BASE_URL`, `OPENAI_API_KEY`)
319
+ 3. Config file (`model_settings.host`, `model_settings.api_key`)
320
+ 4. Hardcoded defaults
321
+
322
+ ## Contributing
323
+
324
+ ### Development Setup
325
+
326
+ ```bash
327
+ git clone https://github.com/arcadeai-labs/cade.git
328
+ cd cade
329
+ uv sync --extra dev
330
+ ```
331
+
332
+ ### Run Tests
333
+
334
+ ```bash
335
+ pytest
336
+ ruff check src/
337
+ ruff format src/
338
+ ```
339
+
340
+ ### Code Style
341
+
342
+ - Python 3.11+ with modern type hints (`dict`, `list`, `| None`)
343
+ - Ruff for linting and formatting
344
+ - Pytest for testing
345
+ - Docstrings for public functions and classes
346
+
347
+ ### Submitting Changes
348
+
349
+ 1. Fork the repository
350
+ 2. Create a feature branch
351
+ 3. Make changes with tests
352
+ 4. Run `ruff check . && pytest`
353
+ 5. Open a Pull Request
354
+
355
+ ## Resources
356
+
357
+ - [arcade.dev](https://arcade.dev)
358
+ - [Documentation](https://docs.arcade.dev)
359
+ - [Issues](https://github.com/arcadeai-labs/cade/issues)
360
+ - [Releases](https://github.com/arcadeai-labs/cade/releases)
361
+
362
+ ## License
363
+
364
+ MIT
@@ -0,0 +1,310 @@
1
+ # Cade
2
+
3
+ An AI-powered CLI agent for coding and everyday tasks. Powered by [Arcade.dev](https://arcade.dev).
4
+
5
+ ## Installation
6
+
7
+ ### Prerequisites
8
+
9
+ - Python 3.11+
10
+ - Arcade account ([arcade.dev](https://arcade.dev))
11
+ - AI provider API key: `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`
12
+
13
+ ### Homebrew (macOS/Linux)
14
+
15
+ ```bash
16
+ brew tap ArcadeAI/tap
17
+ brew install cade
18
+ ```
19
+
20
+ ### Install with uv
21
+
22
+ ```bash
23
+ curl -LsSf https://astral.sh/uv/install.sh | sh
24
+ uv tool install cade-cli
25
+ ```
26
+
27
+ ### Install with pip
28
+
29
+ ```bash
30
+ pip install cade-cli
31
+ ```
32
+
33
+ ### From Source
34
+
35
+ ```bash
36
+ git clone https://github.com/arcadeai-labs/cade.git
37
+ cd cade
38
+ uv venv --python 3.11
39
+ source .venv/bin/activate
40
+ uv sync
41
+ ```
42
+
43
+ ### Authenticate
44
+
45
+ ```bash
46
+ cade login
47
+ ```
48
+
49
+ ## Usage
50
+
51
+ ### Start a Chat
52
+
53
+ ```bash
54
+ cade
55
+ ```
56
+
57
+ ### Resume a Thread
58
+
59
+ ```bash
60
+ cade -r # Resume most recent
61
+ cade resume "my-project" # Resume by name
62
+ ```
63
+
64
+ ### Authentication
65
+
66
+ Cade uses Arcade Cloud for authentication and shares credentials with arcade-cli.
67
+
68
+ ```bash
69
+ cade login # Log in to Arcade Cloud
70
+ cade logout # Log out
71
+ cade whoami # Show current login status
72
+ ```
73
+
74
+ ### Context Management
75
+
76
+ Switch between organizations and projects for Arcade Cloud features.
77
+
78
+ ```bash
79
+ cade context show # Show current org/project
80
+ cade context list # List available orgs and projects
81
+ cade context switch -i # Interactive selection
82
+ cade context switch --org my-org --project my-project
83
+ ```
84
+
85
+ ### Single Message Mode
86
+
87
+ ```bash
88
+ cade -m "What files are in this directory?"
89
+ cat error.log | cade -m "What went wrong?"
90
+ ```
91
+
92
+ ### Options
93
+
94
+ | Option | Description |
95
+ |--------|-------------|
96
+ | `-r`, `--resume` | Resume the most recent thread |
97
+ | `-m`, `--message` | Single message mode (non-interactive) |
98
+ | `-L`, `--local-only` | Disable remote tools (use only local tools) |
99
+ | `-v`, `--verbose` | Enable debug logging |
100
+ | `--version` | Show version |
101
+
102
+ ### In-Chat Commands
103
+
104
+ | Command | Description |
105
+ |---------|-------------|
106
+ | `/help` | Show available commands |
107
+ | `/logs` | View recent log entries |
108
+ | `/clear` | Clear the screen |
109
+ | `/copy` | Copy last response to clipboard |
110
+ | `Ctrl+C` | Exit |
111
+
112
+ ## Thread Management
113
+
114
+ ```bash
115
+ cade thread list # List all threads
116
+ cade thread list --branch main # Filter by branch
117
+ cade thread get <thread-id> # Get thread details
118
+ cade thread get <thread-id> --messages # Show messages
119
+ cade thread delete <thread-id> # Delete thread
120
+ ```
121
+
122
+ ## Tool Management
123
+
124
+ Tools come from three sources: local, Arcade Cloud, and MCP servers.
125
+
126
+ ```bash
127
+ cade tool list # List all tools
128
+ cade tool list --source local # Filter by source
129
+ cade tool search "file" # Search tools
130
+ cade tool info Local_ReadFile # Tool details
131
+ ```
132
+
133
+ ### Built-in Tools
134
+
135
+ | Tool | Description |
136
+ |------|-------------|
137
+ | `Local_ReadFile` | Read file contents |
138
+ | `Local_WriteFile` | Write or append to files |
139
+ | `Local_ListFiles` | List directory contents |
140
+ | `Local_SearchText` | Search for text patterns |
141
+ | `Local_ExecuteShell` | Run shell commands |
142
+ | `Local_CreateDirectory` | Create directories |
143
+ | `Local_DeleteFile` | Delete files |
144
+ | `Local_GetGitStatus` | Get git status |
145
+
146
+ ## MCP Servers
147
+
148
+ Connect to [MCP](https://modelcontextprotocol.io/) servers for extended capabilities.
149
+
150
+ ```bash
151
+ cade mcp list # List servers
152
+ cade mcp add my-server http://localhost:8080 # Add server
153
+ cade mcp add my-server http://localhost:8080 --auth bearer -t <token> # With auth
154
+ cade mcp test my-server # Test connection
155
+ cade mcp enable my-server # Enable
156
+ cade mcp disable my-server # Disable
157
+ cade mcp rm my-server # Remove
158
+ ```
159
+
160
+ ## Configuration
161
+
162
+ Config is stored in `~/.cadecoder/`:
163
+
164
+ | File | Description |
165
+ |------|-------------|
166
+ | `cadecoder.toml` | Settings |
167
+ | `cadecoder_history.db` | Thread history |
168
+ | `cadecoder.log` | Logs |
169
+ | `mcp_servers.yaml` | MCP server configs |
170
+
171
+ ### Environment Variables
172
+
173
+ | Variable | Description |
174
+ |----------|-------------|
175
+ | `OPENAI_API_KEY` | OpenAI API key |
176
+ | `OPENAI_BASE_URL` | Custom OpenAI-compatible API endpoint |
177
+ | `ANTHROPIC_API_KEY` | Anthropic API key |
178
+ | `ARCADE_API_KEY` | Arcade API key (alternative to OAuth) |
179
+ | `ARCADE_BASE_URL` | Custom Arcade API endpoint |
180
+ | `CADE_LOCAL_ONLY` | Set to `1` to disable remote tools |
181
+ | `CADECODER_HOME` | Override config directory |
182
+
183
+ ### Example Config
184
+
185
+ ```toml
186
+ # ~/.cadecoder/cadecoder.toml
187
+
188
+ default_model = "gpt-4.1"
189
+ debug_mode = false
190
+ use_responses_api = true
191
+
192
+ [responses_config]
193
+ enabled = true
194
+ streaming_enabled = true
195
+
196
+ [model_settings]
197
+ provider = "openai"
198
+ model = "gpt-4.1"
199
+
200
+ [tool_settings]
201
+ # Tool filtering is managed via MCP server configuration
202
+ # See: cade mcp add --help
203
+ ```
204
+
205
+ ## Using Local or Custom LLMs
206
+
207
+ Cade works with any OpenAI-compatible API, including local servers (Ollama, vLLM, llama.cpp) and alternative cloud providers (Together AI, Groq, Fireworks).
208
+
209
+ ### Local-Only Mode
210
+
211
+ When using local LLMs, you can skip Arcade Cloud authentication entirely with `--local-only`:
212
+
213
+ ```bash
214
+ # Local Ollama server without Arcade Cloud
215
+ cade chat --local-only --endpoint "http://localhost:11434/v1" --model "llama3"
216
+
217
+ # Or via environment variable
218
+ CADE_LOCAL_ONLY=1 cade chat --endpoint "http://localhost:11434/v1" --model "llama3"
219
+ ```
220
+
221
+ This disables remote tools and uses only local tools. Cade will also gracefully fall back to local-only mode if Arcade Cloud authentication is not configured.
222
+
223
+ ### Via CLI Flags
224
+
225
+ ```bash
226
+ # Local Ollama server
227
+ cade chat --endpoint "http://localhost:11434/v1" --model "glm-4.7-flash:latest"
228
+
229
+ # vLLM server
230
+ cade chat -e http://localhost:8000/v1 -m mistral-7b
231
+ ```
232
+
233
+ ### Via Environment Variables
234
+
235
+ ```bash
236
+ export OPENAI_BASE_URL="http://localhost:11434/v1"
237
+ export OPENAI_API_KEY="ollama" # Dummy key for local model
238
+ cade chat --model glm-4.7-flash:latest
239
+ ```
240
+
241
+ ### Via Config File
242
+
243
+ ```toml
244
+ # ~/.cadecoder/cadecoder.toml
245
+
246
+ default_model = "glm-4.7-flash:latest"
247
+
248
+ [model_settings]
249
+ host = "http://localhost:11434/v1"
250
+ api_key = "ollama"
251
+ ```
252
+
253
+ After configuring the TOML file:
254
+
255
+ ```bash
256
+ cade chat
257
+ ```
258
+
259
+ ### `cade chat` Configuration Precedence
260
+
261
+ Settings are resolved in this order (first is used):
262
+
263
+ 1. CLI flags (`--endpoint`, `--model`)
264
+ 2. Environment variables (`OPENAI_BASE_URL`, `OPENAI_API_KEY`)
265
+ 3. Config file (`model_settings.host`, `model_settings.api_key`)
266
+ 4. Hardcoded defaults
267
+
268
+ ## Contributing
269
+
270
+ ### Development Setup
271
+
272
+ ```bash
273
+ git clone https://github.com/arcadeai-labs/cade.git
274
+ cd cade
275
+ uv sync --extra dev
276
+ ```
277
+
278
+ ### Run Tests
279
+
280
+ ```bash
281
+ pytest
282
+ ruff check src/
283
+ ruff format src/
284
+ ```
285
+
286
+ ### Code Style
287
+
288
+ - Python 3.11+ with modern type hints (`dict`, `list`, `| None`)
289
+ - Ruff for linting and formatting
290
+ - Pytest for testing
291
+ - Docstrings for public functions and classes
292
+
293
+ ### Submitting Changes
294
+
295
+ 1. Fork the repository
296
+ 2. Create a feature branch
297
+ 3. Make changes with tests
298
+ 4. Run `ruff check . && pytest`
299
+ 5. Open a Pull Request
300
+
301
+ ## Resources
302
+
303
+ - [arcade.dev](https://arcade.dev)
304
+ - [Documentation](https://docs.arcade.dev)
305
+ - [Issues](https://github.com/arcadeai-labs/cade/issues)
306
+ - [Releases](https://github.com/arcadeai-labs/cade/releases)
307
+
308
+ ## License
309
+
310
+ MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cade-cli"
3
- version = "0.3.3"
3
+ version = "0.4.0"
4
4
  description = "Cade - The CLI Agent from Arcade.dev"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -28,11 +28,11 @@ dependencies = [
28
28
  "pydantic[email]>=2.0.0,<3.0.0",
29
29
  "toml>=0.10.0,<1.0.0",
30
30
  "pyyaml>=6.0,<7.0.0",
31
- "arcadepy>=1.3.1",
32
31
  "openai>=1.0.0,<2.0.0",
33
32
  "anthropic>=0.34.0,<1.0.0",
34
33
  "ulid==1.1",
35
34
  "arcade-tdk>=2.0.0",
35
+ "arcade-mcp-server>=1.0.0",
36
36
  "arcade-core>=4.1.0,<5.0.0",
37
37
  "authlib>=1.6.0,<2.0.0",
38
38
  "pyperclip>=1.8.0,<2.0.0",
@@ -0,0 +1 @@
1
+ __version__ = "0.4.0"