# Quickstart

> Install RaptorCode, connect your DeepSeek key and run your first four-agent swarm, then review and keep its work.

This guide takes you from nothing to a reviewed swarm run. It assumes a git repository to work in; any project with at least one commit will do.

#### 1. Install RaptorCode

Install a package for your platform from the [download page](https://raptorcode.dev/download), or build from source:

```bash
cargo install --locked --git https://github.com/RaptorLabsHQ/raptorcode raptor-cli
```

See [Installation](https://raptorcode.dev/docs/installation) for every option, checksums and the macOS and Windows steps.

#### 2. Get a DeepSeek API key

Create a key at [platform.deepseek.com/api_keys](https://platform.deepseek.com/api_keys) and add balance to the account. You can export it for the current shell:

```bash
export DEEPSEEK_API_KEY=sk-...
```

Or skip this: on the first run, `raptor` asks for the key, checks it with DeepSeek's free balance endpoint and saves it owner-only in `~/.raptor/.credentials`. More in [DeepSeek setup](https://raptorcode.dev/docs/deepseek).

#### 3. Check your environment

From inside your repository:

```bash
raptor doctor
```

It confirms the repository is detected and that `git` is available.

#### 4. Open the REPL and grant consent

```bash
raptor
```

After the startup screen and the key check, RaptorCode asks once per session:

```text
  ⚡  Agentic Mode

  Allow RaptorCode to execute shell commands and modify files?
  Grants access to the full file system as your user.

  Grant permission? [y/N]:
```

Answer yes to let agents work. This grants access to your file system as your user; answering no gives you a chat-only session. Read the [safety model](https://raptorcode.dev/docs/security) before using it on code you don't trust.

#### 5. Describe what you want

Type a request, for example:

```text
Add a /health endpoint, show its status on the page and cover it with tests.
```

In a git repository, each request launches the live swarm: four agents work in parallel, each in its own worktree, on a dashboard that shows their steps and files. Answer confirmations with `y` or `n`, press `1`–`4` to focus an agent, and `q` or `Esc` to stop the run.

#### 6. Review the results

When the run ends, the summary prints the task id. The changes are still uncommitted in the role worktrees:

```bash
raptor review <task-id>          # changed files per role
raptor diff <task-id> backend-agent
raptor test <task-id>            # runs the detected test command in every role worktree
```

#### 7. Keep what you want

Commit inside a role's worktree, then merge its branch from your checkout:

```bash
git -C .raptor/worktrees/<task-id>/backend-agent add -A
git -C .raptor/worktrees/<task-id>/backend-agent commit -m "Add the /health endpoint"
git merge raptor/<task-id>/backend-agent
```

Repeat for each role you keep. Nothing reaches your branch until you do this.

## Try the other modes

```bash
raptor chat "Explain this project"                         # plain chat, no tools
raptor run "Fix the failing test in src/parser.rs"         # one agent, headless
raptor run --yes --model deepseek-flash "Add a --json flag" # approve gray-zone actions, use Flash
raptor tui                                                 # read-only dashboard
```

- [The REPL](https://raptorcode.dev/docs/repl): Slash commands, consent and how requests are routed.
- [Review and merge](https://raptorcode.dev/docs/review-and-merge): Everything about inspecting, testing and keeping agent work.
