Loading image...Kiro
  • CLI
  • Powers
  • Autonomous agent
  • Enterprise
  • Pricing
  • Docs
SIGN INDOWNLOADS
Loading image...Kiro
Loading image...Kiro
Product
  • About Kiro
  • CLI
  • Powers
  • Autonomous agent
  • Pricing
  • Downloads
For
  • Enterprise
  • Startups
  • Students
Resources
  • Documentation
  • Blog
  • Changelog
  • FAQs
  • Report a bug
  • Suggest an idea
  • Billing support
Social
Site TermsLicenseResponsible AI PolicyLegalPrivacy PolicyCookie Preferences
  1. Docs
  2. CLI
  3. Reference
  4. Slash commands

Slash commands

On this page
  • Overview
  • Using slash commands
  • Available commands
  • `/help`
  • `/quit`
  • `/clear`
  • `/context`
  • `/model`
  • `/agent`
  • `/chat`
  • Custom session storage
  • `/save`
  • `/load`
  • `/editor`
  • `/reply`
  • `/checkpoint`
  • `/plan`
  • `/knowledge`
  • `/compact`
  • `/paste`
  • `/tools`
  • `/prompts`
  • `/hooks`
  • `/usage`
  • `/mcp`
  • `/code`
  • `/experiment`
  • `/tangent`
  • `/todos`
  • `/issue`
  • `/logdump`
  • `/changelog`
  • Keyboard shortcuts
  • Next steps

Overview

Slash commands are special commands you can use within an interactive chat session to quickly perform actions without leaving the conversation. They start with a forward slash (/) and provide shortcuts for common tasks.

Using slash commands

Slash commands are only available in interactive chat mode:

bash
kiro chat > /help

Available commands

/help

Switch to the Help Agent to ask questions about Kiro CLI features, or display classic help text.

bash
# Switch to Help Agent > /help # Ask a question directly > /help How do I configure MCP servers? # Show classic help text > /help --legacy # Show help for a specific command > /help --legacy /context

See Help Agent for more details.

/quit

Exit the interactive chat session.

bash
> /quit

Aliases: /exit, /q

/clear

Clear the current conversation history.

bash
> /clear

Note: This only clears the display, not the saved conversation.

/context

Manage context files and view context window usage. Context rules determine which files are included in your Kiro session and are derived from the current active agent.

bash
# Display context rule configuration and matched files > /context show # Add context rules (filenames or glob patterns) > /context add src/app.js > /context add "*.py" > /context add "src/**/*.js" # Remove specified rules > /context remove src/app.js # Remove all rules > /context clear

Available subcommands:

  • show - Display the context rule configuration and matched files
  • add - Add context rules (filenames or glob patterns)
  • remove - Remove specified rules

Notes:

  • You can add specific files or use glob patterns (e.g., *.py, src/**/*.js)
  • Agent rules apply only to the current agent
  • Context changes are NOT preserved between chat sessions. To make changes permanent, edit the agent config file.
  • The files matched by these rules provide Kiro with additional information about your project or environment

See Context Management for detailed documentation.

/model

Select an AI model for the current session. Use the interactive picker or specify a model name directly.

bash
# Open interactive model picker > /model # Select a model directly by name > /model claude-opus-4.6 # Tab completion for model names > /model clau<Tab> # Save current model as default for future sessions > /model set-current-as-default

Available subcommands:

  • set-current-as-default - Persist your current model selection as the default for all future sessions

Features:

  • Tab completion shows available models from the API as you type
  • Ghost text hints appear showing matching model names
  • Fuzzy matching suggests similar models if exact name not found
  • Case-insensitive matching against model names and IDs

Note: The set-current-as-default command saves your current model preference to ~/.kiro/settings/cli.json, so it will be used automatically in all future chat sessions.

/agent

Manage agents and switch between different agent configurations.

bash
# List all available agents > /agent list # Create a new agent (AI-assisted by default) > /agent create my-agent # Create with description and MCP servers > /agent create my-agent -D "Code reviewer" -m code-analysis # Create using editor-based mode instead of AI generation > /agent create my-agent --manual # Create in a specific directory > /agent create my-agent --directory workspace # Generate is an alias for create > /agent generate my-agent # Edit the current agent > /agent edit # Edit a specific agent by name (interactive picker when no name given) > /agent edit my-agent # Edit an agent by file path > /agent edit --path /absolute/path/to/my-agent.json # Show agent config schema > /agent schema # Set default agent (interactive picker when no name given) > /agent set-default my-agent # Swap to a different agent at runtime > /agent swap code-reviewer

Available subcommands:

  • list - List all available agents with their descriptions
  • create - Create a new agent using AI-assisted generation by default. Pass --manual for editor-based creation. Supports -D (description), -m (MCP server), -d (directory), and -f (template agent) flags.
  • edit - Edit an existing agent configuration. Shows an interactive picker when no agent name is provided. Supports --path for direct file access.
  • generate - Alias for create
  • schema - Show agent config schema
  • set-default - Define a default agent for new chat sessions. Shows an interactive picker when no agent name is provided.
  • swap - Swap to a new agent at runtime (shows agent descriptions for selection)

Notes:

  • Agents can be stored globally in ~/.kiro/agents/ or per-workspace in .kiro/agents/
  • The --directory flag accepts workspace, global, or a custom path
  • Launch kiro-cli chat with a specific agent using kiro-cli chat --agent agent_name
  • Built-in agents (kiro_default, kiro_help, kiro_planner) cannot be edited

When you edit an agent, changes are made in a temporary file first. If validation fails (for example, invalid JSON or missing required fields), you're prompted to continue editing or cancel. The original configuration file is never overwritten by a failed edit.

See Custom Agents for detailed documentation.

/chat

Manage chat sessions, including saving, loading, and switching between sessions. Kiro CLI automatically saves all chat sessions on every conversation turn.

bash
# Start a fresh conversation without restarting the CLI > /chat new # Start a fresh conversation with an initial prompt > /chat new how do I set up a React project # Open interactive session picker to resume a previous session > /chat resume # Save current session to a file > /chat save /myproject/codereview.json # Load a session from a file > /chat load /myproject/codereview.json

Available subcommands:

  • new - Start a fresh conversation without restarting the CLI. Optionally pass an initial prompt (e.g., /chat new how do I set up a React project). Use /chat resume to return to previous sessions.
  • resume - Open interactive session picker to choose a session to resume
  • save - Save current session to a file
  • load - Load a session from a file (.json extension is optional)
  • save-via-script - Save session using a custom script (receives JSON via stdin)
  • load-via-script - Load session using a custom script (outputs JSON to stdout)

Notes:

  • Sessions are automatically saved on every conversation turn
  • Sessions are stored per directory, so each project has its own set of sessions
  • The session picker shows session name, last activity, and message preview
  • Use keyboard shortcuts in the picker: ↑/↓ to navigate, Enter to select, / to filter

Custom session storage

You can use custom scripts to control where chat sessions are saved to and loaded from. This allows you to store sessions in version control systems, cloud storage, databases, or any custom location.

Save via script:

bash
> /chat save-via-script ./scripts/save-to-git.sh

Your script receives the chat session JSON via stdin. Example script to save to Git notes:

bash
#!/bin/bash set -ex COMMIT=$(git rev-parse HEAD) TEMP=$(mktemp) cat > "$TEMP" git notes --ref=kiro/notes add -F "$TEMP" "$COMMIT" --force rm "$TEMP" echo "Saved to commit ${COMMIT:0:8}" >&2

Load via script:

bash
> /chat load-via-script ./scripts/load-from-git.sh

Your script should output the chat session JSON to stdout. Example script to load from Git notes:

bash
#!/bin/bash set -ex COMMIT=$(git rev-parse HEAD) git notes --ref=kiro/notes show "$COMMIT"

/save

Save the current conversation to a file.

bash
# Save <PATH> > /chat save /myproject/codereview.json

/load

Load a previously saved conversation.

bash
# List available conversations > /chat load /myproject/codereview.json

/editor

Open your default editor to compose a longer prompt.

bash
> /editor

Opens $EDITOR (defaults to vi if not set) to compose a multi-line message. Useful for crafting detailed prompts, pasting code snippets, or writing longer instructions. Save and exit the editor to send the message.

/reply

Open your editor with the most recent assistant message quoted for reply.

bash
> /reply

Opens $EDITOR with the AI's last response quoted, allowing you to reference and respond to specific parts of the message. Useful for providing feedback on specific sections or asking follow-up questions about particular details.

/checkpoint

Manage workspace checkpoints to track and restore file changes.

bash
# Initialize a new checkpoint > /checkpoint init # List all checkpoints > /checkpoint list # Restore to a checkpoint (interactive picker) > /checkpoint restore # Restore to specific checkpoint > /checkpoint restore 2 # Restore with exact state match (removes newer files) > /checkpoint restore 2 --hard # View checkpoint details > /checkpoint expand 1 # View differences between checkpoints > /checkpoint diff 1 2 # Clean up checkpoint data > /checkpoint clean

Available subcommands:

  • init - Create a snapshot of current workspace state
  • list - Show available checkpoints with timestamps and file stats
  • restore - Restore workspace to a previous checkpoint state
  • expand - Show detailed checkpoint information
  • diff - View differences between checkpoints
  • clean - Clean up checkpoint shadow repository

How it works:

  • Creates a shadow bare git repository to track file changes
  • Checkpoints created per conversation turn
  • Sub-checkpoints for each tool use
  • Conversation history reverts when restoring to a checkpoint
  • Auto-enabled in git repositories (ephemeral mode)
  • Can be manually initialized in non-git directories

Restore modes:

  • Default: Reverts tracked changes and deletions, keeps files created after checkpoint
  • Hard mode (--hard): Exactly matches checkpoint state, deletes files created after checkpoint

Note: This is an experimental feature. Enable with kiro-cli settings chat.enableCheckpoint true.

/plan

Switch to the Plan agent for breaking down complex ideas into implementation plans.

bash
# Switch to Plan agent > /plan # Switch with immediate prompt > /plan Build a REST API for user management

The Plan agent specializes in breaking down complex ideas into actionable implementation plans. Use Shift+Tab to return to your previous agent.

/knowledge

Manage your knowledge base for semantic search across files and directories.

bash
# Show all knowledge base entries > /knowledge show # Add a file or directory > /knowledge add --name my-docs --path ./docs # Add with include/exclude patterns > /knowledge add --name src --path ./src --include "*.ts" --exclude "*.test.ts" # Add with indexing type > /knowledge add --name api --path ./api --index-type Best # Search the knowledge base > /knowledge search "authentication flow" # Remove an entry > /knowledge remove ./docs # Update (re-index) an entry > /knowledge update ./docs # Clear entire knowledge base > /knowledge clear # Cancel background indexing operation > /knowledge cancel

Available subcommands:

  • show - List all knowledge base entries with status
  • add - Add files or directories to knowledge base
  • search - Semantically search indexed content
  • remove (alias: rm) - Remove entry by path
  • update - Re-index existing entry
  • clear - Clear entire knowledge base (requires confirmation)
  • cancel - Cancel background indexing operation

Add options:

  • --name, -n - Entry name (required)
  • --path, -p - File or directory path (required)
  • --include - Include patterns (can specify multiple)
  • --exclude - Exclude patterns (can specify multiple)
  • --index-type - Fast or Best (default from settings)

Note: This is an experimental feature. Enable with kiro-cli settings chat.enableKnowledge true.

See Knowledge Management for detailed documentation.

/compact

Summarize the conversation to free up context space.

bash
> /compact

Condenses the conversation history while preserving key information, useful when approaching context limits. The AI creates a summary of the conversation so far and replaces the message history with this summary, freeing up tokens in your context window.

/paste

Paste an image from your clipboard into the conversation.

bash
> /paste

Adds an image from your system clipboard to the conversation, allowing the AI to analyze screenshots, diagrams, error messages, or any visual content. Supports common image formats (PNG, JPEG, etc.).

/tools

View tools and permissions. By default, Kiro will ask for your permission to use certain tools. You can control which tools you trust so that no confirmation is required.

bash
# View all tools, estimated token counts, and permissions > /tools # Show the input schema for all available tools > /tools schema # Trust a specific tool for the session > /tools trust write # Revert a tool to per-request confirmation > /tools untrust write # Trust all tools (equivalent to deprecated /acceptall) > /tools trust-all # Reset all tools to default permission levels > /tools reset

Available subcommands:

  • schema - Show the input schema for all available tools
  • trust - Trust a specific tool or tools for the session
  • untrust - Revert a tool or tools to per-request confirmation
  • trust-all - Trust all tools (equivalent to deprecated /acceptall)
  • reset - Reset all tools to default permission levels

Output columns:

  • ~Tokens - Estimated token count for each tool's schema (values 1000+ shown as k)
  • Permission - Current permission status (Trusted, Ask, or Allowed)
  • Total - Combined token count per origin (Native tools, each MCP server)

Note: For permanent tool configuration, see Agent Configuration Reference.

/prompts

View and retrieve prompts. Prompts are reusable templates that help you quickly access common workflows and tasks. These templates are provided by the MCP servers you have installed and configured.

bash
# List available prompts from a tool or show all available prompts > /prompts list # Show detailed information about a specific prompt > /prompts details code-review # Get a specific prompt by name > /prompts get code-review [arg] # Quick retrieval (without /prompts prefix) > @code-review [arg] # Create a new local prompt > /prompts create my-prompt # Edit an existing local prompt > /prompts edit my-prompt # Remove an existing local prompt > /prompts remove my-prompt

Available subcommands:

  • list - List available prompts from a tool or show all available prompts
  • details - Show detailed information about a specific prompt
  • get - Get a specific prompt by name
  • create - Create a new local prompt
  • edit - Edit an existing local prompt
  • remove - Remove an existing local prompt

Quick tip: To retrieve a prompt directly, use @<prompt name> [arg] without the /prompts get prefix.

See Manage Prompts for detailed documentation.

/hooks

View context hooks.

bash
> /hooks

Display active context hooks for the current session.

/usage

Show billing and credits information.

bash
> /usage

View your current usage statistics and remaining credits.

/mcp

See MCP servers loaded.

bash
> /mcp

Display Model Context Protocol servers currently active.

/code

Manage code intelligence configuration and get feedback.

bash
# Initialize LSP-powered code intelligence in the current directory > /code init # Force reinitialization in the current directory - restarts LSP servers > /code init -f # Get a complete overview of the workspace > /code overview # Get overview with cleaner output > /code overview --silent # Get workspace status and LSP server statuses > /code status # View LSP logs for troubleshooting > /code logs # Show last 20 ERROR logs > /code logs -l INFO # Show INFO level and above > /code logs -n 50 # Show last 50 entries > /code logs -l DEBUG -n 100 # Show last 100 DEBUG+ logs > /code logs -p ./lsp-logs.json # Export logs to JSON file

Available subcommands:

  • init - Initialize LSP servers for enhanced code intelligence
  • overview - Get a complete overview of the workspace structure
  • status - Show the detailed status of the LSP servers and workspace status
  • logs - View logs

/experiment

Toggle experimental features.

bash
> /experiment

Enable or disable experimental CLI features.

/tangent

Create conversation checkpoints to explore side topics.

bash
> /tangent

Enter or exit tangent mode to explore tangential topics without disrupting your main conversation. Use Ctrl+T as a keyboard shortcut (when tangent mode is enabled).

/todos

View, manage, and resume to-do lists.

bash
# View todo > /todo # Add todo > /todo add "Fix authentication bug" # Complete todo > /todo complete 1

/issue

Create a new GitHub issue or make a feature request.

bash
> /issue

Opens a workflow to submit issues or feature requests to the Kiro team.

/logdump

Create a zip file with logs for support investigation and troubleshooting.

bash
# Create log archive with chat logs > /logdump # Include MCP server logs > /logdump --mcp

Available options:

  • --mcp - Include MCP server logs in addition to chat logs

Output:

Creates a timestamped zip file in the current directory with the format q-logs-YYYY-MM-DDTHH-MM-SSZ.zip.

What's included:

  • logs/kiro-chat.log - Main chat logs (always included)
  • logs/mcp.log - MCP server logs (only with --mcp flag)

When to use:

  • Reporting bugs or unexpected errors
  • Sharing diagnostic information with AWS support
  • Investigating agent or MCP server issues
  • Troubleshooting tool execution problems

Example output:

Collecting logs... ✓ Successfully created q-logs-2025-01-22T14-30-52Z.zip with 1 log file

Note: Review the log contents before sharing publicly, as logs may contain file paths and conversation history from your session.

Related: See also kiro-cli diagnostic for system diagnostics and /code logs for LSP server logs.

/changelog

View changelog for Kiro CLI.

bash
> /changelog

Display recent updates and changes to the CLI.

Keyboard shortcuts

In interactive mode, you can also use:

  • Ctrl+C - Cancel current input
  • Ctrl+J - To insert new-line for multi-line prompt
  • Ctrl+S - Fuzzy search commands and context files, use tab to select multiple items
  • Ctrl+T - Toggle tangent mode for isolated conversations (if Tangent mode is enabled)
  • Up/Down arrows - Navigate command history

Next steps

  • Learn about CLI Commands for terminal usage
  • Explore Interactive Chat Mode
  • Check Context Management for advanced context handling
Page updated: March 20, 2026
CLI commands
Built-in tools