### Basic Kiro CLI Setup Example Source: https://kiro.dev/docs/cli/reference/settings This example demonstrates a basic setup for the Kiro CLI, including enabling telemetry, setting a default chat model, and disabling the greeting message. These commands are executed in a bash environment. ```bash # Enable telemetry kiro-cli settings telemetry.enabled true # Set default chat model kiro-cli settings chat.defaultModel "claude-3-sonnet" # Disable greeting message kiro-cli settings chat.greeting.enabled false ``` -------------------------------- ### AWS Documentation MCP Server Usage Examples (Shell) Source: https://kiro.dev/docs/cli/mcp/examples Examples demonstrating how to use the AWS Documentation MCP server for searching, reading documentation, and getting content recommendations. ```shell # Search for information about S3 bucket policies Search AWS documentation for S3 bucket policies # Read specific documentation Read the AWS Lambda function URLs documentation # Get recommendations Find related content to AWS ECS task definitions ``` -------------------------------- ### Initiating Plan Agent with Specific Prompt Source: https://kiro.dev/docs/cli/chat/planning-agent This example shows how to use the Plan agent to start building a specific feature, like a REST API for user authentication. The command directly prompts the agent with the desired functionality. ```bash > /plan Build a REST API for user authentication ``` -------------------------------- ### Bash Command for Activating Kiro Skill Source: https://kiro.dev/docs/cli/skills This example demonstrates how a user might interact with the Kiro CLI to activate a skill, specifically the 'cdk-deploy' skill. It shows the user's prompt and Kiro's response indicating the skill activation and the start of its process. ```bash > Deploy my CDK stack to staging [skill: cdk-deploy activated] I'll follow the deployment workflow. First, let me synthesize the templates... ``` -------------------------------- ### Web Search Example Source: https://kiro.dev/docs/cli/reference/built-in-tools Demonstrates using the 'web_search' tool to find up-to-date information on a topic. The example shows a query about EC2 instances and the subsequent search results. ```bash # Example 1 > What is the latest on EC2 instances? > I'll search for the latest information on EC2 instances. Searching the web for: AWS EC2 instances latest 2025 (using tool: web_search) ✓ Found 10 search results - Completed in 2.12s > Here's what I found: Recent EC2 Instance Launches (2025): New Instance Families: - **M8a instances** - General-purpose instances with 5th Gen AMD EPYC (Turin) processors running at 4.5GHz. They deliver up to 30% higher performance and 19% better price-performance versus M7a instances. - **C8gd, M8gd, R8gd instances** - Graviton-based instances with up to 11.4 TB of local NVMe SSD storage, now generally available. - **X8g instances** - Powered by AWS Graviton4 processors, delivering up to 60% better performance than X2gd instances. Available in US East (Ohio). - **R8i and R8i-flex instances** - Intel-based memory-optimized instances offering up to 15% better price-performance and 2.5x more memory bandwidth compared to previous Intel generations. They deliver 20% better performance than R7i instances. - **I7i instances** - Storage-optimized instances with 5th Gen Intel Xeon processors, delivering up to 23% better compute performance and 10% better price-performance over I4i instances. Expanded Availability: - C7i-flex and M7i-flex now available in 12xlarge and 16xlarge sizes - Various instances expanding to additional regions including Europe (Milan) and US West (N. California) Key Trend: AWS continues focusing on performance improvements (20-30% gains), better price-performance (10-19% improvements), and expanding processor options across Intel, AMD, and Graviton architectures. References: [1] Document history for the Amazon EC2 Instance Types Guide - https://docs.aws.amazon.com/ec2/latest/instancetypes/doc-history.html ... [10] Amazon EC2 C7i-flex and C7i instances are now available in 2 additional regions - https://aws.amazon.com/about-aws/whats-new/2025/06/amazon-ec2-c7i-flex-c7i-instances-additional-... ▸ Time: 19s ``` -------------------------------- ### Complete Agent Configuration Example Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference A comprehensive example of an agent configuration file, demonstrating the integration of tools, MCP servers, hooks, model selection, and UI settings. ```json { "name": "aws-rust-agent", "description": "A specialized agent for AWS and Rust development tasks", "mcpServers": { "fetch": { "command": "fetch3.1", "args": [] }, "git": { "command": "git-mcp", "args": [] } }, "tools": ["read", "write", "shell", "aws", "@git", "@fetch/fetch_url"], "toolAliases": { "@git/git_status": "status", "@fetch/fetch_url": "get" }, "allowedTools": ["read", "@git/git_status"], "toolsSettings": { "write": { "allowedPaths": ["src/**", "tests/**", "Cargo.toml"] }, "aws": { "allowedServices": ["s3", "lambda"] } }, "resources": ["file://README.md", "file://docs/**/*.md"], "hooks": { "agentSpawn": [{ "command": "git status" }], "userPromptSubmit": [{ "command": "ls -la" }] }, "useLegacyMcpJson": true, "model": "claude-sonnet-4", "keyboardShortcut": "ctrl+r", "welcomeMessage": "Ready to help with AWS and Rust development!" } ``` -------------------------------- ### Install Kotlin Language Server Source: https://kiro.dev/docs/cli/code-intelligence Installs the Kotlin language server using Homebrew on macOS. ```bash brew install kotlin-language-server ``` -------------------------------- ### Complete Agent Configuration Example Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference A comprehensive example showing the integration of tools, aliases, resource definitions, hooks, and security settings for an AWS and Rust development agent. ```json { "name": "aws-rust-agent", "description": "Specialized agent for AWS and Rust development", "prompt": "file://./prompts/aws-rust-expert.md", "mcpServers": { "fetch": { "command": "fetch-server", "args": [] }, "git": { "command": "git-mcp", "args": [] } }, "tools": ["read", "write", "shell", "aws", "@git", "@fetch/fetch_url"], "toolAliases": { "@git/git_status": "status", "@fetch/fetch_url": "get" }, "allowedTools": ["read", "@git/git_status"], "toolsSettings": { "write": { "allowedPaths": ["src/**", "tests/**", "Cargo.toml"] }, "aws": { "allowedServices": ["s3", "lambda"], "autoAllowReadonly": true } }, "resources": ["file://README.md", "file://docs/**/*.md"], "hooks": { "agentSpawn": [{ "command": "git status" }], "postToolUse": [{ "matcher": "fs_write", "command": "cargo fmt --all" }] }, "model": "claude-sonnet-4", "keyboardShortcut": "ctrl+shift+r", "welcomeMessage": "Ready to help with AWS and Rust development!" } ``` -------------------------------- ### File URI Examples Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference Examples of using file URIs to specify prompts. ```APIDOC ## File URI Examples ### Local File URI ```json { "prompt": "file://./prompts/aws-expert.md" } ``` ### Absolute Local File URI ```json { "prompt": "file:///Users/developer/shared-prompts/rust-specialist.md" } ``` ``` -------------------------------- ### Directory Tree Expansion Example Source: https://kiro.dev/docs/cli/chat/file-references Provides an example of how a directory reference expands into a tree listing of its contents, showing nested structures up to a specified depth. ```bash @src/ Expands to: src/ ├── lib/ │ ├── auth.ts │ └── utils.ts ├── index.ts └── config.json ``` -------------------------------- ### Web Fetch Tool: Selective Mode Example Source: https://kiro.dev/docs/cli/reference/built-in-tools Illustrates using the web_fetch tool in 'selective' mode to retrieve specific information, such as installation instructions, from a web page. This mode targets relevant content based on search terms, optimizing data retrieval. ```bash # Example - using selective > https://kiro.dev/blog/introducing-kiro-cli/ --> Can you get installation information from this page for me. Fetching content from: https://kiro.dev/blog/introducing-kiro-cli/ (searching for: installation install getting started) [mode: selective] (using tool: web_fetch) ✓ Fetched 7909 bytes (selective) from URL - Completed in 0.434s > Here's the installation information from the page: ## Installation Kiro CLI is available for macOS and Linux. Installation is straightforward: bash curl -fsSL https://cli.kiro.dev/install | bash ## First Steps 1. Authenticate and start chatting: Sign in with your credentials 2. Explore commands: Get help anytime The page also mentions at the end: bash curl -fsSL https://cli.kiro.dev/install | bash That's the single command you need to install Kiro CLI on macOS or Linux systems. ``` ``` -------------------------------- ### Web Fetch Tool: Truncated Mode Example Source: https://kiro.dev/docs/cli/reference/built-in-tools Demonstrates fetching a truncated portion of a web page using the web_fetch tool. This mode is useful for quickly getting the beginning of a page to understand its content without downloading the entire file, managing context window efficiently. ```bash # Example - using truncated > https://kiro.dev/blog/introducing-kiro-cli/ --> Can you get some of this page for me? Fetching content from: https://kiro.dev/blog/introducing-kiro-cli/ [mode: truncated] (using tool: web_fetch) ✓ Fetched 8051 bytes (truncated content) from URL - Completed in 0.521s > I've fetched the beginning portion of the page. It's a blog post announcing Kiro CLI. Here's what this section covers: Title: "Bring Kiro agents to your terminal with Kiro CLI" (November 17, 2025) Main Points: - Kiro CLI brings AI agents into your terminal so you don't lose context when debugging production servers or working in SSH sessions - Built on Q Developer CLI technology with additions like social login, Haiku 4.5, and the Auto agent - Supports custom agents tailored to specific workflows (backend, frontend, DevOps) - Your .kiro folder configs work in both IDE and CLI Installation: bash curl -fsSL https://cli.kiro.dev/install | bash Key Features covered in this section: 1. Custom agents with pre-approved tools, persistent context, and controlled access 2. Smart context management (Agent Resources, Session Context, Knowledge Bases) 3. Multiple authentication options (GitHub, Google, AWS Builder ID, IAM Identity Center) 4. Full IDE integration - MCP servers and steering rules transfer seamlessly 5. Interactive chat, multimodal input, and MCP support The page continues beyond what was fetched. Would you like me to get a specific section or search for particular information? ``` ``` -------------------------------- ### Install Go Language Server (gopls) Source: https://kiro.dev/docs/cli/code-intelligence Installs the official Go language server (gopls) using the go install command. This enables advanced LSP features for Go projects within Kiro CLI. ```bash go install golang.org/x/tools/gopls@latest ``` -------------------------------- ### Install Kiro CLI on Ubuntu Source: https://kiro.dev/docs/cli/installation Installs the Kiro CLI on Ubuntu using the downloaded .deb package. It first installs the package and then resolves any missing dependencies. ```bash sudo dpkg -i kiro-cli.deb sudo apt-get install -f ``` -------------------------------- ### Install Kiro CLI on Linux using AppImage Source: https://kiro.dev/docs/cli/installation Installs the Kiro CLI on Linux using the AppImage format. This portable format does not require traditional installation. The process involves downloading the AppImage, making it executable, and then running it. ```bash chmod +x kiro-cli.appimage ``` ```bash ./kiro-cli.appimage ``` -------------------------------- ### Kiro CLI Knowledge Base Configuration Example Source: https://kiro.dev/docs/cli/reference/settings This example shows how to configure the knowledge base settings for the Kiro CLI, including default include and exclude patterns for files, maximum files to index, and chunking parameters for text processing. These commands are executed in a bash environment. ```bash kiro-cli settings knowledge.defaultIncludePatterns '["*.py", "*.js"]' kiro-cli settings knowledge.defaultExcludePatterns '["*.log", "node_modules"]' kiro-cli settings knowledge.maxFiles 1000 kiro-cli settings knowledge.chunkSize 512 kiro-cli settings knowledge.chunkOverlap 50 kiro-cli settings knowledge.indexType "fast" ``` -------------------------------- ### Kiro CLI Pattern Rewrite Examples Source: https://kiro.dev/docs/cli/code-intelligence Illustrates automated code transformations using AST patterns. Examples include converting var to const, modernizing hasOwnProperty checks, and changing unwrap to expect. ```javascript // Convert var to const pattern: var $N = $V replacement: const $N = $V language: javascript ``` ```javascript // Modernize hasOwnProperty pattern: $O.hasOwnProperty($P) replacement: Object.hasOwn($O, $P) language: javascript ``` ```rust // Convert unwrap to expect pattern: $E.unwrap() replacement: $E.expect("unexpected None") language: rust ``` -------------------------------- ### Install Kiro CLI from Zip Archive Source: https://kiro.dev/docs/cli/installation Installs Kiro CLI after downloading the zip archive. This involves unzipping the archive and running the installation script. ```bash unzip kirocli.zip ``` ```bash ./kirocli/install.sh ``` -------------------------------- ### Using the Help Agent Command Source: https://kiro.dev/docs/cli/reference/slash-commands Provides examples of using the /help command to switch agents, ask questions, or display legacy help information. ```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 ``` -------------------------------- ### Install LLVM/Clangd for C/C++ Source: https://kiro.dev/docs/cli/code-intelligence Installs LLVM or Clangd, which are necessary for C/C++ language server support. Instructions are provided for macOS using Homebrew. ```bash # macOS brew install llvm # or brew install clangd ``` -------------------------------- ### /help - Get Help Source: https://kiro.dev/docs/cli/reference/slash-commands Use the /help command to get assistance with Kiro CLI features, ask questions, or display classic help text. ```APIDOC ## `/help` Switch to the Help Agent to ask questions about Kiro CLI features, or display classic help text. ### Usage Examples: # 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 ``` -------------------------------- ### Install Pyright for Python LSP Source: https://kiro.dev/docs/cli/code-intelligence Installs the Pyright type checker and language server for Python. It can be installed globally using pip or preferably with pipx for better isolation. ```bash pip install pyright # or with pipx (recommended for isolation) pipx install pyright ``` -------------------------------- ### Configure MCP Servers with JSON Source: https://kiro.dev/docs/cli/mcp/configuration Examples of defining local command-based servers, remote HTTPS servers, and managing multiple server instances using JSON configuration files. ```json { "mcpServers": { "web-search": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-bravesearch"], "env": { "BRAVE_API_KEY": "${BRAVE_API_KEY}" } }, "api-server": { "url": "https://api.example.com/mcp", "headers": { "Authorization": "Bearer ${API_TOKEN}", "X-Custom-Header": "value" } } } } ``` -------------------------------- ### Install Kiro CLI on macOS Source: https://kiro.dev/docs/cli/installation Installs the Kiro CLI natively on macOS using a curl command to download and execute the installation script. This method is straightforward and recommended for macOS users. ```bash curl -fsSL https://cli.kiro.dev/install | bash ``` -------------------------------- ### Initialize Kiro CLI Language Servers Source: https://kiro.dev/docs/cli/code-intelligence Initializes language servers for the current project using a Kiro CLI command. This creates an lsp.json configuration file and starts the detected language servers. ```bash /code init ``` -------------------------------- ### Install clangd Language Server Source: https://kiro.dev/docs/cli/code-intelligence Installs the clangd language server for C/C++ development on Debian/Ubuntu and Arch Linux systems. ```bash sudo apt install clangd ``` ```bash sudo pacman -S clang ``` -------------------------------- ### Install Kiro Command Router Integration Source: https://kiro.dev/docs/cli/reference/cli-commands Installs the Kiro Command Router, which acts as a unified entry point for the `kiro` command, routing it between CLI and IDE based on user preference. This solves the issue where `kiro` defaults to launching the IDE instead of the CLI. ```bash # Install the router kiro-cli integrations install kiro-command-router # Set CLI as the default kiro set-default cli ``` -------------------------------- ### Install Rust Analyzer Source: https://kiro.dev/docs/cli/code-intelligence Installs the rust-analyzer component using rustup. This language server provides enhanced code intelligence for Rust projects when LSP is enabled in Kiro CLI. ```bash rustup component add rust-analyzer ``` -------------------------------- ### Launch Kiro CLI on Ubuntu Source: https://kiro.dev/docs/cli/installation Launches the Kiro CLI after installation on Ubuntu. This command initiates the CLI application, which may prompt for browser authentication. ```bash kiro-cli ``` -------------------------------- ### MCP Tool Pre-Tool Use Hook Example Source: https://kiro.dev/docs/cli/hooks Example of a pre-tool use hook for MCP tools, where the tool name includes the full namespaced format. This hook runs before the specified tool is executed. ```json { "hook_event_name": "preToolUse", "cwd": "/current/working/directory", "tool_name": "@postgres/query", "tool_input": { "sql": "SELECT * FROM orders LIMIT 10;" } } ``` -------------------------------- ### Manage Code Intelligence - Kiro CLI Source: https://kiro.dev/docs/cli/reference/slash-commands The `/code` command manages code intelligence features powered by LSP. It allows initialization, reinitialization, and provides overviews and status of the workspace and LSP servers. Use `init` to start code intelligence and `overview` or `status` to get information. ```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 ``` -------------------------------- ### Install TypeScript Language Server Source: https://kiro.dev/docs/cli/code-intelligence Installs the TypeScript language server globally using npm. This is required for enhanced LSP features in Kiro CLI for TypeScript/JavaScript projects. ```bash npm install -g typescript-language-server typescript ``` -------------------------------- ### Plan Agent Requirements Gathering Example Source: https://kiro.dev/docs/cli/chat/planning-agent Illustrates the interactive requirements gathering process of the Plan agent. The agent asks structured, multiple-choice questions to refine the user's idea, such as building a todo app, and adapts based on the provided answers. ```bash [plan] > I want to build a todo app I understand you want to build a todo app. Let me help you plan this implementation. **My Understanding:** You want to create a todo application for managing tasks. Let me gather some requirements to create a detailed plan: [1]: What platform should this todo app target? a. **Web Application** - Browser-based with HTML/CSS/JavaScript b. **Mobile App** - Native iOS/Android or cross-platform c. **Desktop App** - Electron, Tauri, or native desktop d. **CLI Tool** - Command-line interface e. **Other** - Provide your own answer [2]: What's the primary use case for this todo app? a. **Personal Task Management** - Individual productivity b. **Team Collaboration** - Shared tasks and assignments c. **Project Management** - Complex workflows with dependencies d. **Other** - Describe your specific needs (Use the chat to answer any subset: eg., "1=a, 2=b" or provide your own answers) ``` -------------------------------- ### Kiro CLI Pattern Search Examples Source: https://kiro.dev/docs/cli/code-intelligence Demonstrates AST-based structural code search using patterns. It shows how to find specific code constructs like console.log calls, async functions, and method calls. ```javascript // Find all console.log calls pattern: console.log($ARG) language: javascript ``` ```typescript // Find all async functions pattern: async function $NAME($$$PARAMS) { $$$ } language: typescript ``` ```rust // Find all .unwrap() calls pattern: $E.unwrap() language: rust ``` -------------------------------- ### Execute AWS CLI Command Example Source: https://kiro.dev/docs/cli/reference/built-in-tools Example of how to execute an AWS CLI command using the 'aws' tool. This demonstrates specifying the service, operation, parameters, and region. ```bash list my s3 buckets Running aws cli command (using tool: aws): Service name: s3api Operation name: list-buckets Parameters: Region: us-east-1 Label: List all S3 buckets ``` -------------------------------- ### Example Subagent Workflow Source: https://kiro.dev/docs/cli/reference/built-in-tools Demonstrates the conceptual workflow of a main agent delegating research tasks to multiple subagents in parallel. ```bash > Research the top 3 JavaScript frameworks and compare their performance # Main agent spawns 3 subagents: # - Subagent 1: Research React performance metrics # - Subagent 2: Research Vue.js performance metrics # - Subagent 3: Research Angular performance metrics # Each subagent: # - Conducts independent research # - Gathers relevant data # - Calls summary tool with findings # Main agent receives all summaries and synthesizes comparison ``` -------------------------------- ### Web Fetch Tool Configuration Example Source: https://kiro.dev/docs/cli/reference/built-in-tools Shows how to configure URL-based permissions for the web_fetch tool using JSON. The 'trusted' array specifies URL patterns to auto-allow, while the 'blocked' array lists patterns to deny, with 'blocked' taking precedence. ```json { "toolsSettings": { "web_fetch": { "trusted": [" M.*docs\\.aws\\.amazon\\.com.*", " M.*github\\.com.*"], "blocked": [" M.*pastebin\\.com.*"] } } } ``` -------------------------------- ### POST /chat/new Source: https://kiro.dev/docs/cli/chat/conversations Starts a fresh conversation session within the current CLI context, optionally with an initial prompt. ```APIDOC ## POST /chat/new ### Description Starts a fresh conversation session. This command saves the current session to the database and initializes a new one. ### Method POST ### Endpoint /chat/new ### Parameters #### Query Parameters - **prompt** (string) - Optional - An initial prompt to send to the new conversation session. ### Request Example /chat new how do I set up a React project ### Response #### Success Response (200) - **status** (string) - Confirmation that a new session has been initialized. ``` -------------------------------- ### Install Python with uv (Bash) Source: https://kiro.dev/docs/cli/mcp/examples Installs Python version 3.10 or newer using the uv command-line tool. This ensures the correct Python version is available for Kiro and its MCP servers. ```bash uv python install 3.10 ``` -------------------------------- ### Install uv Package Manager (Bash) Source: https://kiro.dev/docs/cli/mcp/examples Installs the uv package manager from Astral on macOS and Linux using a curl command. This is a prerequisite for setting up the AWS Documentation server. ```bash # On macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Start Kiro CLI Chat Session Source: https://kiro.dev/docs/cli/chat/conversations Commands to initiate the Kiro CLI chat interface, optionally specifying an agent context. ```bash kiro-cli kiro-cli --agent myagent ``` -------------------------------- ### Example of Skill Activation in Kiro Source: https://kiro.dev/docs/cli/skills Demonstrates how a skill like 'pr-review' is activated automatically based on a user's request in a chat session. This showcases the natural language interaction model for invoking skills. ```markdown ``` > Review this PR for security issues [skill: pr-review activated] I'll review the PR using the security checklist... ``` ``` -------------------------------- ### Interact with Kiro CLI Tools Source: https://kiro.dev/docs/cli/reference/built-in-tools Examples of using the CLI to perform tasks such as saving conversations, searching for code symbols, and delegating background tasks. ```bash > /chat save ~/conversation.json > Find the UserRepository class > Analyze all TypeScript files for potential bugs and create a report ``` -------------------------------- ### Run Kiro CLI with MCP Startup Check Source: https://kiro.dev/docs/cli/reference/exit-codes This command runs a Kiro CLI task, specifically requiring that MCP servers start successfully. If an MCP server fails to start, the CLI will exit immediately with code 3. This is useful in CI/CD pipelines where MCP tools are critical. ```bash kiro-cli chat --require-mcp-startup --no-interactive "Run task" ``` -------------------------------- ### Install JDT Language Server for Java Source: https://kiro.dev/docs/cli/code-intelligence Installs the Eclipse JDT Language Server (jdtls) for Java development. Instructions are provided for macOS using Homebrew. For Linux, users need to download and add it to their PATH. ```bash # macOS brew install jdtls # Linux - download from https://download.eclipse.org/jdtls/snapshots/ # Extract and add to PATH ``` -------------------------------- ### Install Solargraph for Ruby LSP Source: https://kiro.dev/docs/cli/code-intelligence Installs the Solargraph gem, a Ruby LSP server. This enables enhanced code intelligence features for Ruby projects when using Kiro CLI's LSP integration. ```bash gem install solargraph ``` -------------------------------- ### Create Background Task with Kiro CLI Source: https://kiro.dev/docs/cli/experimental/delegate Example of using natural language to ask Kiro to create a background task for analyzing API performance. It includes the agent selection, tools, resources, and approval prompt. ```bash > Can you create a background task to analyze the performance of our API endpoints? I'll create a background task to analyze your API performance. Agent: performance-analyzer Tools: read, shell, aws Resources: api-docs, performance-metrics Approve this agent? (y/n): y ✓ Task created: api-performance-analysis Task ID: task-abc123 Status: Running You can continue working while the analysis runs in the background. > Great! Now help me with the frontend code... ``` -------------------------------- ### kiro-cli chat Source: https://kiro.dev/docs/cli/reference/cli-commands Start an interactive chat session with Kiro or ask a question directly from the command line. ```APIDOC ## CLI COMMAND: kiro-cli chat ### Description Starts an interactive chat session with the Kiro AI agent. If an input is provided, it processes the question directly. ### Syntax `kiro-cli chat [OPTIONS] [INPUT]` ### Parameters #### Options - **--no-interactive** (flag) - Optional - Print first response to STDOUT without interactive mode - **--resume** / **-r** (flag) - Optional - Resume the previous conversation from this directory - **--resume-picker** (flag) - Optional - Open interactive session picker to choose which session to resume - **--list-sessions** (flag) - Optional - List all saved chat sessions for the current directory - **--list-models** (flag) - Optional - Display available models - **--delete-session** (ID) - Optional - Delete a saved chat session by ID - **--agent** (string) - Optional - Specify which agent to use - **--trust-all-tools** (flag) - Optional - Allow the model to use any tool without confirmation - **--trust-tools** (string) - Optional - Trust only specified tools (comma-separated list) - **--require-mcp-startup** (flag) - Optional - Exit with code 3 if any MCP server fails to start - **--wrap** (string) - Optional - Line wrapping mode: `always`, `never`, or `auto` ### Example `kiro-cli chat "How do I list files in Linux?"` ``` -------------------------------- ### Get Hover Documentation with Kiro CLI Source: https://kiro.dev/docs/cli/code-intelligence Fetches documentation for a symbol when hovering over it in an editor. This provides quick access to information about functions, classes, and their parameters. ```bash > What's the documentation for the authenticate method in AuthService? ``` -------------------------------- ### Define MCP Registry Configuration Source: https://kiro.dev/docs/cli/enterprise/governance/mcp This JSON example demonstrates how to define both a remote HTTP-based MCP server and a local stdio-based MCP server within the Kiro registry format. It includes configuration for headers, package identifiers, runtime arguments, and environment variables. ```json { "servers": [ { "server": { "name": "my-remote-server", "title": "My server", "description": "My server description", "version": "1.0.0", "remotes": [ { "type": "streamable-http", "url": "https://acme.com/my-server", "headers": [ { "name": "X-My-Header", "value": "SomeValue" } ] } ] } }, { "server": { "name": "my-local-server", "title": "My server", "description": "My server description", "version": "1.0.0", "packages": [ { "registryType": "npm", "registryBaseUrl": "https://npm.acme.com", "identifier": "@acme/my-server", "transport": { "type": "stdio" }, "runtimeArguments": [ { "type": "positional", "value": "-q" } ], "packageArguments": [ { "type": "positional", "value": "start" } ], "environmentVariables": [ { "name": "ENV_VAR", "value": "ENV_VAR_VALUE" } ] } ] } } ] } ``` -------------------------------- ### Start Fresh Conversation Source: https://kiro.dev/docs/cli/chat/conversations Commands to terminate the current session and begin a new one, optionally with an initial prompt. ```bash /chat new /chat new how do I set up a React project ``` -------------------------------- ### Start Kiro CLI Chat Session Source: https://kiro.dev/docs/cli/reference/cli-commands Initiates an interactive chat session with Kiro. It can be used for general conversation, asking questions, resuming previous chats, listing available models, or managing chat sessions. Supports non-interactive mode for direct output. ```bash kiro-cli chat [OPTIONS] [INPUT] # Start interactive chat kiro-cli # Ask a question directly kiro-cli chat "How do I list files in Linux?" # Non-interactive mode with trusted tools kiro-cli chat --no-interactive --trust-all-tools "Show me the current directory" # Resume previous conversation kiro-cli chat --resume # Open session picker to choose which session to resume kiro-cli chat --resume-picker # List all saved sessions kiro-cli chat --list-sessions # List available models (plain text) kiro-cli chat --list-models # List available models (JSON output for scripting) kiro-cli chat --list-models --format json # Use specific agent kiro-cli chat --agent my-agent "Help me with AWS CLI" ``` -------------------------------- ### Manage Settings and Troubleshooting Source: https://kiro.dev/docs/cli/reference/settings Commands for resetting settings, opening the configuration file, listing all current settings, and backing up configurations to a JSON file. ```bash kiro-cli settings --delete setting.name kiro-cli settings open kiro-cli settings list --all kiro-cli settings list --format json > backup.json ``` -------------------------------- ### Download Kiro CLI for Ubuntu (.deb) Source: https://kiro.dev/docs/cli/installation Downloads the Kiro CLI .deb package for Ubuntu systems using wget. This package is used for installation via the dpkg package manager. ```bash wget https://desktop-release.q.us-east-1.amazonaws.com/latest/kiro-cli.deb ``` -------------------------------- ### Create Custom Agent via CLI Source: https://kiro.dev/docs/cli/custom-agents/creating Demonstrates how to initialize a new agent configuration manually or by cloning an existing agent template using the Kiro CLI. ```bash > /agent create my-agent --manual > /agent create my-agent --from backend-specialist ``` -------------------------------- ### Manage Kiro System Integrations Source: https://kiro.dev/docs/cli/reference/cli-commands Provides functionality to manage system integrations for Kiro, including installing, uninstalling, reinstalling, and checking the status of integrations. Supports silent operations and different output formats. ```bash # Install kiro command router (v1.26.0+) kiro-cli integrations install kiro-command-router # Check integration status kiro-cli integrations status # Uninstall silently kiro-cli integrations uninstall --silent ``` -------------------------------- ### Alias Tool Names Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference Provides examples of remapping tool names to resolve naming collisions or create more intuitive aliases for complex tool identifiers. ```json { "toolAliases": { "@github-mcp/get_issues": "github_issues", "@gitlab-mcp/get_issues": "gitlab_issues" } } { "toolAliases": { "@aws-cloud-formation/deploy_stack_with_parameters": "deploy_cf", "@kubernetes-tools/get_pod_logs_with_namespace": "pod_logs" } } ``` -------------------------------- ### ACP Client Initialization Request and Response Source: https://kiro.dev/docs/cli/acp Example JSON-RPC messages for initializing an ACP connection. The client sends its capabilities, and the agent (Kiro) responds with its supported capabilities, protocol version, and agent information. ```json // Client sends initialize request { "jsonrpc": "2.0", "id": 0, "method": "initialize", "params": { "protocolVersion": 1, "clientCapabilities": { "fs": { "readTextFile": true, "writeTextFile": true }, "terminal": true }, "clientInfo": { "name": "my-editor", "version": "1.0.0" } } } // Kiro responds with capabilities { "jsonrpc": "2.0", "id": 0, "result": { "protocolVersion": 1, "agentCapabilities": { "loadSession": true, "promptCapabilities": { "image": true } }, "agentInfo": { "name": "kiro-cli", "version": "1.5.0" } } } ``` -------------------------------- ### Prompt Creation and Usage Source: https://kiro.dev/docs/cli/chat/manage-prompts Commands to create a new local file-based prompt and how to trigger it using the @ reference syntax. ```bash /prompts create --name code-review --content "Please review this code for best practices, security issues, and potential improvements:" @code-review ``` -------------------------------- ### Download Kiro CLI Linux AppImage Source: https://kiro.dev/docs/cli/installation Downloads the Kiro CLI AppImage for Linux. This is a single file that can be executed directly on most Linux distributions without installation. ```bash https://desktop-release.q.us-east-1.amazonaws.com/latest/kiro-cli.appimage ``` -------------------------------- ### Troubleshoot Kiro CLI Autocomplete (Bash) Source: https://kiro.dev/docs/cli/autocomplete Steps to troubleshoot if Kiro CLI autocomplete is not working. This involves verifying the installation, checking settings, restarting the terminal, and trying different shells. ```bash kiro-cli --version kiro-cli settings autocomplete.disable ``` -------------------------------- ### Implement Git-based Session Persistence Source: https://kiro.dev/docs/cli/reference/slash-commands Example shell scripts to save chat sessions to Git notes and load them back. These scripts use stdin/stdout to handle the session JSON data. ```bash # Save script #!/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 script #!/bin/bash set -ex COMMIT=$(git rev-parse HEAD) git notes --ref=kiro/notes show "$COMMIT" ``` -------------------------------- ### POST /checkpoint/init Source: https://kiro.dev/docs/cli/experimental/checkpointing Manually initializes the checkpointing system for the current session, which is required if the working directory is not a git repository. ```APIDOC ## POST /checkpoint/init ### Description Manually enables the checkpointing feature for the current session. This is necessary for non-git directories where auto-initialization is not triggered. ### Method POST ### Endpoint /checkpoint init ### Request Example /checkpoint init ### Response #### Success Response (200) - **status** (string) - Confirmation that checkpointing has been initialized. ``` -------------------------------- ### Manage Prompts - Kiro CLI Source: https://kiro.dev/docs/cli/reference/slash-commands The `/prompts` command allows users to view, retrieve, create, edit, and remove prompts. Prompts are reusable templates for common workflows. You can list available prompts, get details, retrieve specific prompts, or manage local prompts. Quick retrieval is also supported using the '@' prefix. ```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 ``` -------------------------------- ### Define MCP Server Configurations Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference Shows how to register MCP servers with required commands, arguments, environment variables, and optional OAuth authentication settings. ```json { "mcpServers": { "fetch": { "command": "fetch3.1", "args": [] }, "git": { "command": "git-mcp", "args": [], "env": { "GIT_CONFIG_GLOBAL": "/dev/null" }, "timeout": 120000 } } } ``` -------------------------------- ### Manage Kiro CLI Sessions within Chat Interface Source: https://kiro.dev/docs/cli/chat/session-management This section outlines commands used within the Kiro CLI chat interface to manage conversations. It includes starting new conversations, resuming existing ones interactively, saving the current session to a file, and loading a session from a file. The `.json` extension is optional when loading sessions. ```bash # Start a fresh conversation (saves current session automatically) /chat new # Start a fresh conversation with an initial prompt /chat new how do I set up a React project # Resume session (interactive) /chat resume # Save to file /chat save # Load from file /chat load ``` -------------------------------- ### File and Directory Referencing Source: https://kiro.dev/docs/cli/chat/manage-prompts Demonstrates how to reference files, directories, and paths with spaces using the @ prefix. These references allow the CLI to include file content or directory structures in the context. ```text @crates/agent/ @"my file.txt" @./v1/api.rs ``` -------------------------------- ### Configure File URI Prompts Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference Demonstrates how to reference external prompt files using relative or absolute file URIs within the configuration. ```json { "prompt": "file://./prompts/aws-expert.md" } { "prompt": "file:///Users/developer/shared-prompts/rust-specialist.md" } ``` -------------------------------- ### Basic File and Directory References Source: https://kiro.dev/docs/cli/chat/file-references Demonstrates the basic usage of file references by including specific files or entire directory trees in chat messages. Supports relative paths and paths with spaces, which require quoting. ```bash @src/index.ts # Include file contents @src/ # Include directory tree @./relative/path # Relative paths @"path with spaces.txt" # Quoted paths (required for spaces) ``` -------------------------------- ### Add and Manage Knowledge Bases with Kiro CLI Source: https://kiro.dev/docs/cli/experimental/knowledge-management Demonstrates how to add documents to the knowledge base and switch between agents. Commands operate on the current agent's knowledge base, ensuring isolation between different agents. ```bash # Working with default agent /knowledge add /path/to/docs # Switch to custom agent kiro chat --agent my-custom-agent # Creates separate knowledge base for my-custom-agent /knowledge add /path/to/agent/docs # Switch back to default kiro chat # Only sees original docs, not agent-specific docs /knowledge show ``` -------------------------------- ### kiro-cli doctor Source: https://kiro.dev/docs/cli/reference/cli-commands Diagnose and fix common installation and configuration issues. ```APIDOC ## CLI COMMAND: kiro-cli doctor ### Description Runs diagnostic tests to identify and resolve configuration issues within the Kiro environment. ### Syntax `kiro-cli doctor [OPTIONS]` ### Parameters #### Options - **--all** / **-a** (flag) - Optional - Run all diagnostic tests without fixes - **--strict** / **-s** (flag) - Optional - Error on warnings - **--format** / **-f** (string) - Optional - Output format: `plain`, `json`, `json-pretty` ``` -------------------------------- ### Create Agent with AI Assistance (Slash Command) Source: https://kiro.dev/docs/cli/custom-agents/creating Creates a new agent using AI assistance by providing the agent name, description, scope, and selecting MCP servers. This method leverages AI to generate the agent configuration based on the provided details. ```bash > /agent create ✔ Enter agent name: · backend-specialist ✔ Enter agent description: · You are a specialist in backend coding practices ✔ Agent scope · Local (current workspace) Select MCP servers (use Space to toggle, Enter to confirm): markdown-downloader (node), code-analysis (uv) ✓ Agent 'backend-specialist' has been created and saved successfully! ``` -------------------------------- ### Disable Specific Terminal Features in Kiro CLI TUI v2 Source: https://kiro.dev/docs/cli/experimental/tui This example shows how to disable individual terminal features of Kiro CLI TUI v2 using environment variables. This is useful for troubleshooting or customizing the user experience. Examples include disabling clickable hyperlinks, the progress indicator, or synchronized output. ```bash KIRO_NO_HYPERLINKS=1 kiro-cli chat --tui # Disable clickable links KIRO_NO_PROGRESS=1 kiro-cli chat --tui # Disable progress indicator KIRO_NO_SYNCHRONIZED=1 kiro-cli chat --tui # Disable synchronized output ``` -------------------------------- ### GET /checkpoint/diff Source: https://kiro.dev/docs/cli/experimental/checkpointing Compares two specific checkpoints or a checkpoint against the current file system state (HEAD). ```APIDOC ## GET /checkpoint/diff ### Description Generates a diff between two checkpoints or between a checkpoint and the current working state. ### Method GET ### Endpoint /checkpoint diff [tag2|HEAD] ### Parameters #### Path Parameters - **tag1** (string) - Required - The first checkpoint tag to compare. - **tag2** (string) - Optional - The second checkpoint tag or 'HEAD' to compare against the current state. ### Request Example /checkpoint diff 1 2 ### Response #### Success Response (200) - **diff** (string) - The formatted diff output showing file changes. ``` -------------------------------- ### GET /checkpoint/list Source: https://kiro.dev/docs/cli/experimental/checkpointing Retrieves a list of all turn-level checkpoints created during the current session, including file statistics. ```APIDOC ## GET /checkpoint/list ### Description Lists all available turn-level checkpoints with associated file change statistics. ### Method GET ### Endpoint /checkpoint list ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of checkpoints to return. ### Request Example /checkpoint list --limit 5 ### Response #### Success Response (200) - **checkpoints** (array) - A list of checkpoint objects containing tag, timestamp, and description. #### Response Example [0] 2025-09-18 14:00:00 - Initial checkpoint [1] 2025-09-18 14:05:31 - add two_sum.py (+1 file) ``` -------------------------------- ### GET /chat/resume Source: https://kiro.dev/docs/cli/chat/conversations Resumes a previous conversation session based on the current directory or via an interactive picker. ```APIDOC ## GET /chat/resume ### Description Resumes a conversation session. Kiro uses the current directory to determine the conversation history to load. ### Method GET ### Endpoint /chat/resume ### Parameters #### Query Parameters - **picker** (boolean) - Optional - If true, opens an interactive session picker to choose from previous sessions. ### Request Example kiro-cli chat --resume ### Response #### Success Response (200) - **session_id** (string) - The ID of the resumed conversation session. ``` -------------------------------- ### Manage Environment Variables for MCP Source: https://kiro.dev/docs/cli/mcp/configuration Demonstrates how to inject environment variables into MCP server configurations using the ${VAR} syntax and how to export them in a shell environment. ```json { "mcpServers": { "server-name": { "env": { "API_KEY": "${YOUR_API_KEY}", "DEBUG": "true", "TIMEOUT": "30000" } } } } ``` ```bash export YOUR_API_KEY="your-actual-key" export DEBUG="true" ``` -------------------------------- ### Manage Experimental Settings Source: https://kiro.dev/docs/cli/experimental Commands to list all experimental settings and toggle specific features like knowledge management, tangent mode, and thinking capabilities. ```bash kiro-cli settings list | grep -i enable kiro-cli settings chat.enableKnowledge true kiro-cli settings chat.enableTangentMode true kiro-cli settings chat.enableTodoList true kiro-cli settings chat.enableThinking true ``` -------------------------------- ### Run GitHub MCP Server with Toolsets (Bash) Source: https://kiro.dev/docs/cli/mcp/examples This bash command demonstrates how to run the GitHub MCP server using Docker, specifying the GitHub Personal Access Token and enabling specific toolsets via environment variables. This allows for fine-grained control over available GitHub API capabilities. ```bash docker run -i --rm \ -e GITHUB_PERSONAL_ACCESS_TOKEN= \ -e GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security,experiments" \ ghcr.io/github/github-mcp-server ``` -------------------------------- ### Settings Reference: Telemetry and Privacy Source: https://kiro.dev/docs/cli/reference/settings This reference provides details on settings related to telemetry and privacy, including their type, description, and an example of how to configure them. ```APIDOC ## Settings reference ### Telemetry and privacy Setting| Type| Description| Example ---|---|---|--- `telemetry.enabled`| boolean| Enable/disable telemetry collection| `kiro-cli settings telemetry.enabled true` `telemetryClientId`| string| Client identifier for telemetry| `kiro-cli settings telemetryClientId "client-123"` ``` -------------------------------- ### Get Diagnostics with Kiro CLI Source: https://kiro.dev/docs/cli/code-intelligence Retrieves code diagnostics (errors and warnings) for a specified file. This helps in identifying and fixing issues in the code. ```bash > Get diagnostics for main.ts ``` -------------------------------- ### Create Agent with AI Assistance (Inline Options - Slash Command) Source: https://kiro.dev/docs/cli/custom-agents/creating Creates a new agent with AI assistance by specifying the agent name and description directly within the command. This is a shorthand for the interactive AI-assisted creation. ```bash > /agent create backend-specialist -D "Backend coding specialist" -m code-analysis ```