Terminal-native agent for real codebases

A coding agent that learns your project before it changes it.

Topchester builds a local map of your repo first, then uses it while planning, editing, checking work, and keeping project knowledge current.

topchester / terminal agent

Quickstart

Start in three steps.

Install the CLI, add your OpenRouter key, and choose a model when you launch. No config file is required.

1. Install
curl -fsSL https://topchester.com/install.sh | sh
2. Set key export OPENROUTER_API_KEY=...
3. Start in your project
topchester -m openrouter/google/gemini-3.7-flash

Once inside Topchester, run /kb init and /kb sync to build project knowledge. The model choice stays with the session.

Optional config

Add config only when it helps.

The -m provider/model flag is enough for a session. Add topchester.jsonc for a durable default, shared project policy, or separate KB model. Keep API keys out of it.

Durable default
{
  "$schema": "https://topchester.com/schemas/config.v1.json",
  "models": {
    "default": "openrouter/google/gemini-3.7-flash"
  }
}
Split chat and KB models
{
  "$schema": "https://topchester.com/schemas/config.v1.json",
  "models": {
    "default": "openrouter/anthropic/claude-sonnet-4.5",
    "kb.summarize": "openrouter/google/gemini-3.7-flash"
  }
}
01

Project knowledge first

Topchester builds and syncs a repo-local topchester-kb/ so the agent starts from a project map instead of rediscovering everything from raw files.

02

Drift-aware workflow

It shows when project knowledge is stale and lets you sync changed files back into the KB.

03

Terminal-native TUI

Chat, inspect tool output, review diffs, resume sessions, and keep working from the terminal without switching into a heavyweight IDE workflow.

Features

Built for real repository work.

Topchester combines a repo knowledge base with the practical tools expected from a coding agent: file edits, tests, Git, sessions, and safe command execution.

KB-first context

Sync a local project map before work starts, then keep it current as files change.

Drift-aware sync

Use kb status, kb sync, and kb sync --full to keep knowledge fresh.

Terminal-native TUI

Chat, review tool output, follow progress, and resume work without leaving the terminal.

Precise file tools

Read, search, create, and edit workspace files with hash-aware safeguards around writes.

Tests and checks

Run test, lint, typecheck, build, format-check, and smoke commands through a strict validator path.

Git workflow

Inspect status, diffs, and logs, then stage or commit only explicitly acknowledged files.

Task planning

Keep a visible session plan for multi-step changes without burying the thread in checklist prose.

Subagents and sessions

Delegate focused exploration, persist session logs, and resume the latest project-local conversation.

Model flexibility

Choose a model at launch with -m provider/model, or add config for durable routing.

Local by default

Store project knowledge, caches, logs, and sessions in predictable repo-local folders.

Workflow

Sync knowledge, then code with context.

  1. Start with a model reference or your saved default.
  2. Initialize and sync the project knowledge base.
  3. Ask the agent to plan, edit, test, and keep the KB fresh.