indusagi-coding-agent
v0.2.2
Published
Indusagi coding agent — a terminal-first AI coding agent, built from scratch on the indusagi framework.
Downloads
1,380
Maintainers
Readme
indusagi coding agent
A terminal-first AI coding agent. Talk to it in your terminal, point it at a
repo, and it reads, writes, runs, and reasons about your code. It runs entirely
on the indusagi framework — one dependency for the LLM API,
agent loop, terminal UI, MCP client, and tracing.
It is built from scratch: every module was written from a behavioral spec and the
framework's public API, never by copying third-party application source. See
CREDITS.md and NOTICE.
indus # start an interactive session in the current repo
indus "fix the failing test in src/auth"
indus -p "summarise what changed on this branch" # headless, prints result, exits
indus --json # line protocol for a driving parent process(The bin is installed as both indus and indusagi.)
Install & build
npm install
npm run build # esbuild bundle -> dist/entry.js + tsc d.ts -> dist/types
npm test # vitest
npm run typecheck # tsc --noEmit
npm run lineage-scan # fails if any external-source marker appears in non-test sourceRequires Node >= 20. Authenticate with an API key — set ANTHROPIC_API_KEY
(or another supported provider key) in the environment, or run indus signin.
API-key auth only; there is no OAuth path.
Run modes
| Invocation | Mode | What it does |
|------------|------|--------------|
| indus | interactive | Ink/React REPL — streaming replies, a live tool deck, slash-commands |
| indus -p "…" / --print | print | One request, prints the final result, exits |
| indus --json / --rpc | line protocol | Newline-delimited JSON for a parent process to drive |
| indus signin / signout | credentials | Store / clear the API key in the local auth vault |
indus --help prints the full flag grammar (generated from one flag table);
indus --version prints the version.
Architecture
The binary is src/entry.ts. Boot resolves the invocation, prepares the
workspace, and selects a runner. Each subsystem is a self-contained module and is
also exported as a namespace from src/index.ts for embedding and testing.
| Module | Responsibility |
|--------|----------------|
| boot | argv → invocation, workspace prep, runner selection, upgrades |
| workspace | per-project + global dirs, settings, session paths |
| launch | flag grammar (readInvocation / renderUsage), @file attachments, credentials, model catalog & pickers |
| conductor | the conversation loop — turns, tool invocation, fault/retry, branch/resume, compaction |
| window-budget | token accounting + context-window compaction policy |
| capability-deck | the tool registry (read/write/bash/glob/grep/fetch/search …) |
| runtime-bridge | framework wiring — models, MCP, providers |
| addons | loadable extensions: skills & subagents |
| console | the interactive Ink/React surface |
| channels | print + line-protocol headless surfaces |
| briefing | system prompt / context assembly |
| transcript-export | session persistence + HTML/markdown export |
| insight | tracing (Trail / Probe / Signal), sinks, replay, secret redaction |
| kit | leaf helpers (image sniff, managed-binary fetch, shell quoting) |
Clean-room posture
npm run lineage-scan runs scripts/lineage-scan.mjs, which walks src/ and
exits non-zero if any non-test file carries an external-source marker. Test files are
excluded by design — several of them assert the absence of those markers. The
scan is part of every release check.
License
See NOTICE and CREDITS.md.
