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

# Slash commands

> Use slash commands to manage sessions, models, forks, lifecycle, permissions, and runtime configuration.

Fifteen slash commands for setup, session management, model control, forks, lifecycle, integrations, and configuration — all restricted to the **bot owner** via DMs.

## Quick reference

| Command        | Description                                                  | Parameters                                |
| -------------- | ------------------------------------------------------------ | ----------------------------------------- |
| `/setup`       | Guided setup wizard for names, personality, and user context | None                                      |
| `/clear`       | Clear conversation and start fresh                           | None                                      |
| `/compact`     | Compact conversation context                                 | `instructions` (optional)                 |
| `/cost`        | Show token usage for this session                            | None                                      |
| `/fork`        | Start a forked conversation                                  | `topic` (optional)                        |
| `/model`       | View or switch the AI model                                  | `name` (optional)                         |
| `/thinking`    | View or set thinking mode                                    | `mode` (optional)                         |
| `/interrupt`   | Stop the current response                                    | None                                      |
| `/google-auth` | Connect Google account via OAuth                             | None                                      |
| `/version`     | Show the running bot version                                 | None                                      |
| `/update`      | Check for updates and apply immediately                      | None                                      |
| `/restart`     | Restart the bot process                                      | None                                      |
| `/permissions` | View or set permission mode                                  | `mode` (optional)                         |
| `/ping-budget` | View or set ping budget                                      | `capacity`, `refill_rate` (both optional) |
| `/config`      | View or set runtime configuration                            | `key` (optional), `value` (optional)      |

## Setup

### /setup

A guided wizard that walks you through configuring names, personality (`IDENTITY.md`), and user context (`USER.md`) — all in one conversation. No parameters.

The wizard detects your current state before asking anything:

* **Fresh setup** — offers a choice between a **fast path** (3 questions covering names, about you, and personality tweaks) or a **full walkthrough** (section-by-section `IDENTITY.md` and detailed `USER.md` configuration).
* **Already configured** — shows a summary of your current setup and asks what you'd like to change, then jumps to the relevant section.

If you change names during setup, the wizard updates `.env` automatically and suggests running `/restart` to apply the new names everywhere.

<Note>
  `/setup` is only invocable as a slash command — the bot won't trigger it automatically. You can run it anytime to reconfigure.
</Note>

## Session commands

### /clear

Resets the conversation to a blank state. This clears all prior
context, exits any active [interactive fork](/core-usage/forks),
resets [permission](/core-usage/permissions) approvals, and cancels
any pending permission prompts. The next message starts a fresh
session.

If you run `/clear` while inside an interactive fork, the fork is
discarded and a "Fork Ended" exit embed is sent before the
conversation resets. The confirmation message notes the discarded fork.

### /compact

Compacts conversation context to free up space.
Useful when a long conversation starts hitting context limits.

| Parameter      | Type   | Required | Description                                                              |
| -------------- | ------ | -------- | ------------------------------------------------------------------------ |
| `instructions` | string | No       | Optional focus for the summary (e.g., "keep the routine config details") |

The command defers the interaction (showing a thinking indicator), then
sends a followup with productivity stats:

```text theme={null}
15 turns · 3h 12m · 45k tokens compacted
```

Stats include: number of turns in the session, session age, and
pre-compaction token count.

<Tip>
  Use `instructions` to tell the compactor what information matters most.
  Without it, the SDK picks what to preserve automatically.
</Tip>

### /cost

Returns the cumulative token usage and cost for the current session in USD.

## Model commands

### /model

Views or switches the AI model. Call with no argument to see the current
model; provide a name to switch.

| Parameter | Type   | Required | Choices                   |
| --------- | ------ | -------- | ------------------------- |
| `name`    | choice | No       | `opus`, `sonnet`, `haiku` |

When you provide a name, the change takes effect immediately — the next
message uses the new model.

<Warning>
  `/model` is blocked during interactive forks — exit the fork first. Switching the model mid-fork would silently kill the fork client.
</Warning>

### /thinking

Views or sets the extended thinking mode — controls whether Claude uses
chain-of-thought reasoning and how many tokens it can spend on it. Call
with no argument to see the current setting.

| Parameter | Type   | Required | Choices                                                    |
| --------- | ------ | -------- | ---------------------------------------------------------- |
| `mode`    | choice | No       | `off`, `adaptive`, `8k budget`, `32k budget`, `64k budget` |

| Mode                      | Behavior                                                          |
| ------------------------- | ----------------------------------------------------------------- |
| **off**                   | Disables extended thinking entirely.                              |
| **adaptive**              | Claude decides whether to think based on query complexity.        |
| **8k / 32k / 64k budget** | Fixed token budget for thinking (8,000 / 32,000 / 64,000 tokens). |

Changing the thinking mode drops the active client and exits any active
fork — the next message creates a fresh connection with the new setting.

You can also set a custom budget via [`/config thinking.main`](/core-usage/slash-commands#config)
with any positive integer as the value.

<Warning>
  `/thinking` is blocked during interactive forks — exit the fork first. Changing thinking mode drops the active client, which would silently kill the fork.
</Warning>

## Fork commands

### /fork

Starts an [interactive fork](/core-usage/forks) — a branched conversation that does not affect the main session history.

| Parameter | Type   | Required | Description                                    |
| --------- | ------ | -------- | ---------------------------------------------- |
| `topic`   | string | No       | Optional topic to seed the forked conversation |

Returns an error if you are already inside a fork. Otherwise, creates a forked
client and sends a fork entry embed with action buttons.

### /interrupt

Stops the bot's current response mid-stream. The command is silent — it defers
the interaction, interrupts any in-progress generation, then deletes the
deferred response.

<Note>If the bot is not actively generating a response, `/interrupt` does nothing.</Note>

## Integration commands

### /google-auth

Connects your Google account via OAuth for Tasks, Calendar, and Gmail access.

The command checks for `credentials.json` in the state directory first — if missing, it tells you to set up OAuth credentials. If Google is already connected, it confirms that.

Otherwise, it starts an OAuth flow with a 5-minute timeout and two completion paths:

* **Browser path** — click the auth URL; the browser redirects to a local server and authentication completes automatically
* **Paste path** — for cross-device scenarios (e.g., the bot runs on a headless server), complete auth on another device and paste the redirect URL back into the Discord DM

On success, the bot sends "google connected." to the channel.

<Tip>
  If your Google token is revoked (password change, manual revocation in Google settings), the bot detects it automatically on the next API call and sends you a message to reconnect with `/google-auth`.
</Tip>

## Lifecycle commands

### /version

Shows the running bot version. The response is ephemeral — only you see it.

The format depends on whether `HEAD` is on a tagged release:

| Build  | Example output                   | Meaning                                                            |
| ------ | -------------------------------- | ------------------------------------------------------------------ |
| Tagged | `ollim-bot v0.2.0`               | `HEAD` is exactly on a `v*` tag                                    |
| Dev    | `ollim-bot v0.1.0+dev (abc1234)` | `HEAD` is ahead of the nearest tag — includes the short commit SHA |

The bot derives this from `git describe --tags` in the project directory. If git is unavailable, it falls back to the installed package version via `importlib.metadata`.

The same version string appears in the startup DM — the first-run welcome and the "picking up where we left off" resume message both include it.

### /update

Checks for upstream updates and applies them immediately — bypasses the `auto_update_hour` window. Update detection compares your current version against the latest `v*` tag on `origin` (`git tag -l "v*" --sort=-version:refname`). If a newer tag exists, the bot pulls the latest code (`git pull --ff-only`), upgrades the tool install (`uv tool upgrade ollim-bot`), logs a "restarting" event to session history, and restarts the process. If already up to date, confirms with a message.

### /restart

Restarts the bot process without checking for updates. Useful when you've made local changes or need a clean restart. Logs a "restarting" event to session history before restarting.

## Configuration commands

### /permissions

Views or sets the [permission mode](/core-usage/permissions) that controls
how the agent requests tool approval. Call with no argument to see the
current mode.

| Parameter | Type   | Required | Choices                                                  |
| --------- | ------ | -------- | -------------------------------------------------------- |
| `mode`    | choice | No       | `dontAsk`, `default`, `acceptEdits`, `bypassPermissions` |

| Mode                | Behavior                                                                              |
| ------------------- | ------------------------------------------------------------------------------------- |
| `dontAsk`           | Suppresses all prompts. Unapproved tools are silently denied.                         |
| `default`           | The agent asks for approval before using tools.                                       |
| `acceptEdits`       | The agent can make file edits without asking, but other tools still require approval. |
| `bypassPermissions` | All tools are auto-approved. No permission prompts.                                   |

Permission mode is scoped per session. If you are in a fork, only the
fork is affected. The main session retains its own permission mode.
Exception: **dontAsk** uses a module-level flag — switching to or from
`dontAsk` in a fork affects the main session. See
[Permissions](/core-usage/permissions#fork-scoping) for details.

### /ping-budget

Views or configures the [ping budget](/scheduling/ping-budget) — controls
how often background forks can notify you.

| Parameter     | Type    | Required | Description                           |
| ------------- | ------- | -------- | ------------------------------------- |
| `capacity`    | integer | No       | Maximum number of pings in the bucket |
| `refill_rate` | integer | No       | Minutes between refills (default: 90) |

<Tabs>
  <Tab title="View budget">
    Run `/ping-budget` with no parameters to see the current budget status.
  </Tab>

  <Tab title="Update budget">
    Provide `capacity`, `refill_rate`, or both to update the budget.
    The response confirms the new settings.
  </Tab>
</Tabs>

### /config

Views or sets persistent runtime configuration. Settings survive bot
restarts — ollim-bot stores them in `~/.ollim-bot/state/config.json`.

| Parameter | Type   | Required | Description                      |
| --------- | ------ | -------- | -------------------------------- |
| `key`     | choice | No       | Configuration key to view or set |
| `value`   | string | No       | New value for the key            |

<Tabs>
  <Tab title="View all">
    Run `/config` with no parameters to see all settings and their current values.
    Each setting that accepts a fixed set of inputs also shows its **valid values** next to the current value — so you never have to look up what a key accepts.
  </Tab>

  <Tab title="View one">
    Provide `key` only to see that setting's current value and default.
  </Tab>

  <Tab title="Set a value">
    Provide both `key` and `value` to update a setting. The change takes
    effect immediately.
  </Tab>
</Tabs>

#### Available keys

| Key                    | Type            | Default            | Valid values                                          | Description                                                                   |
| ---------------------- | --------------- | ------------------ | ----------------------------------------------------- | ----------------------------------------------------------------------------- |
| `model.main`           | model           | SDK default        | `opus / sonnet / haiku / default`                     | Default model for the main session                                            |
| `model.fork`           | model           | Inherits from main | `opus / sonnet / haiku / default`                     | Default model for interactive forks                                           |
| `thinking.main`        | thinking mode   | `off`              | `off / adaptive / <budget>`                           | Extended thinking for the main session                                        |
| `thinking.fork`        | thinking mode   | `adaptive`         | `off / adaptive / <budget>`                           | Extended thinking for interactive forks                                       |
| `bg_fork_timeout`      | integer         | `1800`             | Any integer                                           | Max background fork runtime in seconds                                        |
| `fork_idle_timeout`    | integer         | `10`               | Any integer                                           | Interactive fork idle timeout in minutes                                      |
| `permission_mode`      | permission mode | `dontAsk`          | `dontAsk / default / acceptEdits / bypassPermissions` | Default [permission mode](/core-usage/permissions)                            |
| `auto_update`          | boolean         | `off`              | `on / off`                                            | Auto-pull, upgrade tool install, and restart when a new `v*` tag is published |
| `auto_update_interval` | integer         | `60`               | Any integer                                           | Update check interval (minutes)                                               |
| `auto_update_hour`     | hour (0-23)     | `6`                | `0-23`                                                | Hour of day to apply updates                                                  |

Model values: `opus`, `sonnet`, `haiku`, or empty to reset to default.
Boolean values: `on`/`off`, `yes`/`no`, `true`/`false`.
Thinking mode values: `off`, `adaptive`, or a positive integer for a custom token budget.

<Tip>
  Use `/config` to set fork-specific defaults — for example, always use
  `opus` with thinking in forks while keeping `sonnet` for the main session.
</Tip>

## Next steps

<Columns cols={2}>
  <Card title="Conversations" icon="comments" href="/core-usage/conversations">
    How the DM message flow works alongside slash commands.
  </Card>

  <Card title="Forks" icon="code-branch" href="/core-usage/forks">
    Interactive and background forks explained.
  </Card>

  <Card title="Permissions" icon="shield" href="/core-usage/permissions">
    Full guide to permission modes and tool approval.
  </Card>

  <Card title="Ping budget" icon="bell" href="/scheduling/ping-budget">
    How the notification rate limiter works.
  </Card>

  <Card title="Configuration reference" icon="gear" href="/configuration/reference">
    Environment variables and runtime configuration keys.
  </Card>
</Columns>
