savant-code 0.0.16 → 0.0.17
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 +251 -119
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
<!-- markdownlint-disable MD013 -->
|
|
2
|
+
|
|
1
3
|
# Savant-Code
|
|
2
4
|
|
|
3
5
|
**A terminal-native multi-agent AI coding assistant that audits every change before it touches your repo.**
|
|
4
6
|
|
|
5
|
-
Built with TypeScript/Bun, governed by the [ECHO Protocol](https://github.com/savant0x/savant-code/blob/main/ECHO.md),
|
|
6
|
-
and designed for local-first use with Ollama or any OpenAI-compatible provider.
|
|
7
|
+
Built with TypeScript/Bun, governed by the [ECHO Protocol](https://github.com/savant0x/savant-code/blob/main/ECHO.md), and designed for local-first use with Ollama or any OpenAI-compatible provider.
|
|
7
8
|
|
|
8
9
|
[](https://github.com/savant0x/savant-code)
|
|
9
10
|
[](https://github.com/savant0x/savant-code/blob/main/LICENSE)
|
|
@@ -21,196 +22,327 @@ cd your-project
|
|
|
21
22
|
savant-code
|
|
22
23
|
```
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
Describe the change you want. Savant-Code explores the repository, plans the work, implements approved changes, and verifies the result.
|
|
26
|
+
|
|
27
|
+
If Ollama is installed and running, it is detected automatically and requires no API key:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
ollama serve
|
|
31
|
+
savant-code
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Run `/health` inside the chat to inspect Ollama connectivity, available local models, provider mode, and permission mode.
|
|
26
35
|
|
|
27
|
-
|
|
36
|
+
## Provider Setup
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
Savant-Code supports local Ollama, hosted gateway providers, and direct OpenRouter or OpenAI-compatible endpoints. Use the interactive picker:
|
|
30
39
|
|
|
31
40
|
```text
|
|
32
|
-
/provider
|
|
41
|
+
/provider
|
|
33
42
|
```
|
|
34
43
|
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
Or select one of the supported gateway providers directly:
|
|
45
|
+
|
|
46
|
+
| Provider | Selection | Environment variable | Notes |
|
|
47
|
+
| --- | --- | --- | --- |
|
|
48
|
+
| Ollama | Automatic detection | `OLLAMA_HOST` (optional) | Local inference; no API key required |
|
|
49
|
+
| OpenCode Go | `/provider opencode-go` | `OPENCODE_GO_API_KEY` | Hosted gateway; MiMo 2.5 is the default model |
|
|
50
|
+
| TokenRouter | `/provider tokenrouter` | `TOKENROUTER_API_KEY` | Multi-provider gateway |
|
|
51
|
+
| NVIDIA NIM | `/provider nvidia` | `NVIDIA_API_KEY` | NVIDIA-hosted inference |
|
|
52
|
+
| CommandCode | `/provider commandcode` | `COMMAND_CODE_API_KEY` | OpenAI-compatible hosted inference |
|
|
53
|
+
| OpenRouter direct | `DIRECT_PROVIDER=openrouter` | `OR_MASTER_KEY`, `OPENROUTER_API_KEY`, or `INFERENCE_API_KEY` | Direct mode without the Savant backend |
|
|
54
|
+
| Custom endpoint | Environment configuration | `INFERENCE_BASE_URL`, `INFERENCE_API_KEY` | Advanced OpenAI-compatible endpoint |
|
|
37
55
|
|
|
38
|
-
The
|
|
39
|
-
`COMMAND_CODE_API_KEY`. The persisted credential file is:
|
|
56
|
+
The interactive key prompt is masked. Saved provider credentials are stored in the user configuration directory and are not added to chat history:
|
|
40
57
|
|
|
41
|
-
- **Windows:** `C
|
|
58
|
+
- **Windows:** `C:\Users\<username>\.savant-code\credentials.json`
|
|
42
59
|
- **macOS/Linux:** `~/.savant-code/credentials.json`
|
|
43
60
|
|
|
44
|
-
|
|
61
|
+
Shell environment variables take precedence over saved credentials. Configure one provider key before launching:
|
|
45
62
|
|
|
46
63
|
```powershell
|
|
47
|
-
# PowerShell
|
|
64
|
+
# PowerShell — choose one hosted gateway
|
|
48
65
|
$env:OPENCODE_GO_API_KEY = "your-key"
|
|
66
|
+
# $env:TOKENROUTER_API_KEY = "your-key"
|
|
67
|
+
# $env:NVIDIA_API_KEY = "your-key"
|
|
68
|
+
# $env:COMMAND_CODE_API_KEY = "your-key"
|
|
49
69
|
savant-code
|
|
50
70
|
```
|
|
51
71
|
|
|
52
72
|
```cmd
|
|
53
|
-
:: Command Prompt
|
|
73
|
+
:: Windows Command Prompt — choose one hosted gateway
|
|
54
74
|
set OPENCODE_GO_API_KEY=your-key
|
|
75
|
+
:: set TOKENROUTER_API_KEY=your-key
|
|
76
|
+
:: set NVIDIA_API_KEY=your-key
|
|
77
|
+
:: set COMMAND_CODE_API_KEY=your-key
|
|
55
78
|
savant-code
|
|
56
79
|
```
|
|
57
80
|
|
|
58
81
|
```bash
|
|
59
|
-
# macOS/Linux
|
|
60
|
-
export OPENCODE_GO_API_KEY=your-key
|
|
82
|
+
# macOS/Linux — choose one hosted gateway
|
|
83
|
+
export OPENCODE_GO_API_KEY="your-key"
|
|
84
|
+
# export TOKENROUTER_API_KEY="your-key"
|
|
85
|
+
# export NVIDIA_API_KEY="your-key"
|
|
86
|
+
# export COMMAND_CODE_API_KEY="your-key"
|
|
61
87
|
savant-code
|
|
62
88
|
```
|
|
63
89
|
|
|
64
|
-
|
|
65
|
-
`credentials.json` manually.
|
|
66
|
-
|
|
67
|
-
## What Makes Savant-Code Different
|
|
68
|
-
|
|
69
|
-
Savant-Code isn't a single AI model guessing at your code. It's a **multi-agent system** where 9 specialized agents
|
|
70
|
-
coordinate through a strict protocol to audit every change before it touches your files.
|
|
71
|
-
|
|
72
|
-
### The Agent Roster
|
|
73
|
-
|
|
74
|
-
| Agent | Role |
|
|
75
|
-
|-------|------|
|
|
76
|
-
| **Savant** | Orchestrator — routes work, enforces protocol, spawns agents |
|
|
77
|
-
| **Detective** | Discovers bugs and issues with evidence before any code is written |
|
|
78
|
-
| **Forge** | Implements code changes from a converged plan |
|
|
79
|
-
| **Verifier** | Independent double-audit after implementation |
|
|
80
|
-
| **Thinker** | Deep sequential reasoning for complex problems |
|
|
81
|
-
| **Scout** | Explores codebases to gather context |
|
|
82
|
-
| **Researcher** | Web search and documentation lookup |
|
|
83
|
-
| **Recorder** | FID lifecycle management and tracking |
|
|
84
|
-
| **Scribe** | Session summaries and knowledge capture |
|
|
85
|
-
|
|
86
|
-
### ECHO Protocol
|
|
87
|
-
|
|
88
|
-
Every change follows the **ECHO Perfection Loop**:
|
|
89
|
-
|
|
90
|
-
1. **RED** — Identify ALL failures and issues with evidence
|
|
91
|
-
2. **GREEN** — Fix with minimal, surgical changes
|
|
92
|
-
3. **AUDIT** — Independent verification by a separate agent
|
|
93
|
-
4. **COMPLETE** — Document results, archive tracking
|
|
94
|
-
|
|
95
|
-
No code is written without a plan. No plan is accepted without audit. No audit passes without evidence.
|
|
96
|
-
|
|
97
|
-
## Features
|
|
98
|
-
|
|
99
|
-
### Multi-Agent Orchestration
|
|
100
|
-
|
|
101
|
-
9 specialized agents coordinate via the ECHO Protocol. Detective finds issues, Forge implements, Verifier audits,
|
|
102
|
-
Thinker reasons through complex problems, and Recorder tracks everything.
|
|
103
|
-
|
|
104
|
-
### Thinker with Sequential Thinking
|
|
90
|
+
### OpenRouter direct mode
|
|
105
91
|
|
|
106
|
-
|
|
107
|
-
or null output. Each thought builds on the previous one.
|
|
92
|
+
To bypass the Savant Code backend for inference and route directly to OpenRouter:
|
|
108
93
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
### Tool Permission Boundary
|
|
115
|
-
|
|
116
|
-
Strict allowlist-based tool provisioning. Restricted agents never receive parent-only tools. Each agent has exactly the
|
|
117
|
-
tools it needs — no more.
|
|
118
|
-
|
|
119
|
-
### Gateway Providers
|
|
120
|
-
|
|
121
|
-
Works with Ollama (local-first) and any OpenAI-compatible API:
|
|
94
|
+
```bash
|
|
95
|
+
export DIRECT_PROVIDER=openrouter
|
|
96
|
+
export INFERENCE_BASE_URL=https://openrouter.ai/api/v1
|
|
97
|
+
```
|
|
122
98
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
99
|
+
The credential resolution order is:
|
|
100
|
+
|
|
101
|
+
1. `OR_MASTER_KEY` — exchanges a master key for a regular key through OpenRouter `/api/v1/keys`.
|
|
102
|
+
2. `OPENROUTER_API_KEY` — uses an existing regular OpenRouter key directly.
|
|
103
|
+
3. `INFERENCE_API_KEY` — uses the SDK-specific inference key.
|
|
104
|
+
|
|
105
|
+
### Complete safe local configuration example
|
|
106
|
+
|
|
107
|
+
The following is a public template containing dummy values only. Copy it to `.env.local` for local development, then replace only the values you actually use. Configure one inference mode or hosted provider at a time; the entries below document the complete variable surface, not a recommendation to enable every provider simultaneously. `.env.local` must remain private and gitignored. Never copy real credentials into documentation.
|
|
108
|
+
|
|
109
|
+
```dotenv
|
|
110
|
+
# Core and app configuration
|
|
111
|
+
NEXT_PUBLIC_CB_ENVIRONMENT=dev
|
|
112
|
+
NEXT_PUBLIC_WEB_PORT=3000
|
|
113
|
+
NEXT_PUBLIC_SAVANT_CODE_APP_URL=http://localhost:3000
|
|
114
|
+
# NEXT_PUBLIC_FREEBUFF_APP_URL=http://localhost:3001
|
|
115
|
+
|
|
116
|
+
# Analytics, support, and billing placeholders
|
|
117
|
+
NEXT_PUBLIC_POSTHOG_API_KEY=phc_dummy_replace_me
|
|
118
|
+
NEXT_PUBLIC_POSTHOG_HOST_URL=http://localhost:4000
|
|
119
|
+
NEXT_PUBLIC_GRAVITY_PIXEL_ID=00000000-0000-0000-0000-000000000000
|
|
120
|
+
NEXT_PUBLIC_SUPPORT_EMAIL=replace-me@example.com
|
|
121
|
+
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_dummy_replace_me
|
|
122
|
+
NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL=http://localhost:3000/portal
|
|
123
|
+
NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION_ID=dummy_replace_me
|
|
124
|
+
|
|
125
|
+
# OpenRouter direct mode
|
|
126
|
+
DIRECT_PROVIDER=openrouter
|
|
127
|
+
INFERENCE_BASE_URL=https://openrouter.ai/api/v1
|
|
128
|
+
OR_MASTER_KEY=dummy-or-master-key-replace-me
|
|
129
|
+
# OPENROUTER_API_KEY=dummy-openrouter-api-key-replace-me
|
|
130
|
+
# INFERENCE_API_KEY=dummy-inference-api-key-replace-me
|
|
131
|
+
|
|
132
|
+
# Supported hosted gateways
|
|
133
|
+
OPENCODE_GO_API_KEY=dummy-opencode-go-key-replace-me
|
|
134
|
+
TOKENROUTER_API_KEY=dummy-tokenrouter-key-replace-me
|
|
135
|
+
NVIDIA_API_KEY=dummy-nvidia-key-replace-me
|
|
136
|
+
COMMAND_CODE_API_KEY=dummy-commandcode-key-replace-me
|
|
137
|
+
|
|
138
|
+
# Local Ollama override (optional)
|
|
139
|
+
# OLLAMA_HOST=http://localhost:11434
|
|
140
|
+
|
|
141
|
+
# Optional backend and advanced integrations
|
|
142
|
+
# SAVANT_CODE_API_KEY=backend-dummy-replace-me
|
|
143
|
+
# CLOUDFLARE_API_TOKEN=cloudflare-dummy-replace-me
|
|
144
|
+
# CLOUDFLARE_ACCOUNT_ID=cloudflare-account-dummy-replace-me
|
|
145
|
+
AMAZON_WORKER=amazon-worker-dummy-replace-me
|
|
146
|
+
```
|
|
130
147
|
|
|
131
|
-
|
|
148
|
+
`AMAZON_WORKER` is retained for local deployment integrations. `GITHUB_TOKEN` and `NPM_PUBLISH` are intentionally not part of the public template because they are private release credentials.
|
|
132
149
|
|
|
133
|
-
|
|
150
|
+
## What Makes Savant-Code Different
|
|
134
151
|
|
|
135
|
-
|
|
152
|
+
Savant-Code is a multi-agent system rather than a single model guessing at your code. Nine canonical ECHO roles coordinate with strict separation of duties:
|
|
136
153
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
-
|
|
154
|
+
| Agent | Responsibility |
|
|
155
|
+
| --- | --- |
|
|
156
|
+
| **Savant** | Orchestrator — routes work, enforces protocol, and spawns agents |
|
|
157
|
+
| **Detective** | Finds bugs and issues with evidence before code is written |
|
|
158
|
+
| **Forge** | Implements code changes from a converged plan |
|
|
159
|
+
| **Verifier** | Performs the independent double-audit after implementation |
|
|
160
|
+
| **Recorder** | Manages FID lifecycle and release tracking |
|
|
161
|
+
| **Thinker** | Performs deep sequential reasoning for complex problems |
|
|
162
|
+
| **Scout** | Explores files and code to gather context |
|
|
163
|
+
| **Researcher** | Performs web search and documentation lookup |
|
|
164
|
+
| **Scribe** | Captures session summaries and durable knowledge |
|
|
143
165
|
|
|
144
|
-
|
|
166
|
+
Infrastructure helpers such as terminal execution, browser automation, and web/docs tool libraries support these roles; they are not additional roster members.
|
|
145
167
|
|
|
146
|
-
|
|
168
|
+
### ECHO Protocol
|
|
147
169
|
|
|
148
|
-
|
|
149
|
-
/goal fix all failing tests
|
|
150
|
-
/loop 5m
|
|
151
|
-
```
|
|
170
|
+
Every code change follows the ECHO Perfection Loop:
|
|
152
171
|
|
|
153
|
-
|
|
172
|
+
1. **RED** — identify all failures and issues with evidence.
|
|
173
|
+
2. **GREEN** — implement minimal, surgical changes from the converged FID.
|
|
174
|
+
3. **AUDIT** — independently verify the implementation and call-graph reachability.
|
|
175
|
+
4. **SELF-CORRECT** — resolve audit findings and repeat verification when needed.
|
|
176
|
+
5. **COMPLETE** — record evidence, update tracking, and close the work item.
|
|
154
177
|
|
|
155
|
-
|
|
156
|
-
|---------|-------------|
|
|
157
|
-
| `/model` | Switch LLM provider and model |
|
|
158
|
-
| `/provider` | Configure API keys (interactive picker) |
|
|
159
|
-
| `/help` | Show all commands |
|
|
160
|
-
| `/new` | Start a fresh conversation |
|
|
161
|
-
| `/history` | Browse past sessions |
|
|
162
|
-
| `/goal` | Set a persistent goal |
|
|
163
|
-
| `/loop` | Schedule recurring checks |
|
|
164
|
-
| `/telemetry` | Toggle analytics (on/off/status) |
|
|
165
|
-
| `/theme:toggle` | Switch light/dark mode |
|
|
166
|
-
| `/init` | Scaffold agent config files |
|
|
178
|
+
No code is written without a converged plan, and the implementing agent cannot serve as the final verifier.
|
|
167
179
|
|
|
168
|
-
|
|
180
|
+
## Features
|
|
169
181
|
|
|
170
|
-
|
|
171
|
-
|
|
182
|
+
### Multi-agent orchestration
|
|
183
|
+
|
|
184
|
+
- Nine canonical agents coordinate through ECHO with explicit separation of duties.
|
|
185
|
+
- Child agents receive only their authorized tool subset through strict allowlist filtering.
|
|
186
|
+
- Parallel agent work supports exploration, research, implementation, and independent review.
|
|
187
|
+
- FID-bound execution keeps implementation tied to an approved specification.
|
|
188
|
+
|
|
189
|
+
### Thinker and sequential reasoning
|
|
190
|
+
|
|
191
|
+
The Thinker accumulates typed sequential reasoning steps and converges to a non-null final artifact containing status, synthesis, payload, metrics, and thoughts. Thinker cascades preserve prompt inheritance while keeping child tools restricted.
|
|
192
|
+
|
|
193
|
+
### Safe execution and tool-call hardening
|
|
194
|
+
|
|
195
|
+
- Fail-closed handling for incomplete, malformed, or truncated native tool calls.
|
|
196
|
+
- Strict tool schema validation with safe coercion of stringified numbers and booleans.
|
|
197
|
+
- Programmatic tool primitives with explicit authorization boundaries.
|
|
198
|
+
- Write-gate checkpoints capture files before `write_file`, `str_replace`, or `apply_patch` changes.
|
|
199
|
+
- Tool errors, cancellation, retry, and child-agent failures are surfaced rather than silently treated as success.
|
|
200
|
+
|
|
201
|
+
### Checkpoint and Rewind
|
|
202
|
+
|
|
203
|
+
Each user turn can persist the pre-edit content of every first-touched file, including subagent writes. `/rewind` supports:
|
|
204
|
+
|
|
205
|
+
- **Code only** — restore files while keeping the conversation.
|
|
206
|
+
- **Conversation only** — restore the transcript boundary without changing files.
|
|
207
|
+
- **Both** — restore code and conversation together.
|
|
208
|
+
- **Fork** — restore the selected turn into a fresh chat.
|
|
209
|
+
|
|
210
|
+
Retention is bounded to the most recent 20 turns, restore paths are revalidated, and terminal side effects are intentionally not rewound. No Git repository is required.
|
|
211
|
+
|
|
212
|
+
### Permissions and modes
|
|
213
|
+
|
|
214
|
+
- `--permission-mode safe|prompt|unsafe` selects the startup policy.
|
|
215
|
+
- `/permissions` (aliases `/sandbox` and `/safety`) views or changes the policy.
|
|
216
|
+
- `safe` denies risky tools; `prompt` currently also denies them because interactive confirmations are not yet implemented; `unsafe` allows them explicitly.
|
|
217
|
+
- `EDIT`, `ANALYZE`, and `SCAFFOLD` modes change the execution scope at runtime.
|
|
218
|
+
|
|
219
|
+
### Planning, review, and goals
|
|
220
|
+
|
|
221
|
+
- `/interview` turns an underspecified idea into a structured specification.
|
|
222
|
+
- `/plan` creates an implementation plan.
|
|
223
|
+
- `/review` opens a focused code-review workflow.
|
|
224
|
+
- `/goal` defines a verifiable goal.
|
|
225
|
+
- `/loop` schedules recurring checks with cadence, run counts, and convergence detection.
|
|
226
|
+
|
|
227
|
+
### Context and project knowledge
|
|
228
|
+
|
|
229
|
+
- Four-layer progressive context compaction keeps large repositories within model limits.
|
|
230
|
+
- `knowledge.md` files provide durable project conventions and preferences.
|
|
231
|
+
- User-level knowledge can be loaded alongside project knowledge.
|
|
232
|
+
- OpenClaw-format `SKILL.md` files are discovered and exposed as native skills.
|
|
233
|
+
- MCP servers are discovered at startup and their tools are published to the model.
|
|
234
|
+
- Gateway model context lengths can be resolved from the live catalog.
|
|
235
|
+
|
|
236
|
+
### Terminal UI
|
|
237
|
+
|
|
238
|
+
- Token-by-token streaming with cancellation and retry backoff.
|
|
239
|
+
- Universal copy actions for code blocks, tool output, and diffs.
|
|
240
|
+
- Light/dark themes with the Neon Slate aesthetic.
|
|
241
|
+
- Collapsible sidebar sections and FID cards.
|
|
242
|
+
- `@filename` and `@AgentName` autocomplete.
|
|
243
|
+
- Bash mode via `!command` or `/bash` with permission enforcement.
|
|
244
|
+
- Masked provider setup and health diagnostics.
|
|
245
|
+
- Telemetry consent controls through `/telemetry status|enable|disable`.
|
|
246
|
+
- Optional image attachments for multimodal providers.
|
|
247
|
+
|
|
248
|
+
### SDK and runtime
|
|
249
|
+
|
|
250
|
+
The package ships the CLI on top of shared runtime and SDK capabilities:
|
|
251
|
+
|
|
252
|
+
- `SavantCodeClient` for running agents from Node.js, Bun, or browser applications.
|
|
253
|
+
- Streaming `RunState` events for progress, tool calls, diffs, and final output.
|
|
254
|
+
- Custom `AgentDefinition[]` agents and custom tool definitions.
|
|
255
|
+
- `AbortSignal` cancellation propagated through subagent streams.
|
|
256
|
+
- Checkpoint APIs (`openTurn`, `captureSnapshot`, `closeTurn`, `listTurns`, `restoreTurn`, and `forkFrom`).
|
|
257
|
+
- LLM-agnostic runtime with OpenAI-compatible, Anthropic, Ollama, and gateway provider shims.
|
|
258
|
+
- Per-call token counts and USD cost estimates surfaced in run state.
|
|
259
|
+
|
|
260
|
+
## Slash Command Reference
|
|
261
|
+
|
|
262
|
+
Commands can be entered with `/`; aliases are shown in parentheses. Some commands are intentionally unavailable in Savant-Free builds.
|
|
263
|
+
|
|
264
|
+
| Command | Purpose |
|
|
265
|
+
| --- | --- |
|
|
266
|
+
| `/help` (`/h`, `/?`) | Show command help and tips |
|
|
267
|
+
| `/new` (`/clear`, `/reset`) | Start a fresh conversation |
|
|
268
|
+
| `/history` (`/chats`) | Browse and resume previous sessions |
|
|
269
|
+
| `/copy` (`/export`) | Copy the complete conversation |
|
|
270
|
+
| `/interview` | Create a structured specification |
|
|
271
|
+
| `/plan` | Create an implementation plan |
|
|
272
|
+
| `/review` | Review code changes |
|
|
273
|
+
| `/goal` (`/g`) | Iterate toward a verifiable goal |
|
|
274
|
+
| `/loop` (`/repeat`) | Schedule recurring checks; use `status` or `stop` |
|
|
275
|
+
| `/verify` (`/typecheck`) | Run all four core workspace typechecks or one selected workspace |
|
|
276
|
+
| `/permissions` (`/sandbox`, `/safety`) | View or set the tool permission mode |
|
|
277
|
+
| `/rewind` (`/undo`, `/checkpoint`) | Restore code and/or conversation from a prior turn |
|
|
278
|
+
| `/health` (`/status`, `/check`) | Check provider, Ollama, model, and permission status |
|
|
279
|
+
| `/diagnostics` (`/diag`, `/processes`) | Show local process and resource diagnostics |
|
|
280
|
+
| `/provider` | Configure a hosted provider key with masked input |
|
|
281
|
+
| `/model` | Select or switch the active model |
|
|
282
|
+
| `/publish` | Publish agent templates through the Savant backend |
|
|
283
|
+
| `/feedback` (`/bug`, `/report`) | Open the feedback flow |
|
|
284
|
+
| `/telemetry` (`/analytics`) | View or change remote analytics consent |
|
|
285
|
+
| `/theme:toggle` | Switch between light and dark themes |
|
|
286
|
+
| `/bash` (`!`) | Run a shell command or enter Bash mode |
|
|
287
|
+
| `/image` (`/img`, `/attach`) | Attach an image for supported multimodal models |
|
|
288
|
+
| `/init` | Create starter agent types and `knowledge.md` |
|
|
289
|
+
| `/login` / `/logout` | Authenticate or end the current session |
|
|
290
|
+
| `/exit` (`/quit`, `/q`) | Quit the CLI |
|
|
172
291
|
|
|
173
292
|
## Usage Examples
|
|
174
293
|
|
|
175
294
|
**Implement a feature:**
|
|
295
|
+
|
|
176
296
|
> Add a rate limiter to the API endpoints that allows 100 requests per minute per IP address, with Redis-backed counting.
|
|
177
297
|
|
|
178
298
|
**Fix a bug:**
|
|
299
|
+
|
|
179
300
|
> The login form crashes on submit when the email field is empty. Find the bug and fix it.
|
|
180
301
|
|
|
181
302
|
**Write tests:**
|
|
303
|
+
|
|
182
304
|
> Add unit tests for the UserService class covering all edge cases in the register flow.
|
|
183
305
|
|
|
184
306
|
**Refactor:**
|
|
307
|
+
|
|
185
308
|
> Refactor the database connection layer to use connection pooling instead of creating a new connection per request.
|
|
186
309
|
|
|
187
310
|
**Code review:**
|
|
188
|
-
|
|
311
|
+
|
|
312
|
+
> Review my recent changes and flag security issues, performance problems, and style violations.
|
|
189
313
|
|
|
190
314
|
## Troubleshooting
|
|
191
315
|
|
|
192
|
-
### Permission
|
|
316
|
+
### Permission errors
|
|
317
|
+
|
|
318
|
+
Use a user-writable Node/npm installation or, where appropriate, install globally with elevated permissions:
|
|
193
319
|
|
|
194
320
|
```bash
|
|
195
321
|
sudo npm install -g savant-code
|
|
196
322
|
```
|
|
197
|
-
Or [reinstall Node](https://nodejs.org/en/download) to fix global permissions.
|
|
198
323
|
|
|
199
|
-
### Corporate
|
|
324
|
+
### Corporate proxy or firewall
|
|
200
325
|
|
|
201
326
|
```bash
|
|
202
327
|
export HTTPS_PROXY=http://your-proxy-server:port
|
|
203
328
|
savant-code
|
|
204
329
|
```
|
|
205
330
|
|
|
206
|
-
### No
|
|
331
|
+
### No model available
|
|
332
|
+
|
|
333
|
+
Run `/provider` to configure one of the hosted gateways, or install and start [Ollama](https://ollama.com) for local inference.
|
|
207
334
|
|
|
208
|
-
|
|
209
|
-
|
|
335
|
+
### Direct-provider mode cannot connect
|
|
336
|
+
|
|
337
|
+
Confirm that `DIRECT_PROVIDER`, `INFERENCE_BASE_URL`, and the selected credential are set in the same shell that launches Savant-Code. For OpenRouter, verify the precedence order above and use `/health` to inspect the active mode.
|
|
210
338
|
|
|
211
339
|
## Links
|
|
212
340
|
|
|
213
341
|
- **GitHub:** [github.com/savant0x/savant-code](https://github.com/savant0x/savant-code)
|
|
214
|
-
- **
|
|
342
|
+
- **Documentation:** [savant-code.com/docs](https://savant-code.com/docs)
|
|
215
343
|
- **Issues:** [GitHub Issues](https://github.com/savant0x/savant-code/issues)
|
|
216
344
|
- **License:** [Apache 2.0](https://github.com/savant0x/savant-code/blob/main/LICENSE)
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
_Savant-Code is the public TypeScript monorepo for the Savant-Code agent framework._
|