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

# spaces

> List, create, show and delete spaces from the anona CLI.

A space is one memory store. Its id **is** its name. These commands take no
`--space`: the space is the argument, or there is none.

| Command | pip | npm |
| - | - | - |
| `spaces list`, `spaces create`, `spaces get` | yes | 0.19.0 |
| `spaces delete` | 0.25.0 | 0.19.0 |

## spaces list

```bash theme={null}
anona spaces list
anona spaces list --json | jq -r '.spaces[].space_id'
```

One space per line: its id (`owner:name` for one shared with you), who shared
it, and its description. `GET /v1/spaces/`.

**`--json`:** `{"spaces": [{"space_id", "name", "description", "qualified_id", "shared_by", ...}], "total"}`.

## spaces create

```bash theme={null}
anona spaces create notes --description "Team notes"
```

| Argument | |
| - | - |
| `NAME` | The new space's name, which is also its id |
| `--description TEXT` | What the space is for |

Prints the new space's id. `POST /v1/spaces/`. You rarely need this: the first
`record` or `documents upload` to a space that does not exist creates it. A
temporary profile holds exactly one space, so `spaces create` on one is refused
with `temp_profile_single_space` (exit `4`).

**`--json`:** `{"space_id", "name", "description", "created_at", "space_type", ...}`.

## spaces get

```bash theme={null}
anona spaces get notes
anona spaces get acme:notes     # a space another organization shared with you
```

The space's fields. `GET /v1/spaces/{id}`. A shared space is addressed by its
bare name until that name collides with one of your own; then the API answers
`space_ambiguous` and you use the `owner:name` form that `spaces list` shows.

**`--json`:** `{"space_id", "name", "description", "created_at", "qualified_id", "shared_by"}`.

## spaces delete

pip 0.25.0; npm 0.19.0

```bash theme={null}
anona spaces delete old-notes --yes
```

Deletes the space **and every memory in it**, permanently. `DELETE /v1/spaces/{id}`.
Without `--yes` it exits `2`, sends nothing, and says what would have been
deleted:

```text theme={null}
anona: this would delete space 'old-notes' and every memory in it, permanently. Pass --yes to do it. Nothing was sent.
```

It never asks interactively, because the caller is often an agent with no
terminal to answer on. Only the space's owner can delete it; a member of a
shared space gets `space_owner_only` (exit `4`).

**`--json`:** `{"deleted": true, "space_id"}`, written by the CLI (the API
answers with no body).

## Related

* API: [Spaces](https://docs.anonalabs.com/api-reference/spaces.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.