ConardLi/easy-agent

Fully recreating Claude Code from scratch, so anyone can learn how it works.

Easy Agent – a terminal‑native coding assistant

What it is – Easy Agent is an open‑source command‑line application written in TypeScript/Node.js that lets you talk to large language models (Claude, OpenAI, Gemini, Ollama, etc.) and have the model act on your local filesystem, shell, web, or custom plugins. It mimics the “Claude Code” experience but runs entirely in the terminal and is built to be extensible.

Current status – The project has completed 36 development stages (a release‑candidate) and is awaiting its first npm publication. All core features, a step‑by‑step tutorial, packaging, installer scripts and documentation are in place; the only pending step is publishing the eagent package and confirming the published binary works.


Core capabilities (as listed in the README)

  • LLM communication layer – streaming chat with Anthropic, OpenAI‑compatible, Gemini and local Ollama providers.
  • Terminal UI – built with React‑Ink for an interactive REPL; also supports headless mode, JSON/NDJSON output, and image/screenshot input.
  • Tool ecosystem – file read/write, multi‑edit, glob/grep, Bash/PowerShell execution, web fetch/search, and MCP (Model‑Control‑Protocol) resources.
  • Permission system – allow/ask/deny rules, Plan mode (read‑only planning) and Auto mode (classifier‑guided permission).
  • Session management – persistent sessions, resume, history, export, file checkpoints, rewind, and token‑budget handling.
  • Extensibility – skills, custom sub‑agents, hooks, plugins, and a marketplace for community extensions.
  • Multi‑agent collaboration – background agents, work‑tree isolation, and Agent Teams for coordinated work.
  • Multimodal input – images and screenshots can be sent to the model.
  • Packaging – distributed as a single‑file ESM bundle on npm; installer script for macOS/Linux.

Quick start (from the README)

# set an Anthropic token (or configure any supported provider)
export ANTHROPIC_AUTH_TOKEN="your-token"

# try without installing
npx --yes eagent@latest

# or install globally
npm install -g --ignore-scripts eagent
 eagent   # start the REPL

You can also run the provided installer script:

curl -fsSL https://raw.githubusercontent.com/ConardLi/easy-agent/main/install.sh | sh

Configuration can be placed in ~/.easy-agent/settings.json (or a project‑local .easy-agent/settings.json). Example profile for OpenAI, Gemini and Ollama is shown in the README.


Typical workflow commands

Command What it does
/help Lists all REPL commands
/model … Switches the active model/profile
/plan Enters read‑only planning mode
/auto Enables classifier‑assisted permission
/resume / /history Work with saved sessions
/rewind / /diff Inspect or revert file changes
/plugin / /marketplace Install/manage extensions
-p "prompt" (CLI) Run a one‑off prompt in headless mode, optionally with --output-format json

Architecture (as described)

Terminal UI
   ↓
QueryEngine (multi‑turn orchestration)
   ↓
Agentic Loop (reason → tool → observe)
   ↓
Tools & permission enforcement
   ↓
Provider API adapters (streaming)

The five layers are packaged into a single npm bundle with source maps and no runtime dependencies beyond Node.js.


Who might use it?

  • Developers who want an LLM‑powered coding assistant directly in their terminal without a heavyweight IDE plugin.
  • Teams building custom AI‑augmented CLI tools, since the system is designed to be extended via plugins, skills, and sub‑agents.
  • Researchers or hobbyists exploring agentic loops, tool‑use, and multi‑agent collaboration in a lightweight, reproducible environment.

How to contribute / get help

  • Clone the repo, run npm install, then npm run dev for a hot‑reloading dev build.
  • Run the provided scripts (npm run typecheck, npm run test:stage36, etc.) to verify the build.
  • Issues are accepted; pull requests are not yet open.
  • Documentation and troubleshooting steps are included in the README.

License – MIT.

Related

  • Project
  • Project
  • Project
  • Project
  • Project