# Slash Commands


A line typed at the kli prompt that begins with `/` is a slash command. The first word names the command; the rest is its argument tail. This page lists every command kli registers, grouped by area.

Commands come from extensions, so the set is not fixed: a profile that omits an extension omits its commands, and a loaded extension can add its own. Two families are registered dynamically from files on disk — prompt templates and skills (see [Prompt and skill commands](#prompt-and-skill-commands)). Run `/commands` to see what is registered in the current session, and `/help <command>` for one command's details.

Most commands report their result as a system line in the transcript. Commands marked below as menu-backed open a selection menu in the terminal UI when run with no argument; run with an argument, or run outside the terminal UI, they act directly and print text.

## Basic

| Command | Effect |
| --- | --- |
| `/commands` | List every registered command. |
| `/help [command]` | Show the command list, or details for one command. |
| `/clear` | Clear the terminal display. The conversation is unchanged. |
| `/reset` | Start a new conversation in the current session, clearing history. |
| `/redraw` | Repaint the terminal display. |
| `/quit` | Stop kli and exit. |

`/clear` and `/redraw` act only on the display; the model never sees them.

## Session

A session is the durable record of a conversation: its history, name, model selection, and stored file. These commands inspect and manipulate it. See [Sessions](/kli/concepts/sessions-as-a-tree) for the model.

| Command | Effect |
| --- | --- |
| `/name [text]` | Set the session display name to `text`, or show the current name. |
| `/session` | Show the active session: id, file, model, and token count. |
| `/resume [selector]` | List stored sessions; with a selector, resume the matching one. Menu-backed. |
| `/resume delete <selector>` | Delete the matching stored session. The active session cannot be deleted. |
| `/compact [instructions]` | Summarize the history into a shorter context, optionally focused by `instructions`. |
| `/rewind [n]` | Step the conversation back `n` user turns (default 1), branching the session. Menu-backed. |
| `/branches` | Show the tree of sessions created by rewind-branching, and switch between them. Menu-backed. |

A bare `/resume` selector matches against a session id, name, or message preview; an unambiguous match resumes, several matches re-list. `/compact` and `/rewind` are refused while a turn is running.

## Context

The agent context is the projected message list sent to the model. These commands stage edits to it, then commit or discard them as a set. See [Context lens](/kli/guides/inspect-and-edit-context).

| Command | Effect |
| --- | --- |
| `/context inspect` | Show the context epoch, projected message count, and staged patches. |
| `/context stage append <text>` | Stage a patch appending a user message with `text`. |
| `/context stage remove <index>` | Stage a patch removing the message at `index`. |
| `/context stage replace <index> <text>` | Stage a patch replacing the message at `index` with `text`. |
| `/context diff` | Show staged patches without applying them. |
| `/context commit` | Apply all staged patches to the context, advancing the epoch. |
| `/context revert` | Discard all staged patches. |

Each subcommand is a separate registered command resolved from the `/context <subcommand>` prefix. Staging never changes the context; only `/context commit` does.

## Model and providers

These commands choose the model, set reasoning effort, and manage provider credentials. See [Connect a provider](/kli/guides/connect-a-provider).

| Command | Effect |
| --- | --- |
| `/model [provider/model [level]]` | Select the current model, optionally with a `reasoning-effort` level; bare, show and list. Menu-backed. |
| `/models [search]` | List auth-available models, optionally filtered by `search`; option-capable models show compact `options ...` markers. |
| `/providers` | List model providers with their auth status and model counts. |
| `/thinking [level]` | Set the `reasoning-effort` option for the selected model, or show the current level. Menu-backed. |
| `/auth` | Show registered providers and credential references. |

A model reference is `provider/model`, for example `anthropic/claude-sonnet-4-5`. The `/thinking` level is one of `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, accepted only for a model that declares `reasoning-effort`. kli ships the providers `anthropic`, `openai`, `openai-codex`, and `compatible` (user-defined OpenAI-compatible endpoints).

`/auth` takes a subcommand to register or remove credentials:

| Command | Effect |
| --- | --- |
| `/auth env <provider> <ENV_VAR>` | Read the provider's credential from environment variable `ENV_VAR`. |
| `/auth key <provider> <KEY>` | Store `KEY` as the provider's static API key. |
| `/auth login <provider>` | Start an OAuth login and print the authorization URL. |
| `/auth code <pasted code or redirect URL>` | Complete the pending OAuth login. |
| `/auth logout <provider>` | Forget the provider's stored credential. |

`/auth` is hidden from the model, since its tail can carry a raw API key.

## Configuration

| Command | Effect |
| --- | --- |
| `/settings` | Show config directories, the global and project settings files, registered resource kinds, and the merged settings. |

kli merges settings from `~/.config/kli/settings.json` and `<repo>/.kli/settings.json`, project over global. See [Settings](/kli/config/settings).

## Profiles

A profile is a named set of extensions and settings. See [Profiles](/kli/config/profiles).

| Command | Effect |
| --- | --- |
| `/profile [name]` | List profiles, or live-switch to profile `name`. |

A live switch installs the extensions the target profile wants and retracts the ones it does not. A profile whose builtin base differs from the running one cannot be switched live; kli reports the `--profile` flag to restart with instead.

## Extensions

These commands control user extensions discovered from `~/.config/kli/extensions/` and `<repo>/.kli/extensions/`, plus any passed with `--extension`. See [Extensions](/kli/extend/lisp-extensions).

| Command | Effect |
| --- | --- |
| `/extensions` | List discovered user extensions and whether each is enabled. |
| `/enable <extension>` | Install (enable) a discovered extension by id. |
| `/disable <extension>` | Retract (disable) an installed extension by id. |
| `/reload` | Retract, re-discover, and re-install user extensions, picking up edits on disk. |
| `/uninstall <extension>` | Remove a runtime-installed extension and its pin. Nix-declared extensions cannot be uninstalled this way. |

## App

| Command | Effect |
| --- | --- |
| `/install <url> <git-tree-sha1>` | Install a remote extension from `url`, pinned to the git tree object `git-tree-sha1`. |

`/install` here is the in-session command to add a remote **extension**. It is distinct from installing the kli application itself, which is `curl -fsSL https://kli.kleisli.io | sh` and has nothing to do with this command. The in-session `/install` runs a two-step consent flow in the terminal UI: it shows a trust card for the URL and pin, verifies the artifact against the pinned git tree sha1 without loading it, then installs on a second confirmation. The pin makes the install reproducible: the same `git-tree-sha1` always resolves the same code. `/install` requires the terminal UI.

## Diagnostics

| Command | Effect |
| --- | --- |
| `/bash <command>` | Run `command` in a shell and show its output. |
| `/eval <form>` | Evaluate a Common Lisp `form` in the running image and show the result. |
| `/observability` | Report the observability sink: whether it is enabled, its file path, event filter, and event count. |

`/bash` and `/eval` run the same tools the agent uses, invoked by hand. The observability sink is configured under the `observability` section of `settings.json`; `/observability` reports its live state.

## Prompt and skill commands

Two command families are registered from files at startup, so their names depend on what is on disk.

| Command | Effect |
| --- | --- |
| `/<template>` | Expand the prompt template named `<template>` and submit it as your next message. |
| `/skill:<name>` | Expand the skill named `<name>` and submit it as your next message. |

Prompt templates are `*.md` files in the `prompts/` resource directories; each file `name.md` registers as `/name`, and the argument tail substitutes into the template body. Skills are discovered from the `skills/` resource directories and register as `/skill:<name>`. Both are hidden from the model as commands, because the expansion itself enters the conversation as your message. Run `/commands` to see the ones currently registered.
