aegiscode 3.4.3 → 4.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Niklas Borneklint
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,362 @@
1
+ # aegiscode
2
+
3
+ **aegiscode remembers your project between sessions — so you never have to re-explain your stack, decisions, or context.**
4
+
5
+ <picture>
6
+ <source media="(prefers-color-scheme: dark)" srcset="assets/demo.svg">
7
+ <img src="assets/demo.svg" alt="aegiscode terminal demo — animated" width="100%"/>
8
+ </picture>
9
+
10
+ Multi-model terminal coding assistant. Works with Claude, OpenAI, DeepSeek, Groq, Gemini and Ollama. BYOK — your keys, your cost.
11
+
12
+ - **Private AI, BYOK** — run fully local with Ollama, no API key needed. A free aegiscloud.org account is still required to start the app (one-time Google login), but nothing you run locally leaves your machine.
13
+ - **A model that grows over time** — `/router` auto-picks the cheapest model that can handle each task and learns from every session, so cost drops while quality holds.
14
+ - **Many models, one answer** — `/council` votes and `/debate` makes them argue it out, so you get a reasoned consensus instead of one model's guess.
15
+ - **Cloud sync — $2/month** — keep cross-session semantic memory and sync every session across machines. Activate with a single code.
16
+
17
+ > ### Semantic memory — €2/month
18
+ > The AI remembers your project, stack, and decisions across every session.
19
+ > Subscribe at **[aegiscloud.org](https://aegiscloud.org)**, then activate with one command:
20
+ >
21
+ > ```
22
+ > /memory activate <token>
23
+ > ```
24
+
25
+ ---
26
+
27
+ ## Install
28
+
29
+ > Requires **Node.js >= 22**. Install via [nvm](https://github.com/nvm-sh/nvm): `nvm install 22`
30
+
31
+ > **Important:** Use [Kitty](https://sw.kovidgoyal.net/kitty/) (recommended) or a modern terminal emulator (Ghostty, WezTerm, Alacritty, iTerm2, Windows Terminal) for the best experience. Older terminals may have rendering issues.
32
+
33
+ ```bash
34
+ npm install -g aegiscode
35
+ ```
36
+
37
+ Or from source:
38
+
39
+ ```bash
40
+ git clone https://github.com/aegisinfo/aegiscodex-
41
+ cd aegiscodex-
42
+ bash install.sh
43
+ ```
44
+
45
+ `install.sh` builds the project and creates an `aegis` wrapper in `~/.local/bin` — no sudo needed.
46
+
47
+ Either way, the command is `aegis`.
48
+
49
+ ---
50
+
51
+ ## First run
52
+
53
+ Run `aegis` — the first thing it does is open your browser for a one-time login to your free aegiscloud.org account (Google sign-in). This is required even for fully local/Ollama-only use; once logged in, the session is cached and you won't see it again.
54
+
55
+ After login, if no API keys are configured, an interactive setup guide launches automatically:
56
+
57
+ ```
58
+ ◆ aegiscode — Setup
59
+
60
+ Keys are saved to ~/.aegiscode/.env
61
+
62
+ Select provider:
63
+ ❯ Anthropic (Claude) ANTHROPIC_API_KEY
64
+ OpenAI (GPT) OPENAI_API_KEY
65
+ DeepSeek DEEPSEEK_API_KEY
66
+ Groq GROQ_API_KEY
67
+ Google Gemini GEMINI_API_KEY
68
+ Ollama (local) (no key needed)
69
+ ```
70
+
71
+ Pick a provider, paste your key, and optionally add more. Keys are saved to `~/.aegiscode/.env` and the app starts immediately.
72
+
73
+ **Or configure manually** — create `~/.aegiscode/.env`:
74
+
75
+ ```env
76
+ ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY
77
+ OPENAI_API_KEY=YOUR_OPENAI_API_KEY
78
+ DEEPSEEK_API_KEY=YOUR_DEEPSEEK_API_KEY
79
+ GROQ_API_KEY=YOUR_GROQ_API_KEY
80
+ GEMINI_API_KEY=YOUR_GEMINI_API_KEY
81
+ ```
82
+
83
+ Only add the keys for providers you want to use. aegiscode picks them up automatically.
84
+
85
+ ---
86
+
87
+ ## Claude Code Pro/Max subscription login
88
+
89
+ Already paying for Claude Code? Use your subscription instead of a pay-per-token Anthropic API key:
90
+
91
+ ```bash
92
+ claude setup-token # generates a Claude Code OAuth token (sk-ant-oat...)
93
+ aegis login --claude-pro # paste it in
94
+ ```
95
+
96
+ The token is saved to `~/.aegiscode/.env` as `CLAUDE_CODE_OAUTH_TOKEN` and takes priority over `ANTHROPIC_API_KEY` for any Anthropic model. Anthropic only allows OAuth subscription tokens to make API calls through the official `claude` binary, so aegiscode shells out to it instead of calling the API directly — the `claude` CLI must be installed and on `PATH`. Tool calls (file edits, shell commands) run through `claude`'s own permission system, following whichever permission mode you've set in aegiscode.
97
+
98
+ ---
99
+
100
+ ## Quick start
101
+
102
+ ```bash
103
+ aegis # interactive mode
104
+ aegis "refactor this file" # start with a message
105
+ aegis --model deepseek-chat # use a specific model
106
+ aegis --router # start with the auto-router on
107
+ aegis --continue # resume last session
108
+ aegis --resume <session-id> # resume specific session
109
+ aegis --print "what does this repo do?" # headless — print response, exit
110
+ aegis --print --output-format json "summarize this" # headless JSON output, for scripts
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Configuration
116
+
117
+ Config lives at `~/.aegiscode/config.json`. It is created automatically on first run.
118
+
119
+ API keys are read from `~/.aegiscode/.env` — you don't need to put them in `config.json`.
120
+
121
+ To add a custom model inside the app:
122
+
123
+ ```
124
+ /model add openrouter-mixtral "Mixtral 8x7B" mistralai/mixtral-8x7b-instruct https://openrouter.ai/api/v1 sk-or-...
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Built-in models
130
+
131
+ | ID | Model | Provider |
132
+ |----|-------|----------|
133
+ | `claude-fable-5` | claude-fable-5 | Anthropic |
134
+ | `claude-sonnet-4` | claude-sonnet-4-6 | Anthropic |
135
+ | `claude-opus-4` | claude-opus-4-8 | Anthropic |
136
+ | `claude-haiku-4` | claude-haiku-4-5-20251001 | Anthropic |
137
+ | `openai-gpt-5.5` | gpt-5.5 | OpenAI |
138
+ | `openai-gpt-4o` | gpt-4o | OpenAI |
139
+ | `openai-o3` | o3 | OpenAI |
140
+ | `deepseek-chat` | deepseek-chat | DeepSeek |
141
+ | `deepseek-reasoner` | deepseek-reasoner | DeepSeek |
142
+ | `groq-llama` | llama-3.3-70b-versatile | Groq |
143
+ | `groq-deepseek` | qwen-qwq-32b | Groq |
144
+ | `gemini-2.5-pro` | gemini-2.5-pro | Google |
145
+ | `gemini-2.5-flash` | gemini-2.5-flash | Google |
146
+ | `ollama-local` | llama3.2 | Ollama (local) |
147
+
148
+ Any OpenAI-compatible API can be added as a custom model.
149
+
150
+ ---
151
+
152
+ ## Commands
153
+
154
+ Full reference with copy-paste examples: **[aegiscloud.org/aegiscode/commands](https://aegiscloud.org/aegiscode/commands)**
155
+
156
+ | Command | Alias | Description |
157
+ |---------|-------|-------------|
158
+ | `/help [command]` | `/?` `/h` | Show all commands, or detailed help for one |
159
+ | `/model [id]` | `/m` | Interactive model switcher, or switch by ID |
160
+ | `/model list` | | List all configured models |
161
+ | `/model add <id> <name> <model> <baseURL> <apiKey>` | | Add a custom model |
162
+ | `/model remove <id>` | | Remove a model |
163
+ | `/router [on\|off\|stats]` | | Show/toggle auto-router status and tier mapping |
164
+ | `/router set <tier> <id>` | | Pin a model to the simple/medium/complex tier |
165
+ | `/effort [off\|low\|medium\|high\|max]` | | Set Claude's extended-thinking effort level |
166
+ | `/confirm [on\|off] [model-id]` | `/confirmations` | Toggle tool-call confirmation prompt |
167
+ | `/yolo [on\|off]` | | Toggle auto-approve for all tool calls |
168
+ | `/clear` | `/cls` | Clear chat history |
169
+ | `/compact` | | Compress context to save tokens |
170
+ | `/status` | `/st` | Show session info and token usage |
171
+ | `/tokens` | `/tok` | Token usage graph and estimated spend |
172
+ | `/theme [name]` | `/t` | Show or switch UI theme |
173
+ | `/thinking` | | Toggle thinking blocks |
174
+ | `/copy [n\|last\|list]` | `/cp` | Copy a code block to clipboard |
175
+ | `/multi <task>` | | Run task across multiple agents in parallel |
176
+ | `/multiyolo <task>` | | Same as `/multi` with auto-approved tool calls |
177
+ | `/build <description>` | `/forge` | Build an app with multiple AI models in parallel |
178
+ | `/clone <url> [--name <project>]` | `/fetch-site` `/websnap` | Clone a website using DeepSeek |
179
+ | `/council <question>` | | Multi-model majority vote |
180
+ | `/debate <topic> [--rounds N]` | `/db` | Structured multi-model debate across rounds |
181
+ | `/research <question>` | | Multi-agent research |
182
+ | `/memory [activate\|stats\|load\|upload\|clear]` | | Manage semantic memory |
183
+ | `/cloud [status\|key <k>\|activate\|deactivate]` | | Manage AEGIS Cloud sync |
184
+ | `/billing` | | Show subscription and billing info |
185
+ | `/skills [refresh]` | `/sk` | List and manage loaded skills |
186
+ | `/hooks [status\|list]` | | View and manage hooks |
187
+ | `/mcp [tools\|<server>]` | | Show MCP server status and tools |
188
+ | `/version` | `/v` | Show version info |
189
+
190
+ ---
191
+
192
+ ## /router — automatic model routing
193
+
194
+ aegiscode can pick which configured model handles each message for you, based on how hard the task actually looks — so a quick lookup doesn't pay for an expensive model, and a real architecture question doesn't get shortchanged by a cheap one.
195
+
196
+ ```
197
+ /router on # start auto-picking a model per message
198
+ /router set simple deepseek-chat # pin a tier to a specific model id
199
+ /router # show current status + tier mapping
200
+ ```
201
+
202
+ Classification is a handful of cheap heuristics (message length, question phrasing, keywords like "architecture" or "security") — no extra model call to decide. When no tier is pinned explicitly, it defaults to a fixed cost-ordered list of the built-in models filtered to ones you have an API key for — and learns from there: if you abort (`Esc`/`Ctrl+C`) a response, that costs the model handling it some confidence for that tier, so a model that keeps getting cut off loses ground to the next cheapest one over time. `/router stats` shows the learned success rate per tier and model. This is a noisy signal (people abort for reasons that have nothing to do with quality too), so don't expect it to be perfectly tuned after a handful of sessions — it's real adaptation from real usage, not a black box.
203
+
204
+ Running `/model <id>` always wins — it pins your choice for the rest of the session and the router backs off until you run `/router on` again. The status bar shows `model: <name> (auto)` whenever the router picked it for you.
205
+
206
+ ---
207
+
208
+ ## /build — parallel multi-model app builder
209
+
210
+ `/build` decomposes your task into components, assigns each to the best available AI model, and builds everything simultaneously.
211
+
212
+ ```
213
+ /build a REST API for a todo app with PostgreSQL
214
+ /build a CLI tool that summarizes git commits
215
+ /build a Flask web app with login and dashboard
216
+ ```
217
+
218
+ **How it works:**
219
+
220
+ 1. **Plan** — primary model produces a component tree (JSON)
221
+ 2. **Build** — all components built in parallel, each by the best model for that role:
222
+ - DeepSeek → backend, algorithms (`DEEPSEEK_API_KEY`)
223
+ - GPT-4o → frontend, UI (`OPENAI_API_KEY`)
224
+ - Llama via Groq → tests, docs (`GROQ_API_KEY`)
225
+ - Primary model → architecture, integration
226
+ 3. **Sync** — summary of files written and how to run the app
227
+
228
+ All agents write real files to your current directory. The more API keys you have configured, the more models work in parallel.
229
+
230
+ ---
231
+
232
+ ## /council & /debate — many models, one answer
233
+
234
+ Don't trust a single model on a hard call. Put several to work on it.
235
+
236
+ ```
237
+ /council "is a state machine overkill for this form?" # they vote, consensus wins
238
+ /debate "monorepo vs polyrepo for this team" --rounds 3 # they argue it out across rounds
239
+ /debate "React vs SolidJS" --models gpt-4o,deepseek # pick the panel
240
+ ```
241
+
242
+ `/council` sends the question to multiple configured models simultaneously, then surfaces the majority answer with the dissents. `/debate` runs a structured, multi-round discussion — each model sees the others' arguments and refines or pushes back — so you get reasoning, not just a tally. Both auto-pick from the models you have keys for; add more keys, get a bigger panel.
243
+
244
+ ---
245
+
246
+ ## Tools
247
+
248
+ aegiscode can read, write, and execute files in your project. Tool permissions are configured per-project in `.aegiscode/settings.json`:
249
+
250
+ ```json
251
+ {
252
+ "permissions": {
253
+ "allow": ["Bash(git *)", "Bash(ls *)"],
254
+ "ask": ["Bash(curl *)", "Bash(rm -r *)"],
255
+ "deny": ["Bash(sudo *)", "Read(.env)"]
256
+ }
257
+ }
258
+ ```
259
+
260
+ Permission modes:
261
+
262
+ | Mode | Behavior |
263
+ |------|----------|
264
+ | `default` | Read auto, write requires confirmation |
265
+ | `autoEdit` | Read + write auto, execute requires confirmation |
266
+ | `yolo` | Everything auto-approved |
267
+ | `plan` | Read only, everything else blocked |
268
+
269
+ ---
270
+
271
+ ## Memory
272
+
273
+ Persistent cross-session memory requires an active subscription (€2/month).
274
+
275
+ **How to activate:**
276
+
277
+ 1. Subscribe at [aegiscloud.org](https://aegiscloud.org)
278
+ 2. Check your inbox for the activation token
279
+ 3. Run inside aegiscode:
280
+
281
+ ```
282
+ /memory activate <token>
283
+ ```
284
+
285
+ Once active, the AI remembers your stack, past decisions, and project context across every session — no re-explaining needed.
286
+
287
+ ```
288
+ /memory stats # usage and quota
289
+ /memory clear # wipe stored memory
290
+ ```
291
+
292
+ ---
293
+
294
+ ## Sessions
295
+
296
+ Sessions are stored locally as JSONL files. Resume a previous session:
297
+
298
+ ```bash
299
+ aegis --continue # resume most recent
300
+ aegis --resume <session-id> # resume by ID
301
+ ```
302
+
303
+ If cloud sync is active (`/cloud activate`, requires an aegiscloud.org API key), every session is also uploaded and browsable from **[aegiscloud.org/dashboard](https://aegiscloud.org/dashboard)** — search, folders, notes, and bulk export, from any browser. The desktop GUI's Cloud tab links straight there.
304
+
305
+ ---
306
+
307
+ ## Skills
308
+
309
+ Skills are Markdown files (`SKILL.md`) that teach aegiscode a specialized capability or house rule — discovered automatically, loaded only when relevant so they don't cost tokens up front.
310
+
311
+ ```
312
+ .aegis/skills/<name>/SKILL.md # project-level, git-tracked
313
+ ~/.aegis/skills/<name>/SKILL.md # user-level, global
314
+ ```
315
+
316
+ `.claude/skills/` is also scanned for compatibility with Claude Code skills. Project-level skills win over user-level ones with the same name, so a project can override a global skill with local knowledge.
317
+
318
+ ```
319
+ /skills # list discovered skills
320
+ /skills <name> # show a skill's full details
321
+ /skills refresh # rescan skill directories
322
+ ```
323
+
324
+ A `SKILL.md` is just frontmatter + instructions:
325
+
326
+ ```markdown
327
+ ---
328
+ name: my-skill
329
+ description: What it does and when to use it — this is what the AI sees by default.
330
+ allowed-tools: [Read, Grep, Bash]
331
+ user-invocable: true
332
+ ---
333
+
334
+ Full instructions, loaded only when the skill is actually triggered.
335
+ ```
336
+
337
+ ---
338
+
339
+ ## MCP
340
+
341
+ aegiscode supports MCP (Model Context Protocol) servers. Configure in `~/.aegiscode/config.json`:
342
+
343
+ ```json
344
+ {
345
+ "mcpEnabled": true,
346
+ "mcpServers": {
347
+ "my-server": {
348
+ "type": "stdio",
349
+ "command": "npx",
350
+ "args": ["-y", "@my/mcp-server"]
351
+ }
352
+ }
353
+ }
354
+ ```
355
+
356
+ ---
357
+
358
+ ## Built by
359
+
360
+ **Niklas Borneklint** — [aegiscloud.org](https://aegiscloud.org) · [@aegisinfo](https://github.com/aegisinfo)
361
+
362
+ Part of the ÆGIS ecosystem.