# little-coder

> A terminal coding agent whose scaffolding is tuned so small local models can finish real coding tasks

- Category: AI Coding / Autonomous Coding Agents
- Language: TypeScript
- Licence: Apache-2.0
- Repository: https://github.com/itayinbarr/little-coder
- Website: https://itayinbarr.github.io/little-coder/
- Canonical page: https://ai-tldr.dev/tools/little-coder/

## In short

little-coder is a terminal coding agent whose scaffolding is tuned so small local models can finish real coding tasks. Its canonical setup is a local llama.cpp server hosting Qwen3.6-35B-A3B, but it also runs against Ollama, LM Studio, any OpenAI-compatible server and hosted providers such as Anthropic and OpenAI. It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in TypeScript and licensed Apache-2.0.

## Overview

little-coder is a terminal coding agent designed around one question: what does the scaffolding around a model need to look like when that model is small and running on your own laptop? Rather than assuming a frontier model that can recover from vague tools and a sprawling context, it changes the harness to fit the model — a lean cold-start context, strict rules on how files are written and edited, and short usage notes injected only when a turn needs them. Its canonical setup is a local llama.cpp server hosting Qwen3.6-35B-A3B, but it also runs against Ollama, LM Studio, any OpenAI-compatible server and hosted providers such as Anthropic and OpenAI.

It is built on top of pi, the minimal coding-agent substrate, without forking it. pi supplies the agent loop, provider abstraction, TUI, sessions and extension model; little-coder adds around thirty TypeScript extensions, thirty skill markdown files and a Python benchmark harness. The launcher runs pi with `--no-extensions` and wires in exactly the bundled set, which the README says keeps the cold-start context around 7k tokens and makes behaviour predictable. You can still add your own extensions in `~/.config/little-coder/extensions/`.

The small-model adaptations are the point of the project. A write guard refuses to let `Write` overwrite an existing file, so the model has to read it and make a targeted `Edit` instead of regenerating the whole thing. A read guard trims reads that would overflow the context window. An output parser repairs malformed tool calls, a quality monitor catches empty, hallucinated or looping responses, a thinking-budget cap retries with thinking off, and a skill selector injects a short card for the tools a turn is likely to need. The README states that these small-model extensions switch themselves off for large or cloud models.

Around that core sit the day-to-day features: a Plan Mode that researches with read-only sub-coders, asks one to three clarifying questions and writes a plan before touching code; separate plan and action models, so you can plan on a bigger model and implement on a smaller one; a Deep Research mode that produces a cited markdown report; background jobs that wake the model on events such as a traceback rather than polling; and a shell-command whitelist that gates `bash`. The project's white paper, *Honey, I Shrunk the Coding Agent*, reports that the scaffold took Qwen3.5-9B from a 19.11% vanilla Aider baseline to 45.56% on Aider Polyglot.

## What it does

- Harness adaptations for small models: read-before-edit, a write guard that forbids rewriting existing files, tool-call repair, loop and hallucination detection, and a per-turn thinking budget
- Per-turn tool skill cards and algorithm cheat sheets injected only when relevant, keeping the cold-start context around 7k tokens
- Local-first model support: llama.cpp, Ollama and LM Studio out of the box, any OpenAI-compatible server via a models.json override, plus hosted providers through pi
- Plan Mode with read-only research sub-coders and clarifying questions, and separate plan and action models handed over with /implement
- Background jobs via ShellStart that wake the model on exit, a matching log line or silence instead of polling
- A shell permission gate with a safe-prefix whitelist, extendable with LITTLE_CODER_BASH_ALLOW or switched to manual approval

## Getting started

little-coder is an npm package that needs Node.js 22.19 or newer. Install it globally, serve a local model (or set a cloud API key), and launch it from your project directory.

1. Install

   The one-line installer and npm are equivalent; bun works for installing, but the launcher still runs on Node.

```bash
curl -fsSL https://raw.githubusercontent.com/itayinbarr/little-coder/main/install.sh | bash

# or
npm install -g little-coder
```

2. Serve a local model

   The simplest route is Ollama. The README's tuned setup is llama.cpp serving Qwen3.6-35B-A3B on port 8888, with MoE experts kept in system RAM so it fits an 8 GB GPU; LM Studio also works.

```bash
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen3.5
```

3. Set the placeholder API key

   pi expects some value in the provider's key variable even though local servers ignore it. For cloud models, set the usual `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` instead.

```bash
export OLLAMA_API_KEY=noop
export LLAMACPP_API_KEY=noop
```

4. Launch it in your project

   The directory you launch from is the agent's working directory. Bare `little-coder` starts the default model from models.json; `--list-models` shows everything registered.

```bash
cd ~/your-project
little-coder --model ollama/qwen3.5
little-coder --model llamacpp/qwen3.6-35b-a3b
little-coder --list-models
```

5. Plan before you build

   Press Ctrl+Q to toggle Plan Mode. little-coder researches, asks clarifying questions and writes a plan to `.pi/approved-plan.md`; `/implement` then starts a fresh session on the action model. The same flow works headless.

```bash
little-coder -p --plan-mode "add rate limiting to the ingest endpoint"
```

6. Allow your build commands

   Shell calls outside the built-in whitelist are blocked by default. Add the prefixes your project needs, or switch to manual approval.

```bash
export LITTLE_CODER_BASH_ALLOW="make ,docker compose ps"
# or prompt before every shell command and edit
export LITTLE_CODER_PERMISSION_MODE=manual
```

## When to use it

- Reach for it when you want a coding agent that works fully offline on a laptop GPU with an open-weight model
- Reach for it when a general-purpose agent keeps derailing on your small local model — rewriting whole files, emitting broken tool calls or looping
- Reach for it to plan on a larger model and implement on a smaller, faster one without switching models by hand
- Reach for it to study how scaffold design changes small-model results, using its bundled extensions and benchmark harness as a starting point
