Terminal agent / Rust, Go, Bun

Code with a local-first agent.

MiawCode keeps standard terminal scrollback while coordinating edits, commands, tools, providers, and subagents.

The runtime combines a Bun and TypeScript CLI, a Go provider daemon, and optional Rust native helpers.

Installation / npm 0.1.0

Install the published CLI.

The npm package installs both miaw and miawcode command names.

Install and run
npm install -g miawcode@0.1.0
miawcode
Build from source
git clone https://github.com/skutanjir/miawcode.git
cd miawcode
bun install
bun run build
./bin/miaw
TUI architecture

Conversation above, controls below.

The split-footer layout keeps transcript output in normal terminal scrollback. The input, status, effort, and mode controls stay docked at the bottom.

Terminal surface
conversation transcript
tool calls and command output
────────────────────────
mode · model · context
prompt input
key hints
Tools and security

Native operations with recoverable edits.

Provider runtime

Direct and gateway-backed model access

The agent can connect directly to supported providers or route through MiawRouter on 127.0.0.1:21128.

Anchored file patching

Rust hashline anchors make edits fail when the target lines have changed instead of applying to the wrong location.

MCP client and server

MiawCode can consume local MCP tools and expose its own tools to another orchestrator.

In-process exploration

Native search and walking avoid repeated shell process startup for common repository reads.

PTY execution

Builds and long-running commands stream through an integrated pseudo-terminal.

Checkpoints and encrypted secrets

File mutations create recoverable checkpoints. Credentials use AES-256-GCM storage with owner-only local files.

Specifications

A cross-platform agent runtime.

ArchitectureBun and TypeScript CLI, Go daemon, optional Rust helpers
ProvidersDirect provider adapters plus MiawRouter gateway support
ToolsFile edits, PTY, LSP, DAP, browser, web, databases, MCP, media, and GitHub
DistributionSource build and npm package workflow
RequirementsBun 1.3+, Go 1.24+, stable Rust for native helpers
LicenseMIT