# Quake Code

Quake Code is a terminal coding assistant for reading files, editing code, running shell commands, managing sessions, and working with multiple model providers from a single CLI.

## Install

```bash
npm install -g @mrquake/quakecode-cli
```

Then start it:

```bash
quake-code
```

## Quick Start

### Login with a subscription provider

Start Quake Code and run:

```text
/login
```

Supported subscription providers depend on the underlying provider layer and local configuration. In this fork, OpenAI Codex is commonly used as the default provider.

### Or use API keys

Examples:

```bash
export ANTHROPIC_API_KEY=...
quake-code
```

```bash
export OPENAI_API_KEY=...
quake-code --provider openai --model gpt-4o-mini
```

## Core Features

- Interactive terminal UI
- Print mode for scripting
- Session save, resume, fork, and export
- Built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
- Skills, prompts, extensions, and themes
- Multiple providers and model switching

## Common Commands

Inside Quake Code:

- `/login` — authenticate with a provider
- `/model` — select a model
- `/settings` — open settings
- `/resume` — resume a previous session
- `/new` — start a new session
- `/reload` — reload extensions, skills, prompts, and themes
- `/quit` — exit

## CLI Usage

```bash
quake-code [options] [@files...] [messages...]
```

### Useful examples

```bash
quake-code
quake-code "Review the current project"
quake-code -p "Summarize this repository"
quake-code --provider openai-codex --model gpt-5.4
quake-code --tools read,grep,find,ls -p "Review this codebase"
```

## Configuration Paths

Quake Code uses its own config directory and does not need to share runtime state with upstream pi:

- Global config: `~/.quake-code/agent`
- Settings: `~/.quake-code/agent/settings.json`
- Auth: `~/.quake-code/agent/auth.json`
- Sessions: `~/.quake-code/agent/sessions`
- Extensions: `~/.quake-code/agent/extensions`
- Skills: `~/.quake-code/agent/skills`
- Prompts: `~/.quake-code/agent/prompts`
- Themes: `~/.quake-code/agent/themes`

## Environment Variables

- `QUAKE_CODE_CODING_AGENT_DIR`
- `QUAKE_CODE_PACKAGE_DIR`
- `QUAKE_CODE_OFFLINE`
- `QUAKE_CODE_SHARE_VIEWER_URL`
- `QUAKE_CODE_AI_ANTIGRAVITY_VERSION`

Provider-specific environment variables still apply, such as:

- `ANTHROPIC_API_KEY`
- `OPENAI_API_KEY`
- `GEMINI_API_KEY`
- `OPENROUTER_API_KEY`
- `AWS_PROFILE`

## Packaging Notes

This package publishes the `quake-code` binary from `dist/cli.js`.

Before publishing:

```bash
bun run build
npm pack
```

For a local install test:

```bash
npm install -g ./mrquake-quakecode-cli-0.64.0.tgz
quake-code --help
```

## License

MIT
