---
title: Commands
description: Complete reference for all Kit CLI subcommands.
---

# Commands

## Authentication

For OAuth-enabled providers like Anthropic.

```bash
kit auth login [provider]    # Start OAuth flow (e.g., anthropic)
kit auth logout [provider]   # Remove credentials for provider
kit auth status              # Check authentication status
```

## Model database

Manage the local model database that maps provider names to API configurations.

```bash
kit models [provider]        # List available models (optionally filter by provider)
kit models --all             # Show all providers (not just LLM-compatible)
kit update-models [source]   # Update model database
```

The `update-models` command accepts an optional source argument:
- *(none)* — update from [models.dev](https://models.dev)
- A URL — fetch from a custom endpoint
- A file path — load from a local file
- `embedded` — reset to the bundled database

## Extension management

```bash
kit extensions list          # List discovered extensions
kit extensions validate      # Validate extension files
kit extensions init          # Generate example extension template
```

### Installing extensions from git

```bash
kit install <git-url>        # Install extensions from git repositories
kit install -l <git-url>     # Install to project-local .kit/git/ directory
kit install -u <git-url>     # Update an already-installed package
kit install --uninstall <pkg> # Remove an installed package
kit install --all            # Install all extensions without prompting
```

## Skills

```bash
kit skill                    # Install the Kit extensions skill via skills.sh
```

## Interactive slash commands

These commands are available inside the Kit TUI during an interactive session:

| Command | Description |
|---------|-------------|
| `/help` | Show available commands |
| `/tools` | List available MCP tools |
| `/servers` | Show connected MCP servers |
| `/model [name]` | Switch model or open model selector |
| `/theme [name]` | Switch color theme or list available themes |
| `/thinking [level]` | Set thinking level (off, minimal, low, medium, high) |
| `/compact [focus]` | Summarize older messages to free context |
| `/clear` | Clear conversation |
| `/clear-queue` | Clear queued messages |
| `/usage` | Show token usage |
| `/reset-usage` | Reset usage statistics |
| `/tree` | Navigate session tree |
| `/fork` | Fork to new session from an earlier message |
| `/new` | Start a new session (creates new session file) |
| `/name [name]` | Set or show session display name |
| `/resume` | Open session picker to switch sessions (alias: `/r`) |
| `/session` | Show session info |
| `/export [path]` | Export session as JSONL (default: auto-generated path) |
| `/import <path>` | Import a session from a JSONL file |
| `/share` | Upload session to GitHub Gist and get a shareable viewer URL |
| `/quit` | Exit Kit |

### Prompt history

Use **↑** and **↓** arrow keys to navigate through previously submitted prompts. Kit keeps the last 100 entries. Consecutive duplicates are skipped.

### Cancelling operations

Press **ESC twice** to cancel the current operation:
- During a tool call: rolls back the entire turn to maintain API message pairing
- During streaming: stops the response generation

This ensures that `tool_use` and `tool_result` messages are always sent to the API as matched pairs, avoiding errors from orphaned tool calls.

### Mid-turn steering

Press **Ctrl+S** during streaming to inject a system-level instruction mid-turn. This allows you to steer the conversation direction without waiting for the model to finish:

- Works during streaming output
- Sends a steering instruction as a system message
- Model continues from the interruption point with the new guidance

Example: While the model is writing code, press Ctrl+S and type "Use async/await instead" to change the implementation approach.

## Prompt templates

### Creating templates

Templates use YAML frontmatter for metadata and support argument placeholders:

```markdown
---
description: Review code for issues
---
Review the following code for bugs and security issues.
Focus on $1 specifically.
```

Save to `~/.kit/prompts/review.md` or `.kit/prompts/review.md`.

### Using templates

Templates appear as slash commands:

```
/review error handling
```

### Argument placeholders

| Placeholder | Description |
|-------------|-------------|
| `$1`, `$2`, etc. | Individual arguments by position |
| `$@`, `$ARGUMENTS` | All arguments joined with spaces |
| `${@:N}` | Arguments from position N onwards |
| `${@:N:L}` | L arguments starting at position N |

### CLI flags

```bash
# Load a specific template by name
kit --prompt-template review

# Disable template loading
kit --no-prompt-templates
```

## ACP server

Run Kit as an [ACP (Agent Client Protocol)](https://agentclientprotocol.com) agent server. ACP-compatible clients communicate with Kit over JSON-RPC 2.0 on stdin/stdout.

```bash
kit acp                      # Start as ACP agent
kit acp --debug              # With debug logging to stderr
```
