eEph
Open source · MIT · Install in one line

The coding agent
for your terminal.

Eph-Code edits real files from the command line — with a permission gate in front of every tool. Try the same engine in your browser first.

Try Eph in your browser

20,000 free credits when you sign in. No card required.

Agent loop

A while loop you can actually read

No agent framework underneath. The conversation loop is a hand-written loop over the model stream: text and tool calls come back, tools run, results go in, repeat. Roughly 240 lines, including retries, doom-loop detection and context compaction.

for (let step = 0; step < MAX_STEPS; step++) {
  const response = await LLM.stream({ model, system, messages })

  for await (const event of response.fullStream) {
    switch (event.type) {
      case "text-delta": /* stream to the TUI */ break
      case "tool-call":  /* queue for execution */ break
    }
  }

  if (toolCalls.length === 0) return "stop"
  if (isDoomLoop(recentToolCalls)) return "stop"
  if (SessionCompaction.isOverflow(id)) return "compact"
}
Tools

Seven tools, each behind a permission gate

read, write, edit, glob, grep, bash. Every call passes a permission check before it touches your machine, and bash asks every time by default. Nothing runs silently.

eph-code
read src/session/processor.ts
grep "isDoomLoop"
bash bun test
AllowDeny
Editing

Nine matching strategies so edits land

Models rarely reproduce whitespace exactly. Rather than fail, the edit tool tries a ladder of replacers — exact, line-trimmed, block-anchored, whitespace-normalised, indentation-flexible — and falls back to similarity scoring before giving up.

SimpleReplacer
LineTrimmedReplacer
BlockAnchorReplacer
WhitespaceNormalized
IndentationFlexible
EscapeNormalized
MultiOccurrence
TrimmedBoundary
ContextAware
Providers

Any model, one environment variable

Anthropic, Google, and any OpenAI-compatible endpoint. Switch providers without touching code — the session layer only ever sees a language model interface.

# DeepSeek (default)
EPH_MODEL=deepseek/deepseek-chat

# Anthropic
EPH_MODEL=anthropic/claude-opus-5

# Google
EPH_MODEL=google/gemini-3-pro

Three models, one balance

Start cheap and escalate only when a question deserves it. Every model draws from the same credits at its own rate.

DeepSeek
DeepSeek V4 Flash

Fast and very cheap. The default for everyday chat.

22 / 66 credits per 1K tokens
OpenAIsoon
GPT-5.6 Sol

OpenAI's frontier tier. Strongest general reasoning.

250 / 1500 credits per 1K tokens
Anthropicsoon
Claude Opus 5

Best at code and long-form writing. Powers Eph-Code.

250 / 1250 credits per 1K tokens

Install the CLI

Requires Bun 1.x — the binary runs on Bun, not Node. Bring your own provider key; you pay the provider directly, at cost.

Terminal
$bun install -g eph-code
$echo "DEEPSEEK_API_KEY=sk-..." > .env
$eph-code

npmjs.com/package/eph-code · source on GitHub

Frequently asked

How is this different from other coding agents?

Mostly by being small. The whole agent is around 2,000 lines with no framework underneath, so you can read the loop, the tool registry and the permission layer in one sitting and know exactly what it will do to your files.

Does it run commands without asking?

No. bash is set to ask by default and prompts before every execution. Read-only tools are allowed automatically; anything that writes goes through the same permission check.

What does the web chat cost?

Nothing to start. Signed-out visitors get a couple of free messages, and creating an account adds 20,000 credits with no card required. After that credits are prepaid — you are charged for tokens actually used, and unused reservations are refunded automatically.

Is the web chat the same thing as the CLI?

Same model layer, different surface. The chat has no file tools — it cannot read or write anything on your machine, which is the point of a browser. The CLI is where the agent actually edits code.

Do I need an API key?

For the CLI, yes — you bring your own provider key, so you pay the provider directly at cost. The web chat runs on credits instead, so you can try it without setting anything up.

Can I install it with npm instead of Bun?

No — install it with Bun. The executable is TypeScript with a Bun shebang, so Node cannot run it and `npm install -g eph-code` will install fine but fail on launch with a syntax error. Bun is required at runtime, not just to build.

Is it open source?

The CLI is MIT licensed and on GitHub. Read it, fork it, or lift whichever module you need.

Try it in a browser tab

No install, no key, no card. A couple of messages free, then 20,000 credits when you sign in.

Try Eph