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

# Command Reference

> Complete reference for all meepachat CLI commands

All commands accept the [global flags](/meepachat/cli/configuration#global-flags) `--url`, `--token`, `--json`, `--config`, and `--verbose`.

***

## auth

### auth me

Show the currently authenticated user.

```bash theme={null}
meepachat auth me
```

***

## login

Log in to a MeepaChat instance. Saves credentials to `~/.config/meepachat/config.json`.

**Browser OAuth (default):**

```bash theme={null}
meepachat login --url https://chat.example.com
```

**Interactive credential prompts (no browser):**

```bash theme={null}
meepachat login --url https://chat.example.com --no-browser
```

**Non-interactive credentials:**

```bash theme={null}
meepachat login --url https://chat.example.com --email alice@example.com --password secret
```

**Save a token directly:**

```bash theme={null}
meepachat login --url https://chat.example.com --token YOUR_TOKEN
```

**Save a bot token:**

```bash theme={null}
meepachat login --url https://chat.example.com --token BOT_ID.SECRET --bot
```

| Flag           | Description                                            |
| -------------- | ------------------------------------------------------ |
| `--no-browser` | Skip browser login; use interactive credential prompts |
| `--email`      | Email for non-interactive credential login             |
| `--password`   | Password for non-interactive credential login          |
| `--token`      | Save token directly (skips interactive login)          |
| `--bot`        | Mark token as bot token (use with `--token`)           |

***

## logout

Clear the authentication token from the config file. Preserves the instance URL.

```bash theme={null}
meepachat logout
```

***

## servers

Manage servers.

### servers list

List servers you belong to.

```bash theme={null}
meepachat servers list
```

### servers create

Create a new server.

```bash theme={null}
meepachat servers create --name "My Server"
```

| Flag     | Required | Description |
| -------- | -------- | ----------- |
| `--name` | Yes      | Server name |

### servers get

Get details for a server.

```bash theme={null}
meepachat servers get <serverID>
```

### servers update

Rename a server.

```bash theme={null}
meepachat servers update <serverID> --name "New Name"
```

| Flag     | Required | Description     |
| -------- | -------- | --------------- |
| `--name` | Yes      | New server name |

### servers delete

Delete a server.

```bash theme={null}
meepachat servers delete <serverID>
```

### servers leave

Leave a server.

```bash theme={null}
meepachat servers leave <serverID>
```

### servers members

List members of a server. Supports cursor pagination via `--after`.

```bash theme={null}
meepachat servers members <serverID>
```

| Flag      | Description                       |
| --------- | --------------------------------- |
| `--after` | Cursor for pagination (member ID) |
| `--limit` | Max number of members to return   |

***

## channels

Manage channels. All channel subcommands require `--server <serverID>`.

### channels list

List channels in a server.

```bash theme={null}
meepachat channels list --server <serverID>
```

### channels create

Create a channel.

```bash theme={null}
meepachat channels create --server <serverID> --name general
```

| Flag        | Required | Description              |
| ----------- | -------- | ------------------------ |
| `--name`    | Yes      | Channel name             |
| `--topic`   | No       | Channel topic            |
| `--private` | No       | Make the channel private |

### channels get

Get details for a channel.

```bash theme={null}
meepachat channels get <channelID> --server <serverID>
```

### channels update

Update a channel's name or topic.

```bash theme={null}
meepachat channels update <channelID> --server <serverID> --name renamed --topic "New topic"
```

| Flag      | Description       |
| --------- | ----------------- |
| `--name`  | New channel name  |
| `--topic` | New channel topic |

### channels delete

Delete a channel.

```bash theme={null}
meepachat channels delete <channelID> --server <serverID>
```

### channels join

Join a channel.

```bash theme={null}
meepachat channels join <channelID> --server <serverID>
```

### channels leave

Leave a channel.

```bash theme={null}
meepachat channels leave <channelID> --server <serverID>
```

### channels members

List members of a channel.

```bash theme={null}
meepachat channels members <channelID> --server <serverID>
```

### channels archive

Archive a channel.

```bash theme={null}
meepachat channels archive <channelID> --server <serverID>
```

| Flag          | Description                  |
| ------------- | ---------------------------- |
| `--unarchive` | Unarchive instead of archive |

***

## messages

Manage messages.

### messages list

List messages in a channel. Results are ordered newest first.

```bash theme={null}
meepachat messages list --server <serverID> --channel <channelID>
```

| Flag        | Required | Description                                  |
| ----------- | -------- | -------------------------------------------- |
| `--server`  | Yes      | Server ID                                    |
| `--channel` | Yes      | Channel ID                                   |
| `--limit`   | No       | Max messages to return (default 50, max 100) |
| `--before`  | No       | Return messages older than this message ID   |

### messages send

Send a message to a channel.

```bash theme={null}
meepachat messages send "Hello, world!" --server <serverID> --channel <channelID>
```

| Flag        | Required | Description |
| ----------- | -------- | ----------- |
| `--server`  | Yes      | Server ID   |
| `--channel` | Yes      | Channel ID  |

### messages edit

Edit a message.

```bash theme={null}
meepachat messages edit <messageID> "Updated content"
```

### messages delete

Delete a message.

```bash theme={null}
meepachat messages delete <messageID>
```

### messages thread

List thread replies for a message.

```bash theme={null}
meepachat messages thread <messageID>
```

| Flag       | Description                               |
| ---------- | ----------------------------------------- |
| `--limit`  | Max replies to return                     |
| `--before` | Return replies older than this message ID |

***

## dms

Manage direct messages.

### dms list

List DM conversations in a server.

```bash theme={null}
meepachat dms list --server <serverID>
```

### dms open

Open (or retrieve) a DM channel with a user.

```bash theme={null}
meepachat dms open <userID> --server <serverID>
```

### dms messages

List messages in a DM channel.

```bash theme={null}
meepachat dms messages <channelID>
```

| Flag       | Description                                |
| ---------- | ------------------------------------------ |
| `--limit`  | Max messages to return                     |
| `--before` | Return messages older than this message ID |

### dms send

Send a message in a DM channel.

```bash theme={null}
meepachat dms send <channelID> "Hey there!"
```

***

## bots

Manage bots.

### bots list

List bots you own.

```bash theme={null}
meepachat bots list
```

### bots create

Create a new bot. Prints the bot token on creation — save it immediately.

```bash theme={null}
meepachat bots create --username mybot --server <serverID>
```

| Flag             | Required | Description                 |
| ---------------- | -------- | --------------------------- |
| `--username`     | Yes      | Bot username                |
| `--server`       | Yes      | Server ID to add the bot to |
| `--display-name` | No       | Bot display name            |

### bots get

Get bot details.

```bash theme={null}
meepachat bots get <botID>
```

### bots delete

Delete a bot.

```bash theme={null}
meepachat bots delete <botID>
```

### bots regenerate-token

Regenerate a bot's token. The old token is immediately invalidated.

```bash theme={null}
meepachat bots regenerate-token <botID>
```

### bots servers

List servers a bot belongs to.

```bash theme={null}
meepachat bots servers <botID>
```

### bots add-to-server

Add a bot to a server.

```bash theme={null}
meepachat bots add-to-server <botID> --server <serverID>
```

| Flag       | Required | Description |
| ---------- | -------- | ----------- |
| `--server` | Yes      | Server ID   |

### bots remove-from-server

Remove a bot from a server.

```bash theme={null}
meepachat bots remove-from-server <botID> --server <serverID>
```

| Flag       | Required | Description |
| ---------- | -------- | ----------- |
| `--server` | Yes      | Server ID   |

***

## invites

Manage invite links.

### invites create

Create an invite link for a server.

```bash theme={null}
meepachat invites create --server <serverID>
```

| Flag           | Required | Description                        |
| -------------- | -------- | ---------------------------------- |
| `--server`     | Yes      | Server ID                          |
| `--expires-in` | No       | Expiry duration (e.g. `24h`, `7d`) |
| `--max-uses`   | No       | Maximum number of uses             |

### invites list

List all invites for a server.

```bash theme={null}
meepachat invites list --server <serverID>
```

### invites get

Get invite details by code.

```bash theme={null}
meepachat invites get <code>
```

### invites revoke

Revoke an invite.

```bash theme={null}
meepachat invites revoke <inviteID>
```

### invites join

Join a server using an invite code.

```bash theme={null}
meepachat invites join <code>
```

***

## groups

Manage channel groups (categories). All group subcommands require `--server <serverID>`.

### groups list

List channel groups in a server.

```bash theme={null}
meepachat groups list --server <serverID>
```

### groups create

Create a channel group.

```bash theme={null}
meepachat groups create --server <serverID> --name "Development"
```

| Flag     | Required | Description |
| -------- | -------- | ----------- |
| `--name` | Yes      | Group name  |

### groups update

Rename a channel group.

```bash theme={null}
meepachat groups update <groupID> --server <serverID> --name "Engineering"
```

| Flag     | Required | Description    |
| -------- | -------- | -------------- |
| `--name` | Yes      | New group name |

### groups delete

Delete a channel group.

```bash theme={null}
meepachat groups delete <groupID> --server <serverID>
```

### groups reorder

Reorder channel groups.

```bash theme={null}
meepachat groups reorder --server <serverID> --ids "id1,id2,id3"
```

| Flag    | Required | Description                                    |
| ------- | -------- | ---------------------------------------------- |
| `--ids` | Yes      | Comma-separated group IDs in the desired order |

***

## reactions

Manage emoji reactions on messages.

### reactions add

Add a reaction to a message.

```bash theme={null}
meepachat reactions add <messageID> <emoji>
```

### reactions remove

Remove a reaction from a message.

```bash theme={null}
meepachat reactions remove <messageID> <emoji>
```

***

## search

Search messages across a server.

```bash theme={null}
meepachat search "query terms" --server <serverID>
```

| Flag       | Required | Description                                |
| ---------- | -------- | ------------------------------------------ |
| `--server` | Yes      | Server ID to search in                     |
| `--limit`  | No       | Max results to return                      |
| `--offset` | No       | Number of results to skip (for pagination) |

***

## notifications

Manage notifications and unread state.

### notifications unread

List channels with unread messages.

```bash theme={null}
meepachat notifications unread
```

### notifications mark-read

Mark a channel as read.

```bash theme={null}
meepachat notifications mark-read <channelID>
```

### notifications preferences

Get notification preferences for a server.

```bash theme={null}
meepachat notifications preferences --server <serverID>
```

***

## version

Print version, commit, and build date.

```bash theme={null}
meepachat version
```

```
meepachat 0.1.0
  commit:  abc1234
  built:   2026-01-15T00:00:00Z
```
