Kiro CLI Cheatsheet

CLI Commands

kiro-cli chatStart interactive chat
chat --agent <name>Use specific agent
chat --model <id>Use specific model
chat --resumeResume last session
chat --resume-pickerInteractive session picker
chat --list-sessionsList saved sessions
chat --delete-session <ID>Delete a session
chat --no-interactive "q"Headless mode
chat --trust-all-toolsAuto-approve all tools
chat --trust-tools=a,bAuto-approve specific tools
chat --legacy-modeLegacy terminal UI
agent list|create|edit|validate|set-defaultManage agents
settings list --allList all settings
settings <key> <value>Set a setting
settings --delete <key>Delete a setting
settings openOpen in editor
mcpManage MCP servers
login / logout / whoamiAuthentication
diagnosticRun diagnostic tests
acpStart Agent Client Protocol

Slash Commands — Session & Navigation

/helpShow all commands
/quit /exitExit chat
/chat new [prompt]Fresh conversation
/chat save <path>Save session
/chat load <path>Load session
/clearErase history
/compactSummarize to free context
/contextView context usage
/context add|remove|clearManage context files
/transcriptOpen in $PAGER
/copyCopy last response
/usageShow billing info

Slash Commands — Agent & Model

/agent [name]Switch agent
/agent createCreate agent (AI-assisted)
/agent edit [name]Edit agent config
/model [name]Switch model
/plan [prompt]Switch to planner
/guide [question]Switch to guide
/spawn <task>Spawn parallel session

Slash Commands — Tools & MCP

/toolsView tools & permissions
/tools trust <names>Trust for session
/tools untrust <names>Revert to approval
/tools trust-allTrust all tools
/tools resetReset permissions
/mcpMCP server status
/promptsList/execute MCP prompts

Slash Commands — Code & Knowledge

/code init|status|logs|overview|summaryCode intelligence
/knowledge show|add|remove|update|clear|cancelKnowledge bases

Slash Commands — Editing & Misc

/editor [text]Open $EDITOR to compose
/replyEditor with last response
/pastePaste image from clipboard
/hooksView hooks
/themeChange color theme
/feedbackSubmit feedback

Built-in Tools

fs_readRead files, dirs, images
fs_writeCreate/modify files
execute_bashShell commands
grepRegex search in files
globFind files by pattern
codeCode intelligence (tree-sitter + LSP)
use_awsAWS CLI API calls
knowledgeKnowledge base store/retrieve
web_searchSearch the web
web_fetchFetch URL content
subagentSpawn sub-agents (DAG)
todo_listTask tracking
introspectSearch Kiro docs

Built-in Agents

kiro_defaultGeneral-purpose agent
kiro_guideAnswers Kiro CLI questions
kiro_plannerStructured planning

Agent Configuration

JSON files in .kiro/agents/ (workspace) or ~/.kiro/agents/ (global)

{
  "name": "my-agent",
  "description": "...",
  "prompt": "System prompt or file:///path",
  "model": "<model-id>",
  "tools": ["fs_read", "fs_write", "execute_bash"],
  "allowedTools": ["fs_read", "grep"],
  "toolsSettings": {
    "fs_write": { "allowedPaths": ["src/**"] },
    "execute_bash": { "autoAllowReadonly": true }
  },
  "resources": ["file://src/**/*.rs", "skill://.kiro/skills/**/SKILL.md"],
  "hooks": { "agentSpawn": [{ "command": "git status" }] },
  "mcpServers": { "git": { "command": "mcp-server-git", "args": ["--stdio"] } },
  "keyboardShortcut": "ctrl+shift+r",
  "welcomeMessage": "Ready!"
}
nameAgent identifier
promptSystem prompt (inline or file://)
toolsAvailable tools list
allowedToolsAuto-approved (wildcards: fs_*, @server)
toolsSettingsPer-tool config (paths, commands)
resourcesfile:// always loaded, skill:// on-demand
hooksLifecycle hook commands
mcpServersMCP servers (stdio or HTTP)
toolAliasesRemap tool names
keyboardShortcutQuick-switch shortcut

Hooks System

TriggerWhenBlock?
agentSpawnAgent initializesNo
userPromptSubmitUser sends messageNo
preToolUseBefore tool runsYes (exit 2)
postToolUseAfter tool runsNo
stopAssistant finishesNo

Exit Codes

Hook Options

Settings Reference

chat.defaultAgent <name>
chat.defaultModel <model-id>
chat.enableKnowledge true
chat.enableCodeIntelligence true
chat.enableSubagent true
chat.enableTodoList true
chat.enableThinking true
chat.enableNotifications true
chat.greeting.enabled false
chat.disableAutoCompaction true
chat.autoExpandToolOutput true
telemetry.enabled false
hooks.showStatus false

Knowledge Settings

knowledge.indexType Fast|Best
knowledge.maxFiles 10000
knowledge.chunkSize 512
knowledge.chunkOverlap 128
knowledge.defaultIncludePatterns '["**/*.rs"]'
knowledge.defaultExcludePatterns '["target/**"]'

Scopes

MCP Servers

Stdio (Local)

{ "command": "mcp-server-git",
  "args": ["--stdio"],
  "env": { "KEY": "value" },
  "timeout": 120000,
  "disabled": false,
  "disabledTools": ["dangerous_tool"] }

HTTP (Remote)

{ "url": "https://mcp.example.com/sse",
  "headers": { "Authorization": "Bearer $TOKEN" },
  "oauthScopes": ["mcp", "profile"] }

Code Intelligence

Tree-sitter (Built-in, 18 languages)

Bash, C, C++, C#, Elixir, Go, Java, JS, Kotlin, Lua, PHP, Python, Ruby, Rust, Scala, Swift, TSX, TS

Ops: search_symbols, pattern_search, pattern_rewrite, generate_codebase_overview, search_codebase_map, get_document_symbols, lookup_symbols

LSP (requires /code init)

Ops: find_references, goto_definition, rename_symbol, format, get_diagnostics, get_hover, get_completions

Keyboard Shortcuts

Ctrl+CCancel / exit
Ctrl+RSearch history
Shift+TabToggle plan/execution
Up/DownNavigate history

File Locations

Global agents~/.kiro/agents/
Workspace agents.kiro/agents/
Global settings~/.kiro/settings/cli.json
Workspace settings.kiro/settings/cli.json
Sessions~/.kiro/sessions/cli/

Environment Variables

EDITOR / VISUALEditor for /editor, /reply
KIRO_CHAT_LOG_FILEOverride log location
KIRO_LOG_NO_COLORDisable ANSI colors (set to 1)

Tool Permission Levels

Tips