Skip to content
View moncho-cli's full-sized avatar
  • Joined Nov 18, 2026

Block or report moncho-cli

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
moncho-cli/README.md

Moncho

Moncho

A terminal coding agent that runs itself in a container: it reads, patches, searches and runs commands, then shows you what it did. Docker keeps it off your machine; Moncho keeps it on the rails — the container is the fence, and inside it every tool is bounded by what it may reach and how. Its state never touches your repository, and it talks to any OpenAI-compatible provider or to Ollama.

  • It contains itself. One allow-listed command at a time, and never code from its arguments — node -e, python3 -c, find -exec and xargs are refused; file tools cannot leave the project root; state lives in a named volume, not your checkout.
  • Writes are verified. edit_file replaces literal text and reads the file back byte-for-byte before reporting success; a diff you pasted is applied verbatim.
  • Long sessions stay cheap. A stable request prefix means the prompt cache is hit on every turn after the first: 98.8% cached over 201 requests in a half-hour session. The numbers.
  • A context budget it manages. Usage is estimated per call, compaction is announced before it runs, and the tail of the conversation stays verbatim.
  • Every call says why. Each call carries an intent shown beside its result, and three modes scope what it reaches: chat reads, design writes the tracking pair, work is unrestricted. Tab walks the ring.
  • Nothing leaves the machine but the model calls. No telemetry, no analytics.

What it looks like

Moncho

Install

curl -fsSL https://raw.githubusercontent.com/moncho-cli/moncho-cli/main/scripts/install.sh | bash

The installer stages the payload under ~/.config/moncho-cli and links moncho-cli onto your PATH. It needs curl, tar and a working Docker daemon — and no Node.js on the host, because the agent runs in a container. Pin a release with MONCHO_REF=v0.1.1; install elsewhere with MONCHO_HOME=/opt/moncho.

To upgrade, run the same command again. A later --ref is installed beside the version you have (a session is pinned to the build that wrote it, so the older tree is kept and stays reachable with moncho-cli --version), and the new one becomes the default: the moncho-cli on your PATH, the code baked into moncho-agent: and the payload mounted in the container all follow it. Re-running with the same ref replaces that tree in place.

Then, in any project directory:

moncho-cli

The first run prepares the directory: it adopts an existing Dockerfile when there is one, otherwise it asks for the project kind and writes a Monchofile from a starter. It bakes the agent base image once, builds the project image, and starts the agent with your workspace mounted at /app. State — sessions, task.md, the plan, the log, your skins — lives in a named volume, so nothing is written into your repository.

The directory must be a git repository: Moncho refuses to start otherwise and tells you to run git init, because a checkout is what keeps its own files (.moncho/, and agent/ under --state-in-repo) out of your history. It excludes them through .git/info/exclude, never your .gitignore, so your working tree is untouched. Pass --skip-git for a deliberate exception.

Provider settings go in ./.env.moncho — see .env.moncho.example. Moncho has no default provider: the agent calls the endpoint you name, so the first run in a directory whose env file sets none asks for the endpoint, the model and the key, tests the endpoint with one real request from inside the container, and writes ./.env.moncho only once it answers. Set the endpoint (OPENAI_BASE_URL), the key (OPENAI_API_KEY, omitted for Ollama) and the model (OPENAI_MODEL); a few optional knobs (CONTEXT_MAX_LENGTH, PULSE_LIMIT, LOG_LEVEL) sit beside them. A generic .env is deliberately ignored, so a project's own credentials never become the agent's provider. The full table is in USAGE.md.

What it costs

A long session stays affordable because the request prefix never changes: the prompt cache is hit on every turn after the first. These are the provider's own numbers, read from the OpenRouter dashboard after real sessions.

Session Requests Tokens Cached
Half an hour 201 28.7M 98.8%
One hour 526 79.1M 98.1%
Three hours 1k+ 170M 96%

The OpenRouter dashboard after half an hour: 201 requests, 28.7M tokens, a 98.8% cache hit rate

The OpenRouter dashboard after one hour: 526 requests, 79.1M tokens, a 98.1% cache hit rate

The OpenRouter dashboard after three hours: over 1k requests, 170M tokens, a 96% cache hit rate

A compacted session shows the same accounting in the transcript, with the summary chunk in place of the block it replaced — the conversation above it is gone, its essence is not.

A transcript where the older share of the conversation has been replaced by one summary chunk

Measuring the agent

A bench measures the agent on a public benchmark, and it is a separate program with its own install — it is not part of moncho-cli, because a bench measures the agent and must not travel inside it. So moncho-cli bench … reaches a companion, moncho-bench, and until that companion is installed the CLI tells you exactly that:

curl -fsSL https://raw.githubusercontent.com/moncho-cli/moncho-cli/main/bench/install.sh | bash

That stages the framework under ~/.config/moncho-bench and links moncho-bench onto your PATH. A bench then lives in a directory of its own, and moncho-cli bench is only one of two spellings — moncho-bench works the same way, and MONCHO_BENCH_HOME=. bash bench/bench.sh runs this checkout with nothing staged:

cd ~/benches && moncho-cli bench init --kind swe --name swe-lite
cd swe-lite && $EDITOR .env.bench      # the provider, the model and the key for THIS bench
moncho-cli bench build && moncho-cli bench select && moncho-cli bench run && moncho-cli bench grade

A bench drives containers, so it needs Docker, network access and more host tooling than the agent does; bench/README.md states the full list and what each stage is for.

Uninstall

moncho-cli can remove itself — no download, no clone:

moncho-cli uninstall

That deletes the ~/.local/bin/moncho-cli entry and the staged tree in MONCHO_HOME (default ~/.config/moncho-cli) and nothing else: your project directories, their Monchofile, .env.moncho and .moncho/ are untouched. It needs no Docker daemon.

The Docker images and the named moncho-state-* volumes are left in place on purpose — the volumes are your session history, one per workspace. To take those too:

moncho-cli uninstall --purge --yes

If the installation is already broken or half-removed, the installer carries the same job: curl -fsSL …/scripts/install.sh | bash -s -- --uninstall. See USAGE.md for the details.

The two rules of a Monchofile

  1. The first FROM is moncho-agent; the agent's runtime sits under your app's.
  2. No ENTRYPOINT: the runner appends the agent's own, so your server does not start instead of the agent.

Everything else is an ordinary Dockerfile. See templates/README.md for the contract and demos/README.md for a run-through.

Documentation

Document What it covers
USAGE.md Install and run on Linux and macOS, configuration, commands, sessions, modes
REQUIREMENTS.md What the host, the container and the provider must provide
CONTRIBUTING.md Forks, pull requests, the maintainer loop, the realm rule
PRIVACY.md What is sent, what is stored, and where
LIABILITY.md The warranty and responsibility position
docs/README.md The behavioural contract: one spec per capability
tests/README.md The proof: one suite per capability
bench/README.md The bench framework: measuring the agent on SWE-bench Lite, and the host it needs

The three realms

Realm Where Role
Code app/, api/, config/, tools/, utils/, main.js The truth: what the agent does
Docs docs/<domain>/<capability>/ The contract: behaviour.md plus spec.yaml
Tests tests/ The proof: one suite per capability

A behaviour is finished when a spec describes it and a test proves it. npm test enforces the links: a spec directory without its pair, a path#symbol that names nothing, or a source module no spec covers all fail the suite.

Layout

main.js              the host loop: front end, sessions, commands, tracking
app/                 conversation manager, tool batches, context window, TUI
api/                 the provider call: retries, normalisation, the system prompt
config/              constants and config/prompt.md
utils/               sandbox, patch, sessions, logger, compaction, usage
bin/                 the container runner (moncho-cli) and its libraries
scripts/             the installer
docs/  tests/        the contract and the proof

agent/ is gitignored and holds the session state, tracking files and the log. It is disposable: delete it and the next run starts clean.

Developing the agent

The maintainer loop runs this checkout in its own container, through ./start.sh. See CONTRIBUTING.md for the full instructions; the short version is ./start.sh run (or make dev) to run it, and ./start.sh exec npm test for the suite — inside that container.

Licence

MIT. See LICENSE. The warranty position is in LIABILITY.md.

Popular repositories Loading

  1. moncho-cli moncho-cli Public

    Opinionated permission-less agentic interface

    JavaScript 1