@standardagents/code
v0.9.1
Published
Standard Code — a terminal coding agent whose LLM loop runs on a Standard Agents instance while its tools execute on your machine via this CLI.
Readme
█████████████
███ ██
██ █
████ ████████ ██
███ ████████ ███
██ ████████ ████
█ ██
██ ███
█████████████Standard Code
A best-in-class terminal coding agent.
The LLM loop runs remotely on a Standard Agents instance; every filesystem and shell tool executes locally on your machine via this CLI — so the agent works in your environment, against your code, with your permissions.
┌─────────────────────────┐ bridge (WebSocket) ┌──────────────────────┐
│ Standard Agents instance│ ── tool_request ──────────────▶ │ Standard Code CLI │
│ (the agent's LLM loop) │ ◀──────────── tool_response ── │ (your machine) │
└─────────────────────────┘ └──────────────────────┘🔒 Early Access
Standard Code is in early access. The agent loop, tooling, and backend are evolving fast, and we're rolling it out gradually to keep the feedback loop tight.
Access is invite-only. To run Standard Code you need:
- A spot on the early-access list — request one at standardagents.ai/early-access.
- A Standard Agents instance exposing the
standard_code_agent(see agentbuilder).
If you're already on the list, you'll have received an instance URL and an API token. Jump to Quick start. If not, join the waitlist — we're letting new folks in every week.
Why Standard Code
- Your machine, your rules. Tools run on your host — read/write/edit files, list, grep, glob, bash, delete — never in some sandboxed cloud container. The agent edits the same files you do.
- Permission-aware by design. A single auto-accept level (1–5) controls what runs unattended;
anything riskier prompts you first. A catastrophic-command guard blocks dangerous shell calls
at every level, so you can't accidentally
rm -rfyour way into a bad day. - Durable, resumable sessions. Long-running and permission-gated calls park and resume over HTTP — a slow approval or a dropped socket can't kill your turn. Resume the same session from any machine.
- Background processes that survive. Dev servers, watchers, queue workers are tracked in the thread and keep running across reconnects and resumes.
- Subagents & research built in. Delegate focused subtasks to a coding subagent, or spin up a non-blocking web-research agent that returns source-backed findings.
- MCP, first-class. The CLI is a Model Context Protocol host — connect local MCP servers (Playwright, databases, issue trackers, anything) and the agent can use them. Install new ones in natural language: "install the playwright mcp server" and it researches and wires them up.
Quick start
Standard Code is a zero-dependency CLI (Node built-ins only). For local development it
runs through tsx; published builds are bundled with tsup:
pnpm install # installs dev dependencies
pnpm code <dir> # run against a project directory (defaults to cwd)
pnpm code --endpoint http://localhost:5178 <dir>Installed from npm:
npx @standardagents/code@latest <dir>
# or
npm install -g @standardagents/code
standardcode <dir>
standardcode --endpoint https://your-instance.example.com <dir>
standardcode -e -- <dir> # prompt for the endpoint for this runOn first run it connects to the hosted Standard Code instance
(https://api.standardcode.ai) and walks you through a one-time browser sign-in — press
Enter, approve in the browser, and your key is stored in ~/.standardagents/credentials.
You only do this once per machine. It then offers to resume a session tagged for this
project + machine, or start a new one.
Use --endpoint [url] or -e [url] to point a single CLI run at a different Standard Agents
instance (local dev, self-hosted). If you omit the URL, the CLI prompts for it. Tokens are
remembered per endpoint, but this override does not change the saved default endpoint.
Requirements
- Node 22+
- A Standard Agents instance exposing the
standard_code_agent(see the agentbuilder repo). For local development, run that backend on:5178and point this CLI athttp://localhost:5178.
Features
- Forwarded tools executed on your host: read/write/edit files, list, grep, glob, bash, delete.
- Permissions: a single auto-accept level 1–5 (shift-tab cycles it); risky calls prompt; a catastrophic-command guard blocks dangerous shell commands at every level.
- Durable, resumable long-running/permission-gated tool calls (park & resume over HTTP).
- Background processes tracked in the thread (survive resume from any machine).
- Subagent delegation and non-blocking web research.
- MCP (Model Context Protocol): connect local MCP servers — the CLI is the MCP host,
negotiating JSON-RPC over stdio. Manage them with
/mcp; install new ones in natural language ("install the playwright mcp server") and the agent researches + installs them.
Tests
pnpm test # typecheck + MCP client/protocol + install actuator (no backend needed)Architecture & contributing
Standard Code is the client half of a two-part system. The agent loop and tool definitions live on the Standard Agents instance (agentbuilder); this CLI connects to a thread, executes the agent's forwarded tool calls on the host, and renders the session.
See AGENTS.md for the full source map, bridge protocol, MCP internals,
test layout, and contributor conventions.
- Zero runtime dependencies — Node built-ins only, run via
tsx. No build step for development. - Commit messages use Conventional Commits, scope
cli(e.g.feat(cli): …).
Built by Standard Agents.
