> ## Documentation Index
> Fetch the complete documentation index at: https://docs.basemode.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Command reference

> Every base command, grouped by what it can do to your data: safe to run at any time, writes to the graph, or takes something away. Start here for the map, the aliases, and the list of commands that remove things.

base ships 39 top-level commands and 120 command paths in total. This page is the map: which page covers what, which commands can remove data, and the short forms you can type instead of the full names.

Grouping by consequence rather than by subject is deliberate. When you are about to run something you have not run before, what you want to know first is whether it can take anything away from you.

<Note>
  This reference tracks base **0.13.2**. Every command and flag on these pages is checked against the shipped binary's own help output before it is published. If your installed version disagrees with something here, `base help <command>` is the authority, not this page.
</Note>

## Where each command lives

| Page                                            | Commands                                                                                                                                                      |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Graph and memory](/reference/graph-and-memory) | `learn` · `recall` · `decision` · `changes` · `graph` · `memory`                                                                                              |
| [Projects](/reference/projects)                 | `project` · `milestone` · `task` · `goal` · `reminder` · `entity` · `reconcile`                                                                               |
| [Code](/reference/code)                         | `ast` · `sync`                                                                                                                                                |
| [Context](/reference/context)                   | `domain` · `rule` · `standards` · `context` · `commands`                                                                                                      |
| [Sessions](/reference/sessions)                 | `handoff` · `fork` · `relay`                                                                                                                                  |
| [Setup](/reference/setup)                       | `install` · `activate` · `update` · `uninstall` · `scaffold` · `workspace` · `operator` · `config` · `secret` · `doctor` · `dashboard` · `extension` · `hook` |

## Safe to run at any time

These read and never write. Run any of them to find out where you stand before you change something.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base doctor                               # graph health across both tiers
base config list                          # every config value currently set
base context "<text>"                     # what this text would pull, without sending it
base recall --keyword "<term>"            # search stored notes
base decision search --keyword "<term>"   # prior decisions, with their reasoning
base project list --all                   # projects across every registered workspace
base ast list                             # which code maps exist
base handoff list                         # open handoffs, both tiers
base fork list                            # open forks, both tiers
base relay board                          # sessions, liveness, claims, pending messages
base changes --cursor                     # the current position in the change log
```

`base standards test <file>` and `base graph purge --stale` also read without writing, though the second one only stays read-only until you add `--apply`.

## Writes to the graph

These add or update. None of them remove anything.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base learn --text "<text>" --domain <domain> --type insight
base decision log --domain <domain> --decision "<what>" --rationale "<why>"
base rule add --domain <domain> --text "<rule>"
base project add --name "<name>"
base task add --project <project> --name "<name>"
base handoff create --project "<project>" --doc "<absolute-path>"
base sync
base sync --ast
```

## Takes something away

<Warning>
  Every command below removes or rewrites data. Most print a plan and change nothing until you pass a second flag; the four without a preview are marked.
</Warning>

| Command                                                                    | Preview?                                                           |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [`base project delete`](/reference/projects#base-project-delete)           | Plan unless `--yes`. Refuses a non-empty project unless `--force`. |
| [`base project move`](/reference/projects#base-project-move)               | Plan unless `--yes`.                                               |
| [`base milestone delete`](/reference/projects#base-milestone-delete)       | Plan unless `--yes`. Detaches tasks unless `--force`.              |
| [`base task delete`](/reference/projects#base-task-delete)                 | Plan unless `--yes`.                                               |
| [`base graph purge --stale`](/reference/graph-and-memory#base-graph-purge) | Dry run unless `--apply`.                                          |
| [`base graph move`](/reference/graph-and-memory#base-graph-move)           | Plan unless `--yes`.                                               |
| [`base relay dispose`](/reference/sessions#base-relay-dispose)             | Plan unless `--force`.                                             |
| [`base graph compact`](/reference/graph-and-memory#base-graph-compact)     | **No preview.** Snapshots first.                                   |
| [`base decision delete`](/reference/graph-and-memory#base-decision-delete) | **No preview.**                                                    |
| [`base memory purge`](/reference/graph-and-memory#base-memory-purge)       | **No preview.**                                                    |
| [`base reminder remove`](/reference/projects#base-reminder-remove)         | **No preview.**                                                    |
| [`base rule remove`](/reference/context#base-rule-remove)                  | **No preview.**                                                    |
| [`base domain remove`](/reference/context#base-domain-remove)              | **No preview.**                                                    |
| [`base commands remove`](/reference/context#base-commands-remove)          | **No preview.**                                                    |
| [`base secret rm`](/reference/setup#base-secret-rm)                        | **No preview.**                                                    |
| [`base extension remove`](/reference/setup#base-extension-remove)          | **No preview.**                                                    |
| [`base uninstall --purge`](/reference/setup#base-uninstall)                | **No preview.** Deletes the entire global tier.                    |

Preview-by-default is a two-step on purpose. `--yes`, `--apply` and `--force` are the second half of a deliberate action, not a formality to type past.

## Short forms

Twelve commands have a single-letter or short alias, accepted anywhere the full name is.

| Alias | Command     | Alias  | Command     |
| ----- | ----------- | ------ | ----------- |
| `a`   | `ast`       | `g`    | `goal`      |
| `p`   | `project`   | `r`    | `reminder`  |
| `m`   | `milestone` | `std`  | `standards` |
| `t`   | `task`      | `dash` | `dashboard` |
| `d`   | `decision`  | `ext`  | `extension` |
| `e`   | `entity`    | `cmd`  | `commands`  |

Some subcommands have their own, but not all of them do. The ones that exist:

| Alias            | Where it works                                |
| ---------------- | --------------------------------------------- |
| `a` for `add`    | `project` · `milestone` · `task`              |
| `l` for `list`   | `project` · `milestone` · `task` · `ast`      |
| `u` for `update` | `project` · `milestone` · `task` · `decision` |
| `q` for `query`  | `ast`                                         |

So `base p l` is `base project list` and `base a q -c "auth"` is `base ast query --contains "auth"`. But `base e a` is not `base entity add`. `entity` has no subcommand aliases, and neither do `goal`, `reminder`, `domain`, `rule`, `standards`, `commands`, `config`, `secret`, `extension`, `graph`, `memory`, `handoff`, `fork` or `relay`.

## The one flag that moves

`-g` / `--global` targets the global tier instead of the workspace. Six commands carry it: `rule`, `decision`, `handoff`, `fork`, `learn` and `changes`.

On the four that have subcommands, it belongs on the command itself, **before** the verb:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base rule -g list --domain <domain>
base decision -g search --keyword "<term>"
base handoff -g list
base fork -g list
```

On the two that do not, it is an ordinary flag:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base learn -g --text "<text>" --domain <domain>
base changes -g --cursor
```

`base graph apply-ops` takes `--global` in its long form only. No other command has one at all: for the rest, the tier is decided by where you run them: inside a registered workspace, or falling back to global outside one. Check `base help <command>` before assuming a `-g` exists.
