aegiscode 3.0.8

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,386 @@
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, no keys needed** — run fully local with Ollama. Nothing leaves your machine, no API key, no account.
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/aegiscode
41
+ cd aegiscode
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
+ ## Desktop GUI
52
+
53
+ aegiscode also ships as a native Electron desktop app — same AI engine, same memory, with a split-pane terminal + shell.
54
+
55
+ **Download (Linux / macOS / Windows):**
56
+
57
+ → **[aegiscloud.org/aegiscode#download](https://aegiscloud.org/aegiscode#download)**
58
+
59
+ ```bash
60
+ # Linux
61
+ wget https://pub-a975e7eee93c4432a2bf952f50705bf1.r2.dev/aegiscode-gui.deb
62
+ sudo dpkg -i aegiscode-gui.deb
63
+ ```
64
+
65
+ **Launch:**
66
+
67
+ ```bash
68
+ aegis
69
+ ```
70
+
71
+ **Tabs:**
72
+
73
+ | Tab | Description |
74
+ |-----|-------------|
75
+ | Terminal ⌨ | Full aegiscode session with true color and resize support |
76
+ | History ◷ | Browse and resume past sessions |
77
+ | Memory ⬡ | Search stored memory entries, view stats, manage subscription |
78
+ | Cloud ⬡ | Cloud sync status and API key |
79
+ | Settings ⚙ | Configure API key and model |
80
+
81
+ Memory and cloud sync are activated by pasting your API key in the Memory tab after subscribing at [aegiscloud.org](https://aegiscloud.org).
82
+
83
+ ---
84
+
85
+ ## First run
86
+
87
+ Run `aegis` — if no API keys are configured, an interactive setup guide launches automatically:
88
+
89
+ ```
90
+ ◆ aegiscode — Setup
91
+
92
+ Keys are saved to ~/.aegiscode/.env
93
+
94
+ Select provider:
95
+ ❯ Anthropic (Claude) ANTHROPIC_API_KEY
96
+ OpenAI (GPT) OPENAI_API_KEY
97
+ DeepSeek DEEPSEEK_API_KEY
98
+ Groq GROQ_API_KEY
99
+ Google Gemini GEMINI_API_KEY
100
+ Ollama (local) (no key needed)
101
+ ```
102
+
103
+ Pick a provider, paste your key, and optionally add more. Keys are saved to `~/.aegiscode/.env` and the app starts immediately.
104
+
105
+ **Or configure manually** — create `~/.aegiscode/.env`:
106
+
107
+ ```env
108
+ ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY
109
+ OPENAI_API_KEY=YOUR_OPENAI_API_KEY
110
+ DEEPSEEK_API_KEY=YOUR_DEEPSEEK_API_KEY
111
+ GROQ_API_KEY=YOUR_GROQ_API_KEY
112
+ GEMINI_API_KEY=YOUR_GEMINI_API_KEY
113
+ ```
114
+
115
+ Only add the keys for providers you want to use. aegiscode picks them up automatically.
116
+
117
+ ---
118
+
119
+ ## Claude Code Pro/Max subscription login
120
+
121
+ Already paying for Claude Code? Use your subscription instead of a pay-per-token Anthropic API key:
122
+
123
+ ```bash
124
+ claude setup-token # generates a Claude Code OAuth token (sk-ant-oat...)
125
+ aegis login --claude-pro # paste it in
126
+ ```
127
+
128
+ 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.
129
+
130
+ ---
131
+
132
+ ## Quick start
133
+
134
+ ```bash
135
+ aegis # interactive mode
136
+ aegis "refactor this file" # start with a message
137
+ aegis --model deepseek-chat # use a specific model
138
+ aegis --router # start with the auto-router on
139
+ aegis --continue # resume last session
140
+ aegis --resume <session-id> # resume specific session
141
+ ```
142
+
143
+ ---
144
+
145
+ ## Configuration
146
+
147
+ Config lives at `~/.aegiscode/config.json`. It is created automatically on first run.
148
+
149
+ API keys are read from `~/.aegiscode/.env` — you don't need to put them in `config.json`.
150
+
151
+ To add a custom model inside the app:
152
+
153
+ ```
154
+ /model add openrouter-mixtral "Mixtral 8x7B" mistralai/mixtral-8x7b-instruct https://openrouter.ai/api/v1 sk-or-...
155
+ ```
156
+
157
+ ---
158
+
159
+ ## Built-in models
160
+
161
+ | ID | Model | Provider |
162
+ |----|-------|----------|
163
+ | `claude-fable-5` | claude-fable-5 | Anthropic |
164
+ | `claude-sonnet-4` | claude-sonnet-4-6 | Anthropic |
165
+ | `claude-opus-4` | claude-opus-4-8 | Anthropic |
166
+ | `claude-haiku-4` | claude-haiku-4-5-20251001 | Anthropic |
167
+ | `openai-gpt-5.5` | gpt-5.5 | OpenAI |
168
+ | `openai-gpt-4o` | gpt-4o | OpenAI |
169
+ | `openai-o3` | o3 | OpenAI |
170
+ | `deepseek-chat` | deepseek-chat | DeepSeek |
171
+ | `deepseek-reasoner` | deepseek-reasoner | DeepSeek |
172
+ | `groq-llama` | llama-3.3-70b-versatile | Groq |
173
+ | `groq-deepseek` | qwen-qwq-32b | Groq |
174
+ | `gemini-2.5-pro` | gemini-2.5-pro | Google |
175
+ | `gemini-2.5-flash` | gemini-2.5-flash | Google |
176
+ | `ollama-local` | llama3.2 | Ollama (local) |
177
+
178
+ Any OpenAI-compatible API can be added as a custom model.
179
+
180
+ ---
181
+
182
+ ## Commands
183
+
184
+ | Command | Alias | Description |
185
+ |---------|-------|-------------|
186
+ | `/help` | `/?` `/h` | Show all commands |
187
+ | `/model` | `/m` | Interactive model switcher |
188
+ | `/model <id>` | | Switch to model by ID |
189
+ | `/model list` | | List all configured models |
190
+ | `/model add <id> <name> <model> <baseURL> <apiKey>` | | Add a custom model |
191
+ | `/model remove <id>` | | Remove a model |
192
+ | `/router` | | Show auto-router status and tier mapping |
193
+ | `/router on` / `/router off` | | Toggle automatic per-message model routing |
194
+ | `/router set <tier> <id>` | | Pin a model to the simple/medium/complex tier |
195
+ | `/clear` | `/cls` | Clear chat history |
196
+ | `/compact` | | Compress context to save tokens |
197
+ | `/status` | `/st` | Show session info and token usage |
198
+ | `/theme` | `/t` | Switch UI theme |
199
+ | `/thinking` | | Toggle thinking blocks |
200
+ | `/copy` | `/cp` | Copy last code block to clipboard |
201
+ | `/copy N` | | Copy Nth code block |
202
+ | `/yolo` | | Toggle auto-approve for all tool calls |
203
+ | `/multi <task>` | | Run task across multiple agents in parallel |
204
+ | `/multiyolo <task>` | | Same as /multi with auto-approved tool calls |
205
+ | `/build <description>` | `/forge` | Build an app with multiple AI models in parallel |
206
+ | `/council <question>` | | Multi-model majority vote |
207
+ | `/debate <question>` | | Structured multi-model debate across rounds |
208
+ | `/research <question>` | | Multi-agent research |
209
+ | `/memory` | | Manage semantic memory |
210
+ | `/skills` | `/sk` | List loaded skills |
211
+ | `/hooks` | | View and manage hooks |
212
+ | `/version` | `/v` | Show version info |
213
+
214
+ ---
215
+
216
+ ## /router — automatic model routing
217
+
218
+ 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.
219
+
220
+ ```
221
+ /router on # start auto-picking a model per message
222
+ /router set simple deepseek-chat # pin a tier to a specific model id
223
+ /router # show current status + tier mapping
224
+ ```
225
+
226
+ 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.
227
+
228
+ 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.
229
+
230
+ ---
231
+
232
+ ## /build — parallel multi-model app builder
233
+
234
+ `/build` decomposes your task into components, assigns each to the best available AI model, and builds everything simultaneously.
235
+
236
+ ```
237
+ /build a REST API for a todo app with PostgreSQL
238
+ /build a CLI tool that summarizes git commits
239
+ /build a Flask web app with login and dashboard
240
+ ```
241
+
242
+ **How it works:**
243
+
244
+ 1. **Plan** — primary model produces a component tree (JSON)
245
+ 2. **Build** — all components built in parallel, each by the best model for that role:
246
+ - DeepSeek → backend, algorithms (`DEEPSEEK_API_KEY`)
247
+ - GPT-4o → frontend, UI (`OPENAI_API_KEY`)
248
+ - Llama via Groq → tests, docs (`GROQ_API_KEY`)
249
+ - Primary model → architecture, integration
250
+ 3. **Sync** — summary of files written and how to run the app
251
+
252
+ All agents write real files to your current directory. The more API keys you have configured, the more models work in parallel.
253
+
254
+ ---
255
+
256
+ ## /council & /debate — many models, one answer
257
+
258
+ Don't trust a single model on a hard call. Put several to work on it.
259
+
260
+ ```
261
+ /council "is a state machine overkill for this form?" # they vote, consensus wins
262
+ /debate "monorepo vs polyrepo for this team" --rounds 3 # they argue it out across rounds
263
+ /debate "React vs SolidJS" --models gpt-4o,deepseek # pick the panel
264
+ ```
265
+
266
+ `/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.
267
+
268
+ ---
269
+
270
+ ## Tools
271
+
272
+ aegiscode can read, write, and execute files in your project. Tool permissions are configured per-project in `.aegiscode/settings.json`:
273
+
274
+ ```json
275
+ {
276
+ "permissions": {
277
+ "allow": ["Bash(git *)", "Bash(ls *)"],
278
+ "ask": ["Bash(curl *)", "Bash(rm -r *)"],
279
+ "deny": ["Bash(sudo *)", "Read(.env)"]
280
+ }
281
+ }
282
+ ```
283
+
284
+ Permission modes:
285
+
286
+ | Mode | Behavior |
287
+ |------|----------|
288
+ | `default` | Read auto, write requires confirmation |
289
+ | `autoEdit` | Read + write auto, execute requires confirmation |
290
+ | `yolo` | Everything auto-approved |
291
+ | `plan` | Read only, everything else blocked |
292
+
293
+ ---
294
+
295
+ ## Memory
296
+
297
+ Persistent cross-session memory requires an active subscription (€2/month).
298
+
299
+ **How to activate:**
300
+
301
+ 1. Subscribe at [aegiscloud.org](https://aegiscloud.org)
302
+ 2. Check your inbox for the activation token
303
+ 3. Run inside aegiscode:
304
+
305
+ ```
306
+ /memory activate <token>
307
+ ```
308
+
309
+ Once active, the AI remembers your stack, past decisions, and project context across every session — no re-explaining needed.
310
+
311
+ ```
312
+ /memory stats # usage and quota
313
+ /memory clear # wipe stored memory
314
+ ```
315
+
316
+ ---
317
+
318
+ ## Sessions
319
+
320
+ Sessions are stored locally as JSONL files. Resume a previous session:
321
+
322
+ ```bash
323
+ aegis --continue # resume most recent
324
+ aegis --resume <session-id> # resume by ID
325
+ ```
326
+
327
+ 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.
328
+
329
+ ---
330
+
331
+ ## Skills
332
+
333
+ 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.
334
+
335
+ ```
336
+ .aegis/skills/<name>/SKILL.md # project-level, git-tracked
337
+ ~/.aegis/skills/<name>/SKILL.md # user-level, global
338
+ ```
339
+
340
+ `.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.
341
+
342
+ ```
343
+ /skills # list discovered skills
344
+ /load <name> # load a skill's full content on demand
345
+ /skill <name> <desc> # scaffold a new skill
346
+ ```
347
+
348
+ A `SKILL.md` is just frontmatter + instructions:
349
+
350
+ ```markdown
351
+ ---
352
+ name: my-skill
353
+ description: What it does and when to use it — this is what the AI sees by default.
354
+ allowed-tools: [Read, Grep, Bash]
355
+ user-invocable: true
356
+ ---
357
+
358
+ Full instructions, loaded only when the skill is actually triggered.
359
+ ```
360
+
361
+ ---
362
+
363
+ ## MCP
364
+
365
+ aegiscode supports MCP (Model Context Protocol) servers. Configure in `~/.aegiscode/config.json`:
366
+
367
+ ```json
368
+ {
369
+ "mcpEnabled": true,
370
+ "mcpServers": {
371
+ "my-server": {
372
+ "type": "stdio",
373
+ "command": "npx",
374
+ "args": ["-y", "@my/mcp-server"]
375
+ }
376
+ }
377
+ }
378
+ ```
379
+
380
+ ---
381
+
382
+ ## Built by
383
+
384
+ **Niklas Borneklint** — [aegiscloud.org](https://aegiscloud.org) · [@aegisinfo](https://github.com/aegisinfo)
385
+
386
+ Part of the ÆGIS ecosystem.