whip

module
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2026 License: Apache-2.0

README

        ▄ ▄   ▄ ▄ ▄ ▄   ▄
        █ █   █   █ █▀▀▀█▀▀▄
        ▀█▀ ▄▄█   █ █   █
        whip — a fast coding-agent harness in Go

An LLM tool-use loop (bash / read / write / edit / subagent), an interactive bubbletea session, and provider-routable models. One binary, no runtime, config you can read.

Why whip

  • Agent harnesses should be FAST — literally as fast as possible. whip is built in Go around that constraint: parallel tool calls, streaming everything, nothing between you and the model but a loop.
  • Defaults across other harnesses suck. They all have awesome patterns, but none of them bring them all together. whip cherry-picks the best ideas from pi, opencode, codex, and exo into one opinionated harness (see docs/roadmap.md — every feature cites its source).
  • Go is great for networking-heavy applications, and harnesses do a whole lot of networking. whip leans on channels where the TypeScript reference designs hand-roll promises — per-path file locks and background subagents collapse into primitives the compiler checks (docs/concurrency.md).
  • whip is focused on a future where open-source models are the preferred models. Keeping up with those models is hard — whip brings you an opinion on what model you should be using: live discovery from every provider's catalog, new models surfaced in the picker, a fast default that tracks the frontier.

Install

curl -fsSL https://raw.githubusercontent.com/context-labs/whip/main/install.sh | sh

Checksum-verified prebuilt binaries (Linux/macOS, x64/arm64). Or from source (Go ≥ 1.27):

go install github.com/context-labs/whip/cmd/whip@latest

Then whip and you're in. Defaults to inference.net models — any OpenAI-compatible endpoint works as a provider. One command wires up OpenRouter's whole catalog (/model lists every model, no per-model config):

whip auth openrouter   # masked key prompt — or /auth openrouter in-session

To update to the latest release later, run whip update — it re-runs the install script above.

First things to try

/context-doctor     audit what a fresh session injects, in tokens
/goal <text>        work until done
/model              pick a model — type to filter (new) entries come from the
                    provider catalog, no config needed

Drop a .mcp.json in your repo and MCP servers just appear (/mcp to see them). ctrl+c once interrupts; twice quits.

Docs

The full setup, config reference, MCP, browser/computer-use, and how everything works: docs/README.md.

Highlights:

Directories

Path Synopsis
cmd
whip command
whip is a minimal coding agent harness.
whip is a minimal coding agent harness.
internal
agent
Package agent runs the LLM tool-use loop.
Package agent runs the LLM tool-use loop.
browser
Package browser provides whip's native browser subsystem: one Go binary driving the user's live Chrome (their real cookies/sessions), a dedicated whip-owned Chrome, or a headless instance — no Python, no Node.
Package browser provides whip's native browser subsystem: one Go binary driving the user's live Chrome (their real cookies/sessions), a dedicated whip-owned Chrome, or a headless instance — no Python, no Node.
browser/extrelay
embed.go embeds the unpacked extension so `whip browser install` can materialize it with no network fetch and no repo checkout.
embed.go embeds the unpacked extension so `whip browser install` can materialize it with no network fetch and no repo checkout.
computer
Package computer is whip's computer-use subsystem: drive the user's actual desktop (apps, windows, mouse, keyboard, screen) — with browsers as the flagship case.
Package computer is whip's computer-use subsystem: drive the user's actual desktop (apps, windows, mouse, keyboard, screen) — with browsers as the flagship case.
config
Package config loads and saves whip's JSONC configuration from ~/.whip.
Package config loads and saves whip's JSONC configuration from ~/.whip.
inferencenet
Package inferencenet implements first-class Inference.net auth for whip: the browser-based device-authorization login (bring-your-own-account, no key handling) plus machine API-key provisioning over the relay's tRPC surface.
Package inferencenet implements first-class Inference.net auth for whip: the browser-based device-authorization login (bring-your-own-account, no key handling) plus machine API-key provisioning over the relay's tRPC surface.
llm
Package llm is a minimal streaming client for OpenAI-compatible chat completions APIs.
Package llm is a minimal streaming client for OpenAI-compatible chat completions APIs.
lsp
Package lsp implements whip's Language Server Protocol support: a small stdlib-only LSP client over stdio that feeds compiler/linter diagnostics back into the model's tool results after write/edit calls.
Package lsp implements whip's Language Server Protocol support: a small stdlib-only LSP client over stdio that feeds compiler/linter diagnostics back into the model's tool results after write/edit calls.
mcp
Package mcp implements whip's Model Context Protocol support: a client that connects to configured MCP servers (stdio and streamable HTTP) and exposes their tools to the agent loop, plus a server (`whip mcp serve`) exposing whip's own tools.
Package mcp implements whip's Model Context Protocol support: a client that connects to configured MCP servers (stdio and streamable HTTP) and exposes their tools to the agent loop, plus a server (`whip mcp serve`) exposing whip's own tools.
memory
Package memory is whip's durable memory: plain markdown files of checkbox bullets that the model appends to with `remember` and marks done with `forget`, and the user can read, edit, or delete in any editor.
Package memory is whip's durable memory: plain markdown files of checkbox bullets that the model appends to with `remember` and marks done with `forget`, and the user can read, edit, or delete in any editor.
schedule
Package schedule parses and evaluates task schedules for whip's wakeup channel: '@every 10m' for interval work, '@at <rfc3339>' for one-shots.
Package schedule parses and evaluates task schedules for whip's wakeup channel: '@every 10m' for interval work, '@at <rfc3339>' for one-shots.
session
Package session persists chat histories in ~/.whip/sessions.db (SQLite).
Package session persists chat histories in ~/.whip/sessions.db (SQLite).
skills
Package skills discovers SKILL.md files and renders them into the system prompt.
Package skills discovers SKILL.md files and renders them into the system prompt.
tools
Permission gating for the tools that touch the world: bash, write, edit.
Permission gating for the tools that touch the world: bash, write, edit.
tools/bashrun
Package bashrun executes shell commands (via the user's shell, see userShell) for the agent, with optional PTY support for interactive programs (sudo, ssh, gpg) that prompt on the controlling terminal.
Package bashrun executes shell commands (via the user's shell, see userShell) for the agent, with optional PTY support for interactive programs (sudo, ssh, gpg) that prompt on the controlling terminal.
tui
interactive.go: PTY-backed interactive command runner for the bash tool.
interactive.go: PTY-backed interactive command runner for the bash tool.
update
Package update checks GitHub for a newer whip release and leaves a notice in ~/.whip for the next startup report.
Package update checks GitHub for a newer whip release and leaves a notice in ~/.whip for the next startup report.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL