# Crush

> A coding agent that lives in your terminal, wired into your tools and any LLM you choose

- Category: AI Coding / Autonomous Coding Agents
- Language: Go
- Repository: https://github.com/charmbracelet/crush
- Canonical page: https://ai-tldr.dev/tools/crush/

## In short

Crush is an open-source coding agent that runs inside your terminal. Built by Charm in Go, it connects your code, your tools, and your workflows to the large language model you prefer. It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in Go.

## Overview

Crush is an open-source coding agent that runs inside your terminal. Built by Charm in Go, it connects your code, your tools, and your workflows to the large language model you prefer. You can pick from a wide range of models or add your own through any OpenAI- or Anthropic-compatible API, and it works in every terminal on macOS, Linux, Windows (PowerShell and WSL), Android, FreeBSD, OpenBSD, and NetBSD.

Crush keeps separate work sessions and contexts per project, so you can hold several threads of work at once. It reads extra context from language servers (LSPs) the same way a developer would, and you can extend what it can do by wiring in Model Context Protocol (MCP) servers over stdio, HTTP, or SSE. A handy detail is that you can switch the underlying model mid-session while keeping your context, which is useful when one model fits a task better than another.

It runs well with no configuration: grab an API key for a provider such as Anthropic, OpenAI, Groq, or OpenRouter, start Crush, and it prompts you for the key. For deeper control, a JSON config file lets you define providers, LSPs, MCP servers, permissions, and ignored files.

## What it does

- Multi-model: choose from many LLMs or add your own through any OpenAI- or Anthropic-compatible API
- Switch models mid-session while keeping your context intact
- Session-based: keep multiple work sessions and contexts per project
- LSP-enhanced: pulls extra context from language servers like a developer would
- Extensible through MCP servers over stdio, HTTP, and SSE, plus Agent Skills support
- Runs in every terminal across macOS, Linux, Windows (PowerShell and WSL), Android, and the BSDs

## Getting started

Install Crush with a package manager (or Go), then run it and enter an API key for your preferred provider. You can also set a provider environment variable instead of being prompted.

1. Install Crush

   Use a package manager such as Homebrew or npm. The npm package is published as @charmland/crush.

```bash
brew install charmbracelet/tap/crush
# or
npm install -g @charmland/crush
```

2. Or install with Go

   If you have a Go toolchain, install the latest release directly.

```bash
go install github.com/charmbracelet/crush@latest
```

3. Set a provider key and start

   Export an API key for your provider (or just run crush and paste the key when prompted), then launch it in your project directory.

```bash
export ANTHROPIC_API_KEY=...
crush
```

4. Customize when needed

   Crush runs fine with no configuration. To customize, add a crush.json file in your project (or at $HOME/.config/crush/crush.json) to define providers, LSP servers, MCP servers, and tool permissions.

## When to use it

- Make code changes from the terminal by chatting with an agent that can read, edit, and run your project
- Hold several independent work sessions per project, each with its own context
- Switch between LLM providers or models mid-task without losing the conversation
- Add custom capabilities (for example file or GitHub tools) by connecting MCP servers
