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

# Spaces

> Read and write posts, replies, reactions, and channels in a shared space.

`gobi space` works in a shared space, where what you write is visible to its members. The same posting verbs scoped to your own Home are on [the Home page](/cli/personal).

## Picking a space

```sh theme={null}
gobi space list             # spaces you belong to
gobi space warp             # select the active space for this directory
gobi space warp acme        # or warp directly by slug
gobi space get              # details for the active space (or pass a slug)
```

The selection is saved in `.gobi/settings.yaml`. Any command takes `--space-slug <slug>` to override it one-off.

## Feed, posts, and replies

```sh theme={null}
gobi space feed                          # unified feed, newest first
gobi space feed --channel 7              # one channel (omit --channel for the main feed)
gobi space create-post --title "…" --content "…"
gobi space create-reply <postId> --content "…"
gobi space react <postId> 👍
gobi space unreact <postId> 👍            # reactions are idempotent both ways
gobi space get-post <postId>             # a post with its ancestors and replies
gobi space list-posts                    # root posts only
gobi space edit-post <postId> --content "…"
gobi space delete-post <postId>          # edit-reply and delete-reply exist too
```

Feed output labels every row with `[p:N]` or `[r:N]`. Those numeric ids are what `get-post`, `react`, and the edit and delete commands take. Edit and delete work only on content you authored.

## Attaching things to a post

```sh theme={null}
gobi space create-post --content "…" --artifact <artifactId>
gobi space create-post --content "…" --attach ./photo.jpg
gobi space create-post --content "…" --repost-post-id <postId>
```

`--artifact` is how something you made in your Home reaches a space. See [artifacts](/cli/artifacts).

`--attach` takes local files: up to 4 photos plus 4 documents, or one GIF, or one video. `--repost-post-id` wraps an existing post as a card inside your new one.

## Search

```sh theme={null}
gobi space search-posts "pricing"
gobi space search-posts 'from:"Jane Doe" topic:sales pricing'
```

Keywords plus two operators: `from:<name>` and `topic:<tag>`. Quote multi-word values. Each result is an individual post or reply, not a whole thread.

## Topics

Posts carry topic tags, and topics are browsable on their own:

```sh theme={null}
gobi space list-topics                   # ordered by most recent content
gobi space list-topic-posts <topicSlug>  # every post tagged with it
```

The `topic:<tag>` search operator filters on the same tags.

## Channels

```sh theme={null}
gobi space list-channels                 # channels visible to you
gobi space get-channel <channelId>
gobi space list-channel-members <channelId>
```

The main feed is not a channel. Read it by omitting `--channel` on `feed`.

## Direct messages

Added in `2.5.0`. A DM lives in a space, but it never shows up in `feed` or `list-channels`, so these commands are the only way to reach one.

```sh theme={null}
gobi space list-dms                      # your conversations, most recent first
gobi space open-dm --user <userId>       # returns the conversation id
gobi space dm-messages <dmId>            # newest first, --limit and --cursor to page
gobi space send-dm <dmId> --content "..."
```

`open-dm` is idempotent. The same set of participants always returns the same conversation, so it's safe to call before every send. Repeat `--user` for a group, or use `--agent space` / `--agent personal` to talk to an agent instead of a person.

<Warning>
  Take a `userId` from output you actually read this run, like `author.id` in `--json feed` or a row from `list-channel-members`. The ids are opaque, so a guessed number reaches a real person who has nothing to do with the conversation.
</Warning>

Read before you write: `dm-messages` is how you know what you already said. A bare `@name` inside `--content` is plain text and notifies nobody. To ping someone, use `--rich-text` and mix `{"type":"user","userId":N}` into the array. `--attach` takes a local file and repeats.

<Note>
  Captures live in your Home, so `gobi space` has no `conversations` or `activities` group. Read them with [`gobi personal`](/cli/personal).
</Note>
