Commands

# Commands ## Authentication For OAuth-enabled providers like Anthropic. ```bash kit auth login [provider] # Start OAuth flow (e.g., anthropic) kit auth login [provider] --set-default # Set provider's default model as system default 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 # Install extensions from git repositories kit install -l # Install to project-local .kit/git/ directory kit install -u # Update an already-installed package kit install --uninstall # Remove an installed package kit install --all # Install all extensions without prompting ``` ## Skills ```bash kit skill # Install the Kit extensions skill via skills.sh ``` ### Skills CLI flags Control which skills are loaded at startup: ```bash # Load a specific skill file kit --skill path/to/skill.md "prompt" # Load multiple skill files or directories (flag is repeatable) kit --skill ./skill1.md --skill ./skill2.md "prompt" # Load all skills from a custom directory instead of the default locations kit --skills-dir /path/to/skills "prompt" # Disable all skill loading (auto-discovery and explicit) kit --no-skills "prompt" ``` Skills are auto-discovered from `~/.config/kit/skills/`, `.kit/skills/`, and `.agents/skills/` by default. Use `--skills-dir` to override the project-local search root, or `--skill` to load files explicitly (which disables auto-discovery). `--no-skills` suppresses all skill loading regardless of other flags. ## 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, none, 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 ` | 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. ### External editor Press **Ctrl+X e** to open your `$VISUAL` or `$EDITOR` in a temporary file pre-populated with the current input text. On save and quit, the edited content replaces the input textarea. On error exit (e.g., `:cq` in Vim), the original input is preserved. ### Mid-turn steering Press **Ctrl+X 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+X s and type "Use async/await instead" to change the implementation approach. ### Image attachments Attach images to your next prompt straight from the clipboard: - Copy an image (e.g. a screenshot) to the system clipboard, then press **Ctrl+V** in the input to attach it. - Press **Ctrl+U** to clear all pending image attachments. - Attachments are sent alongside your text when you submit, and cleared afterward. When a terminal supports color, Kit renders a small low-resolution **thumbnail preview** of each pending image directly in the input, below the `[N image(s) attached]` indicator, so you can confirm the right image was attached before sending. The preview is drawn with Unicode half-block characters and ordinary terminal colors — not a graphics protocol — so it renders correctly inside terminal multiplexers like **tmux** and **zellij**. Thumbnails are capped to a small cell box for a glanceable, low-res look. - Best fidelity needs a **truecolor** terminal (`COLORTERM=truecolor`); Kit degrades to 256-color where truecolor is unavailable. - On terminals with neither, the preview is skipped and the `[N image(s) attached]` text indicator is shown alone. You can also attach image files by referencing them with `@path/to/image.png` — binary files are auto-detected by MIME type. See [Quick Start](/quick-start) for the `@` attachment syntax. ## 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 (zero or more) | | `$+` | All arguments joined with spaces (one or more required) | | `${@:N}` | Arguments from position N onwards | | `${@:N:L}` | L arguments starting at position N | Placeholders inside fenced code blocks (`` ``` ``) and inline code spans are ignored, so documentation examples won't be substituted. ### 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 ```