# Get Started with the CLI

> Install the Done Bear CLI, sign in, select a workspace, and create your first task.

Install the Done Bear CLI, sign in, choose a workspace, and create your first task.

## Before you begin

- Install Node.js 18 or newer.
- Make sure you can open a browser on the same machine where you run the CLI.

## 1. Install the CLI

Run:

```bash
npm install -g donebear
donebear --version
```

You can also inspect the available commands right away:

```bash
donebear --help
donebear spec
```

## 2. Sign in

Existing account, browser on this machine:

```bash
donebear auth login
```

The CLI opens your browser and waits for the OAuth callback on `http://127.0.0.1:8787/auth/callback`.

If you need to copy the URL into a browser yourself, run:

```bash
donebear auth login --no-open
```

If the default callback port is busy, run:

```bash
donebear auth login --port 8788 --timeout 300
```

No account yet, from a coding agent. Pass the human's email. Do not invent one:

```bash
donebear auth signup --email person@example.com --json --no-interactive
```

The human verifies the email (link or 6-digit code). The CLI then stores a `db_` API key with read and write, and prints paste-ready MCP config for `https://mcp.donebear.com/mcp`. If that email is already registered, run `donebear auth login` instead. WorkOS `agent_auth` and device-code login are not offered.

## 3. Verify your auth state

Run:

```bash
donebear auth status --json
donebear whoami
```

`auth status` confirms whether the CLI is using a stored session, an explicit token, or no auth at all.

## 4. Pick a workspace

List the workspaces you can access:

```bash
donebear workspace list
```

Set the default workspace:

```bash
donebear workspace use personal
donebear workspace current
```

You can still target another workspace later with `--workspace` or the `workspace=<slug>` prefix.

## 5. Create your first task

Run:

```bash
donebear task add "Ship the new docs" --when today
donebear task list --state open
donebear task done <task-id>
```

For a task with more fields, run:

```bash
donebear task add "Review API docs" \
  --when anytime \
  --deadline 2026-03-20 \
  --description "Check REST and GraphQL examples." \
  --json
```

## 6. Explore the rest of the surface

Use the machine-readable command spec when you need exact flags:

```bash
donebear spec task add
donebear spec import things
```

Use the workspace snapshot when you want a compact summary for automation or agents:

```bash
donebear context --json
donebear context --markdown
```

## Next steps

- Read [CLI overview](/cli) for the full command surface.
- Read [Automate with tokens, JSON, and context](/cli/automation) if you want CI or agent workflows.
- Use [Command reference](/cli/commands) when you need supported flags and aliases.

---

Every Done Bear page is listed at https://donebear.com/llms.txt. Any page has a markdown copy at its URL plus `.md`. Start from the map rather than guessing a path.
