# Command Reference

> Reference the supported Done Bear CLI command groups, global flags, and common workflows.

This reference lists the public CLI command groups and the flags you can rely on today. Use it when you already know what you want to do and need the exact command shape.

## Global flags

These flags work at the root level:

| Flag         | Purpose                                |
| ------------ | -------------------------------------- |
| `--json`     | Output machine-readable JSON           |
| `--format`   | Choose `text`, `json`, `csv`, or `tsv` |
| `--copy`     | Copy the result to the clipboard       |
| `--total`    | Print only the count                   |
| `--token`    | Override auth for one command          |
| `--api-url`  | Override the API base URL              |
| `--debug`    | Enable debug logging                   |
| `--no-color` | Disable ANSI colors                    |

## Workspace targeting

The CLI supports both explicit workspace flags and the workspace prefix shortcut:

```bash
donebear task list --workspace personal --json
donebear workspace=personal task list --json
```

## Authentication commands

| Command                | Purpose                              | Notes                                                                                      |
| ---------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ |
| `donebear auth signup` | Create an account from a human email | `--email` required. Do not invent one. `--json`, `--no-interactive`, `--name`, `--timeout` |
| `donebear auth login`  | Start OAuth login in the browser     | Supports `--port`, `--timeout`, `--no-open`                                                |
| `donebear auth status` | Show the current auth state          | Use `--json` for scripts                                                                   |
| `donebear auth logout` | Clear the stored session             | Does not revoke API keys                                                                   |
| `donebear whoami`      | Show the current user                | Alias: `donebear me`                                                                       |

## Workspace commands

| Command                                      | Purpose                            | Key options                                                          |
| -------------------------------------------- | ---------------------------------- | -------------------------------------------------------------------- |
| `donebear workspace list`                    | List available workspaces          | none                                                                 |
| `donebear workspace current`                 | Show the current default workspace | none                                                                 |
| `donebear workspace use`                     | Set the default workspace          | workspace id, slug, or exact name                                    |
| `donebear workspace clear`                   | Clear the default workspace        | none                                                                 |
| `donebear workspace create`                  | Create a workspace                 | `--slug`, `--logo-url`, `--no-use`                                   |
| `donebear workspace join`                    | Join with an invite code           | `--no-use`                                                           |
| `donebear workspace members [workspace]`     | List members                       | `--format`, `--total`                                                |
| `donebear workspace invitations [workspace]` | List pending invitations           | none                                                                 |
| `donebear workspace invite [workspace]`      | Create an invitation               | `--email`, `--share`, `--project`, `--role` with `member` or `admin` |

## Task commands

| Command                   | Purpose                              | Key options                                                                                                                                                            |
| ------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `donebear task list`      | List tasks                           | `--workspace`, `--state`, `--view`, `--limit`, `--search`                                                                                                              |
| `donebear task show`      | Show task details                    | `--workspace`                                                                                                                                                          |
| `donebear task read`      | Print the description of a task      | `--workspace`                                                                                                                                                          |
| `donebear task add`       | Create a task                        | `--when`, `--description`, `--deadline`, `--project`, `--team`, `--workspace`                                                                                          |
| `donebear task edit`      | Update task fields                   | `--title`, `--description`, `--clear-description`, `--when`, `--deadline`, `--clear-deadline`, `--project`, `--clear-project`, `--team`, `--clear-team`, `--workspace` |
| `donebear task done`      | Complete a task                      | `--workspace`                                                                                                                                                          |
| `donebear task reopen`    | Reopen a task                        | `--workspace`                                                                                                                                                          |
| `donebear task archive`   | Archive a task                       | `--workspace`                                                                                                                                                          |
| `donebear task unarchive` | Restore an archived task             | `--workspace`                                                                                                                                                          |
| `donebear task append`    | Append text to a task's description  | `--workspace`                                                                                                                                                          |
| `donebear task prepend`   | Prepend text to a task's description | `--workspace`                                                                                                                                                          |
| `donebear task random`    | Show a random task                   | `--workspace`, `--state`                                                                                                                                               |

Task IDs accept a full UUID or a unique prefix of at least four characters.

`donebear task add` defaults `--when` to `today`, with two exceptions: `--deadline` without `--when` lands in `anytime`, and `--project` or `--team` without `--when` lands in `inbox`. Pass `--when inbox` to capture a task without scheduling it.

`--when` takes `inbox`, `anytime`, `today`, `upcoming`, or `someday`. `--view` on `task list` takes those five plus `logbook` and `trash`, which are derived from a task's state rather than its start date: `--view logbook` reads completed tasks and `--view trash` archived ones, whatever `--state` says. Do not pair `--state done` with a bucket view — a completed task's view is `logbook`, so `--state done --view today` matches nothing. Complete a task with `donebear task done` and archive it with `donebear task archive`; neither is a `--when` value.

## Checklist commands

`donebear task checklist` manages checklist items for one task.

| Command                          | Purpose                   |
| -------------------------------- | ------------------------- |
| `donebear task checklist`        | List checklist items      |
| `donebear task checklist add`    | Add a checklist item      |
| `donebear task checklist done`   | Complete a checklist item |
| `donebear task checklist reopen` | Reopen a checklist item   |
| `donebear task checklist edit`   | Rename a checklist item   |
| `donebear task checklist remove` | Remove a checklist item   |

## Comment commands

`donebear comment` reads and writes the comment thread on one task. Comments are visible to everyone in the workspace and notify nobody.

| Command                   | Purpose                              |
| ------------------------- | ------------------------------------ |
| `donebear comment`        | List a task's comments, oldest first |
| `donebear comment add`    | Post a comment                       |
| `donebear comment edit`   | Rewrite one of your own comments     |
| `donebear comment remove` | Delete a comment permanently         |

Only a comment's author can edit it. You can remove your own; a workspace owner or admin can remove anyone's, and removal cannot be undone.

## Project, label, and team commands

| Command group      | Purpose                                                           |
| ------------------ | ----------------------------------------------------------------- |
| `donebear project` | List, show, create, edit, complete, archive, and restore projects |
| `donebear label`   | List and show labels                                              |
| `donebear team`    | List and show teams                                               |

Example:

```bash
donebear project add "Q2 Launch" --target-date 2026-06-30
donebear label list --json
donebear team show ENG --json
```

## Search, today, history, and context

| Command            | Purpose                                         |
| ------------------ | ----------------------------------------------- |
| `donebear today`   | List open tasks in the Today bucket             |
| `donebear search`  | Search task titles and descriptions             |
| `donebear history` | Show recent workspace audit history             |
| `donebear context` | Output a workspace snapshot in JSON or Markdown |
| `donebear spec`    | Output machine-readable command documentation   |

## Import, export, and API-key commands

| Command                   | Purpose                         |
| ------------------------- | ------------------------------- |
| `donebear import things`  | Import a Things 3 SQLite export |
| `donebear export`         | Export a workspace as JSON      |
| `donebear api-key create` | Create an API key               |
| `donebear api-key list`   | List API keys                   |
| `donebear api-key revoke` | Revoke an API key               |

## Examples

```bash
donebear task list --view logbook --limit 50 --json
donebear search "launch" --format csv
donebear context --markdown
donebear spec task add
donebear import things --dry-run --json
donebear export > backup.json
```

## Next steps

- Follow [Get started with the CLI](/cli/get-started) if you want a guided first run.
- Use [Automate with tokens, JSON, and context](/cli/automation) for scripts and agents.
- Follow [Import from Things 3](/cli/import-things) if you are migrating into Done Bear.
- Read [Export your data](/cli/export) to take a full copy of a workspace with you.

---

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.
