### Basic Kiro CLI Setup Examples Source: https://kiro.dev/docs/cli/reference/settings Demonstrates basic Kiro CLI setup commands, including enabling telemetry, setting the default chat model, and disabling the greeting message. ```bash # Enable telemetry kiro-cli settings telemetry.enabled true ``` ```bash # Set default chat model kiro-cli settings chat.defaultModel "claude-3-sonnet" ``` ```bash # Disable greeting message kiro-cli settings chat.greeting.enabled false ``` -------------------------------- ### Install Delta on Ubuntu/Debian Source: https://kiro.dev/docs/cli/chat/diff-tools Example command to install the 'git-delta' package using apt on Ubuntu or Debian-based systems. ```bash # Ubuntu/Debian sudo apt install git-delta ``` -------------------------------- ### Example Guide Agent Conversation Source: https://kiro.dev/docs/cli/quick-start Interact with the Guide agent by asking questions about project setup, code reviews, and account connections. ```bash [guide] > What can you help me with? [guide] > How should I set up this project to work well with Kiro? [guide] > What's the best way to do code reviews with Kiro? [guide] > How do I connect my GitHub account? ``` -------------------------------- ### Create Agent via Slash Command (Inline Options) Source: https://kiro.dev/docs/cli/custom-agents/creating Provide agent name and options directly within the `/agent create` slash command for a quicker setup. This example specifies the name, description, and an MCP server. ```text > /agent create backend-specialist -D "Backend coding specialist" -m code-analysis ``` -------------------------------- ### Switch to the Guide Agent Source: https://kiro.dev/docs/cli/chat/guide Use this command to activate the Guide agent for documentation-related queries. ```bash > /guide ``` -------------------------------- ### Verify Tool Installation (Delta Example) Source: https://kiro.dev/docs/cli/chat/diff-tools Check if a configured diff tool is installed and accessible in your system's PATH. This is a common troubleshooting step. ```bash which delta ``` -------------------------------- ### Install C/C++ Language Servers Source: https://kiro.dev/docs/cli/code-intelligence Install C/C++ language servers like clangd or llvm. Installation methods vary by operating system. ```bash # macOS brew install llvm # or brew install clangd # Linux (Debian/Ubuntu) sudo apt install clangd # Linux (Arch) sudo pacman -S clang ``` -------------------------------- ### Install Kiro CLI on Ubuntu Source: https://kiro.dev/docs/cli/installation Install the downloaded .deb package and then use apt-get to install any missing dependencies. ```bash sudo dpkg -i kiro-cli.deb sudo apt-get install -f ``` -------------------------------- ### Knowledge Base Configuration Examples Source: https://kiro.dev/docs/cli/reference/settings Provides examples for configuring the knowledge base, including enabling it, setting include/exclude patterns for files, and defining the maximum number of files to index. ```bash # Enable knowledge base kiro-cli settings chat.enableKnowledge true ``` ```bash # Set file patterns to include kiro-cli settings knowledge.defaultIncludePatterns '["*.py", "*.js", "*.md", "*.txt"]' ``` ```bash # Set file patterns to exclude kiro-cli settings knowledge.defaultExcludePatterns '["*.log", "node_modules", ".git", "*.pyc"]' ``` ```bash # Set maximum files to index kiro-cli settings knowledge.maxFiles 2000 ``` -------------------------------- ### Example: Getting Kiro CLI Help in Tangent Mode Source: https://kiro.dev/docs/cli/experimental/tangent-mode Illustrates using tangent mode to ask for Kiro CLI commands related to file operations while discussing deployment script creation. ```bash > Help me write a deployment script I can help you create a deployment script... > /tangent Created a conversation checkpoint (↯). ↯ > What Kiro CLI commands are available for file operations? Kiro CLI provides read, write, shell... ↯ > /tangent Restored conversation from checkpoint (↯). > It's a Node.js application for AWS ``` -------------------------------- ### AWS Documentation MCP Server Usage Examples Source: https://kiro.dev/docs/cli/mcp/examples Examples of using the AWS Documentation MCP server for searching, reading, and getting recommendations for AWS documentation. ```bash # 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 ``` -------------------------------- ### Install Delta on macOS Source: https://kiro.dev/docs/cli/chat/diff-tools Example command to install the 'git-delta' package using Homebrew on macOS. ```bash # macOS brew install git-delta ``` -------------------------------- ### Install Kiro Command Router integration Source: https://kiro.dev/docs/cli/reference/cli-commands Install the Kiro Command Router, which unifies the `kiro` command between CLI and IDE. This example shows installation and setting the CLI as the default. ```bash # Install the router kiro-cli integrations install kiro-command-router # Set CLI as the default kiro set-default cli # Or set IDE as the default kiro set-default ide ``` -------------------------------- ### CDK Deployment Skill Example Source: https://kiro.dev/docs/cli/skills This example demonstrates a CDK deployment skill, including its directory structure and the content of its SKILL.md file, outlining the deployment workflow and best practices. ```markdown --- name: cdk-deploy description: Deploy AWS CDK stacks with best practices. Use when deploying infrastructure, running cdk deploy, or troubleshooting CDK issues. --- ## Deployment workflow 1. Run `cdk synth` to validate templates before deploying 2. Use `cdk diff` to preview what will change 3. Run `cdk deploy` and review IAM changes ``` -------------------------------- ### Install Kiro CLI from Zip Source: https://kiro.dev/docs/cli/installation Run the installation script after unzipping the Kiro CLI package on Linux. The default installation path is ~/.local/bin. ```bash ./kirocli/install.sh ``` -------------------------------- ### Start Kiro CLI Source: https://kiro.dev/docs/cli Navigate to your project directory and run the Kiro CLI to begin using its features. ```bash cd my-project kiro-cli ``` -------------------------------- ### Show Directory Structure Example Source: https://kiro.dev/docs/cli/chat/manage-prompts Demonstrates how to display the structure of a directory using the '@' syntax. ```bash @crates/agent/ ``` -------------------------------- ### Keyboard Shortcut Examples Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference Examples of valid keyboard shortcut strings using different modifiers. ```json "keyboardShortcut": "ctrl+a" // Control + A "keyboardShortcut": "shift+b" // Shift + B ``` -------------------------------- ### Install Go Language Server Source: https://kiro.dev/docs/cli/code-intelligence Install the Go language server (gopls) using the go install command. This provides code intelligence for Go projects. ```bash go install golang.org/x/tools/gopls@latest ``` -------------------------------- ### Version Control Integration Examples Source: https://kiro.dev/docs/cli/chat/session-management Shows how to use custom scripts to save and load sessions using Git notes. ```bash # Save to git notes /chat save-via-script ./scripts/save-to-git.sh ``` ```bash # Load from git notes /chat load-via-script ./scripts/load-from-git.sh ``` -------------------------------- ### Start New Chat with Initial Prompt Source: https://kiro.dev/docs/cli/chat Begins a new chat conversation and immediately sets an initial prompt for the AI. This helps to guide the AI from the very start of the new topic. ```bash # Start a fresh conversation with an initial prompt /chat new how do I set up a React project ``` -------------------------------- ### Install Kiro CLI Source: https://kiro.dev/docs/cli Install the Kiro CLI using a curl command to download and execute the installation script. ```bash curl -fsSL https://cli.kiro.dev/install | bash ``` -------------------------------- ### Write tool usage example Source: https://kiro.dev/docs/cli/reference/built-in-tools Example of invoking the write tool via the CLI to create a markdown file. ```bash > collect best practices for writing typescript code and save it to the kiro steering folder as codingpractices.md I'll create the following file: src/snake/.kiro/steering/codingpractices.md (using tool: write) Purpose: Create TypeScript coding best practices document + 1: # TypeScript Coding Best Practices + 2: + 3: ## Type Safety + 4: - Enable strict mode in `tsconfig.json` (`strict: true`) + 5: - Avoid `any` type - use `unknown` for truly dynamic types + 6: - Use explicit return types for functions + 7: - Leverage type inference where it improves readability + 8: - Use union types instead of enums when possible + 9: - Prefer `interface` for object shapes, `type` for unions/intersections + 10: + 11: ## Code Organization + 12: - One class/interface per file (exceptions for small related types) + 13: - Group related functionality into modules + 14: - Use barrel exports (`index.ts`) for clean imports + 15: - Keep functions small and focused (single responsibility) + 16: - Separate business logic from presentation logic ``` -------------------------------- ### GitHub Actions CI/CD Integration Source: https://kiro.dev/docs/cli/headless This example shows how to set up a GitHub Actions workflow to use Kiro CLI for code reviews. It includes installing the CLI and setting the API key as a secret. ```yaml name: Kiro Code Review on: [pull_request] jobs: review: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install Kiro CLI run: curl -fsSL https://cli.kiro.dev/install | bash - name: Review PR changes env: KIRO_API_KEY: ${{ secrets.KIRO_API_KEY }} run: kiro-cli chat --no-interactive --trust-tools=read,grep "Review the changes in this PR for security issues" ``` -------------------------------- ### Global Agent Directory Structure Example Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference Example layout of the user home directory containing global agent definitions. ```text ~/.kiro/agents/ ├── general-assistant.json ├── code-reviewer.json └── documentation-writer.json ``` -------------------------------- ### Local Agent Directory Structure Example Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference Example layout of a project directory containing local agent definitions. ```text my-project/ ├── .kiro/ │ └── agents/ │ ├── dev-agent.json │ └── aws-specialist.json └── src/ └── main.py ``` -------------------------------- ### Web search and fetch interaction examples Source: https://kiro.dev/docs/cli/reference/built-in-tools Examples of agent interactions using web search and content fetching tools. ```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 # Example 2 > What is the latest on t3 medium instance pricing. Searching the web for: AWS EC2 t3.medium instance pricing 2025 (using tool: web_search) ✓ Found 10 search results - Completed in 1.596s Fetching content from: https://aws.amazon.com/ec2/pricing/on-demand/ (searching for: t3.medium price cost) [mode: selective] (using tool: web_fetch) ✓ Fetched 11395 bytes (selective) from URL - Completed in 0.718s > The page doesn't show specific pricing in the excerpt. Let me get the actual pricing information: Fetching content from: https://instances.vantage.sh/aws/ec2/t3.medium (searching for: t3.medium $0.04) [mode: selective] (using tool: web_fetch) ✓ Fetched 3971 bytes (selective) from URL - Completed in 0.780s > Here's what I found: AWS EC2 t3.medium Instance Pricing (2025): ... ``` -------------------------------- ### Example: Use Delta Diff Tool Source: https://kiro.dev/docs/cli/chat/diff-tools An example of configuring Kiro CLI to use the 'delta' tool for diffing. ```bash kiro-cli settings chat.diffTool delta ``` -------------------------------- ### Include File Content Example Source: https://kiro.dev/docs/cli/chat/manage-prompts Demonstrates how to include the content of a specific file using the '@' syntax. ```bash @src/auth.rs ``` -------------------------------- ### Enable Experimental Features Examples Source: https://kiro.dev/docs/cli/reference/settings Examples for enabling various experimental features in Kiro CLI, such as the thinking tool, tangent mode, todo lists, and checkpoints. Also shows how to configure key bindings for tangent and delegate modes. ```bash # Enable thinking tool kiro-cli settings chat.enableThinking true ``` ```bash # Enable tangent mode kiro-cli settings chat.enableTangentMode true ``` ```bash # Enable todo lists kiro-cli settings chat.enableTodoList true ``` ```bash # Enable checkpoints kiro-cli settings chat.enableCheckpoint true ``` ```bash # Configure key bindings kiro-cli settings chat.tangentModeKey "t" ``` ```bash kiro-cli settings chat.delegateModeKey "d" ``` -------------------------------- ### Ask a Question to the Guide Agent Source: https://kiro.dev/docs/cli/chat/guide Once in the Guide agent, you can ask questions about Kiro CLI features and configuration. ```bash [guide] > How do I configure MCP servers? ``` -------------------------------- ### Install uv on macOS/Linux Source: https://kiro.dev/docs/cli/mcp/examples Installs the 'uv' package manager on macOS and Linux systems using a curl script. ```bash # On macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Install Pyright for Python Source: https://kiro.dev/docs/cli/code-intelligence Install the Pyright language server for Python code intelligence. Using pipx is recommended for better isolation. ```bash pip install pyright ``` ```bash pipx install pyright ``` -------------------------------- ### MCP configuration override scenarios Source: https://kiro.dev/docs/cli/mcp/configuration Examples demonstrating how server configurations are merged or overridden based on priority. ```text Agent config: { "fetch": { command: "fetch-v2" } } Workspace config: { "fetch": { command: "fetch-v1" } } Global config: { "fetch": { command: "fetch-old" } } Result: Only "fetch-v2" from agent config is used ``` ```text Agent config: { "fetch": {...} } Workspace config: { "git": {...} } Global config: { "aws": {...} } Result: All three servers are used (fetch, git, aws) ``` ```text Agent config: { "fetch": { command: "...", disabled: true } } Workspace config: { "fetch": { command: "..." } } Result: No fetch server is launched ``` -------------------------------- ### Install Kotlin Language Server Source: https://kiro.dev/docs/cli/code-intelligence Install the Kotlin language server using Homebrew on macOS. Ensure the server is available for Kotlin code intelligence. ```bash brew install kotlin-language-server ``` -------------------------------- ### Start Interactive Documentation Generation Source: https://kiro.dev/docs/cli/code-intelligence Initiate an interactive session to generate documentation for your codebase. Choose from AGENTS.md, README.md, or CONTRIBUTING.md output formats. ```bash /code summary ``` -------------------------------- ### Export Session to File Example Source: https://kiro.dev/docs/cli/chat/session-management Demonstrates how to export the current session to a file named 'backup.json'. ```bash /chat save backup.json ``` -------------------------------- ### Automatic Skill Activation Example Source: https://kiro.dev/docs/cli/skills This example shows how Kiro automatically activates a skill based on a user's request matching the skill's description. ```text > Review this PR for security issues I'll review the PR using the security checklist... ``` -------------------------------- ### Performance Tuning Examples Source: https://kiro.dev/docs/cli/reference/settings Examples for performance tuning in Kiro CLI, including increasing API timeout, adjusting knowledge base chunk size, and disabling auto-compaction for long conversations. ```bash # Increase API timeout for slow connections kiro-cli settings api.timeout 60 ``` ```bash # Adjust knowledge base chunk size kiro-cli settings knowledge.chunkSize 1024 ``` ```bash # Disable auto-compaction for long conversations kiro-cli settings chat.disableAutoCompaction true ``` -------------------------------- ### Example: Clarifying Requirements with Tangent Mode Source: https://kiro.dev/docs/cli/experimental/tangent-mode Shows how tangent mode can be used to ask for necessary information to optimize an SQL query. ```bash > I need to optimize this SQL query Could you share the query you'd like to optimize? > /tangent Created a conversation checkpoint (↯). ↯ > What information do you need to help optimize a query? To optimize SQL queries effectively, I need: 1. The current query 2. Table schemas and indexes... ↯ > /tangent Restored conversation from checkpoint (↯). > Here's my query: SELECT * FROM orders... ``` -------------------------------- ### Initiate Complex Task Source: https://kiro.dev/docs/cli/experimental/todo-lists Start a complex task by describing it to Kiro. Kiro will then automatically create a TODO list for the task. ```bash > I need to set up CI/CD for our project ``` -------------------------------- ### Example Implementation Plan Source: https://kiro.dev/docs/cli/chat/planning-agent The Plan agent generates a detailed, step-by-step implementation plan, including a problem statement, requirements, and a task breakdown with demo descriptions. ```bash **Implementation Plan - Todo CLI Command** **Problem Statement:** Add todo management to existing Kiro CLI for task tracking. **Requirements:** - CLI commands for CRUD operations - Local SQLite storage - Priority and due date support **Task Breakdown:** Task 1: Create database schema and models - Define Todo struct with required fields - Create database migration for todos table - Demo: Can create and query todos in database Task 2: Implement CLI command structure - Add todo subcommand with add/list/complete operations - Demo: CLI accepts todo commands and shows help Task 3: Add advanced features - Implement due dates and priority sorting - Demo: Complete todo system with all features ``` -------------------------------- ### LSP Initialization Output Example Source: https://kiro.dev/docs/cli/code-intelligence This output shows the status of workspace initialization, detected languages, project markers, and the availability of various Language Servers. ```text ✓ Workspace initialization started Workspace: /path/to/your/project Detected Languages: ["python", "rust", "typescript"] Project Markers: ["Cargo.toml", "package.json"] Available LSPs: ○ clangd (cpp) - available ○ gopls (go) - not installed ◐ jdtls (java) - initializing... ✓ pyright (python) - initialized (687ms) ✓ rust-analyzer (rust) - initialized (488ms) ○ solargraph (ruby) - not installed ✓ typescript-language-server (typescript) - initialized (214ms) ``` -------------------------------- ### Manual Skill Activation via Slash Command Source: https://kiro.dev/docs/cli/skills This example demonstrates invoking a skill directly using a slash command. ```text > /pr-review I'll review the PR using the security checklist... ``` -------------------------------- ### Command to Implement Feature with Review Loop Source: https://kiro.dev/docs/cli/chat/subagents A command-line example specifying a feature implementation that includes a review process with potential revisions. ```bash > Implement the feature, then have a reviewer check it and send it back for fixes until it passes ``` -------------------------------- ### Read file content via CLI Source: https://kiro.dev/docs/cli/reference/built-in-tools Example of using the read tool to inspect project dependencies. ```bash > what dependencies does my application have Reading file: src/snake/package.json, all lines (using tool: read) ✓ Successfully read 1417 bytes from src/snake/package.json - Completed in 0.86s > Your application has: Runtime Dependencies: - typescript (^3.5.1) - TypeScript compiler - gh-pages (^2.0.1) - GitHub Pages deployment Dev Dependencies: - sass (^1.20.3) - CSS preprocessing - eslint (^5.16.0) + TypeScript plugins - Code linting - jest (^29.5.0) + ts-jest - Testing framework No external game libraries or frameworks. ``` -------------------------------- ### Experimenting with Changes - Restore to Initial Source: https://kiro.dev/docs/cli/experimental/checkpointing Demonstrates using checkpointing to revert to an initial state after making changes and then trying a new approach. ```bash /checkpoint restore 0 ``` -------------------------------- ### Command to Refactor with Dependencies Source: https://kiro.dev/docs/cli/chat/subagents A command-line example demonstrating the intent to refactor a module, including dependency analysis and testing steps. ```bash > Refactor the auth module — analyze dependencies first, then refactor each service, then run tests ``` -------------------------------- ### Complete Agent Configuration Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference A full example of an agent configuration file including MCP servers, tools, hooks, and model 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!" } ``` -------------------------------- ### Example Planning Agent Workflow Source: https://kiro.dev/docs/cli/chat/planning-agent Demonstrates a typical interaction with the planning agent, from initial request to plan confirmation and transfer to the execution agent. This workflow is useful for understanding the agent's conversational style and the steps involved in generating an implementation plan. ```bash > /plan Add user authentication to my web app [plan] > I understand you want to add user authentication to your web application. **My Understanding:** You want to implement user authentication functionality for an existing web application. [1]: What authentication method do you prefer? a. **Email/Password** - Traditional username and password b. **OAuth** - Google, GitHub, or other OAuth providers c. **Magic Links** - Passwordless email-based authentication d. **Multi-factor** - Combination of methods with 2FA > 1=a [plan] > Great! Email/password authentication it is. [2]: What's your current tech stack? a. **React + Node.js** - JavaScript full-stack b. **Next.js** - React with server-side rendering c. **Django/Flask** - Python web framework d. **Other** - Please specify > 2=d, I'm using Rust with Axum framework [plan] > Perfect! Rust with Axum is an excellent choice for secure authentication. *Researching Axum authentication patterns...* *Exploring your existing codebase structure...* **Implementation Plan - User Authentication System** [Detailed plan follows...] Does this plan look good, or would you like me to adjust anything? > Looks perfect! Ready to exit [plan] agent to start your implementation? [y/n]: y [default] > Implement this plan: [Plan content transferred to execution agent] ``` -------------------------------- ### Custom Session Storage Scripts Source: https://kiro.dev/docs/cli/reference/slash-commands Commands and example scripts for integrating custom storage solutions like Git notes. ```bash > /chat save-via-script ./scripts/save-to-git.sh ``` ```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 ``` ```bash > /chat load-via-script ./scripts/load-from-git.sh ``` ```bash #!/bin/bash set -ex COMMIT=$(git rev-parse HEAD) git notes --ref=kiro/notes show "$COMMIT" ``` -------------------------------- ### Advanced allowedTools pattern examples Source: https://kiro.dev/docs/cli/custom-agents/configuration-reference Demonstrates various wildcard patterns for native and MCP tools, including server-level permissions. ```json { "allowedTools": [ // Exact matches "read", "knowledge", "@server/specific_tool", // Native tool wildcards "r*", // Read "w*", // Write @builtin, // All native tools // MCP tool wildcards "@server/api_*", // All API tools from server "@server/read_*", // All read tools from server "@git-server/get_*_info", // Tools like get_user_info, get_repo_info "@*/status", // Status tool from any server // Server-level permissions "@fetch", // All tools from fetch server "@git-*" // All tools from any git-* server ] } ``` -------------------------------- ### Example Review Loop Pipeline Source: https://kiro.dev/docs/cli/chat/subagents Visualizes a review loop where an implementer's work is reviewed and can be sent back for revisions. ```text ┌──────────────┐ │ 1. Implement │ ◄─────────────┐ └──────┬───────┘ │ │ │ target: implement ┌──────▼───────┐ │ trigger: "NEEDS_CHANGES" │ 2. Review │ ──────────────┘ (up to max_iterations) └──────┬───────┘ │ (no trigger → continue) ┌──────▼───────┐ │ 3. Done │ └──────────────┘ ``` -------------------------------- ### Tracking Multi-Step Implementations Example Source: https://kiro.dev/docs/cli/experimental/todo-lists Demonstrates Kiro CLI's ability to create a TODO list for tracking the implementation of multi-step processes, like user authentication. ```text > Help me implement user authentication I'll break this down into manageable steps: 🛠️ Using tool: todo ● TODO: User Authentication Implementation [ ] Set up authentication library [ ] Create user model and database schema [ ] Implement registration endpoint [ ] Implement login endpoint [ ] Add password hashing [ ] Create JWT token generation [ ] Add authentication middleware [ ] Write tests for auth flow ``` -------------------------------- ### Example: API Caching Recommendation (With Thinking Tool) Source: https://kiro.dev/docs/cli/experimental/thinking Demonstrates how the thinking tool breaks down the process of recommending an API caching solution. It shows Kiro's step-by-step analysis, including data considerations, solution evaluation, and final recommendation. ```text > What's the best way to implement caching for our API? 🧠 Thinking... Let me think through the caching requirements: 1. First, I need to consider the type of data being cached - API responses suggest read-heavy workload - Need to handle cache invalidation 2. Evaluating caching solutions: - In-memory (fast but limited by RAM) - Redis (distributed, persistent, feature-rich) - Memcached (simple, fast, but less features) 3. Considering your use case: - API responses benefit from distributed cache - Need TTL support for automatic expiration - May need cache invalidation on updates 4. Redis appears best because: - Supports complex data structures - Built-in TTL and eviction policies - Can be distributed across nodes - Persistent if needed Based on this analysis, I recommend using Redis for caching your API responses... ``` -------------------------------- ### Initiate Plan with Prompt Source: https://kiro.dev/docs/cli/chat/planning-agent You can directly provide a prompt to the Plan agent when activating it, specifying the project you want to build. ```bash > /plan Build a REST API for user authentication ``` -------------------------------- ### Start New Chat Source: https://kiro.dev/docs/cli/chat/session-management Starts a fresh conversation. The current session is automatically saved. ```bash /chat new ``` -------------------------------- ### Start New Chat with Initial Prompt Source: https://kiro.dev/docs/cli/chat/session-management Starts a new conversation with a specific initial prompt. ```bash /chat new how do I set up a React project ``` -------------------------------- ### Example Kiro Steering File Source: https://kiro.dev/docs/cli/quick-start Create a project.md steering file within the .kiro/steering directory to define project context, conventions, and preferences for Kiro CLI. ```markdown # Project Context - This is a TypeScript project using Next.js 15 - Use pnpm for package management - Follow the existing code style (Prettier + ESLint) - Write tests with Vitest - Prefer functional components with hooks ``` -------------------------------- ### Add Knowledge Entry Examples Source: https://kiro.dev/docs/cli/experimental/knowledge-management Illustrates various ways to add knowledge entries using different parameter combinations and index types. ```bash /knowledge add --name "project-docs" --path /path/to/documentation ``` ```bash /knowledge add -n "config-files" -p /path/to/config.json ``` ```bash /knowledge add --name "fast-search" --path /path/to/logs --index-type Fast ``` ```bash /knowledge add -n "semantic-search" -p /path/to/docs --index-type Best ``` -------------------------------- ### Comparing Approaches - List Checkpoints Source: https://kiro.dev/docs/cli/experimental/checkpointing Shows how to list checkpoints after implementing two different features to prepare for comparison. ```bash /checkpoint list ``` -------------------------------- ### Install Python 3.10 with uv Source: https://kiro.dev/docs/cli/mcp/examples Installs Python version 3.10 or newer using the 'uv' package manager. ```bash uv python install 3.10 ``` -------------------------------- ### Create and Use a Basic File-Based Prompt Source: https://kiro.dev/docs/cli/chat/manage-prompts Demonstrates how to create a simple prompt named 'code-review' with specific content and then invoke it. File-based prompts do not support arguments. ```bash # Create a simple prompt without arguments /prompts create --name code-review --content "Please review this code for best practices, security issues, and potential improvements:" # Use the prompt (no arguments supported for file-based prompts) @code-review ``` -------------------------------- ### Install uv on Windows PowerShell Source: https://kiro.dev/docs/cli/mcp/examples Installs the 'uv' package manager on Windows systems using a PowerShell command. ```powershell # On Windows PowerShell irm https://astral.sh/uv/install.ps1 | iex ``` -------------------------------- ### Create an agent configuration file Source: https://kiro.dev/docs/cli/chat/help-agent The Help Agent can create agent configuration files in the .kiro/agents/ directory. This example shows how to create an agent for writing tests. ```bash [help] > Create an agent for writing tests ✔ Created .kiro/agents/test-writer.yaml I've created a test-writing agent. Switch to it with: /agent swap test-writer ``` -------------------------------- ### Introspect Tool Usage Example Source: https://kiro.dev/docs/cli/reference/built-in-tools Example of the introspect tool automatically activating when querying Kiro CLI about its features. ```bash > How do I save conversations? Introspecting to get you the right information (using tool: introspect) - Completed in 0.68s > You can save conversations using `/chat save `: - `/chat save ~/conversation.json` - Save to a specific path Load saved conversations later with `/chat load `. ``` -------------------------------- ### Interactive Registry Server Selection Output Source: https://kiro.dev/docs/cli/mcp/registry Example output shown after running the '/mcp add' command, listing available servers from the organization's registry. ```text Select MCP server from registry: git-server (Git operations) github-server (GitHub integration) aws-tools (AWS operations) ``` -------------------------------- ### Create a Custom Agent Source: https://kiro.dev/docs/cli/quick-start Use the Guide agent to generate a new custom agent configuration file for specific workflows like code review. ```bash > /guide Create an agent for code review ``` -------------------------------- ### List All Available Settings Source: https://kiro.dev/docs/cli/reference/cli-commands Show all available Kiro CLI settings along with their descriptions. This helps in discovering configurable options. ```bash kiro-cli settings list --all ``` -------------------------------- ### Install Rust Analyzer Source: https://kiro.dev/docs/cli/code-intelligence Install the Rust analyzer component using rustup. This provides code intelligence for Rust projects. ```bash rustup component add rust-analyzer ``` -------------------------------- ### Get Codebase Overview Source: https://kiro.dev/docs/cli/code-intelligence Fetch a complete overview of any workspace. Specify a path to focus on a specific directory or use --silent for cleaner output. ```bash /code overview ``` ```bash /code overview ./src/components ``` ```bash /code overview --silent ``` -------------------------------- ### Verify Kiro CLI Installation Source: https://kiro.dev/docs/cli/autocomplete Check if Kiro CLI is installed correctly by verifying its version. This is a troubleshooting step if autocomplete is not working. ```bash kiro-cli --version ``` -------------------------------- ### Start a Basic Chat Session Source: https://kiro.dev/docs/cli/chat Initiates an interactive chat session with the Kiro CLI. This command starts the default chat experience. ```bash kiro-cli ``` -------------------------------- ### Install Solargraph for Ruby Source: https://kiro.dev/docs/cli/code-intelligence Install the Solargraph language server for Ruby using the gem command. This provides code intelligence for Ruby projects. ```bash gem install solargraph ``` -------------------------------- ### Install TypeScript Language Server Source: https://kiro.dev/docs/cli/code-intelligence Install the TypeScript language server and TypeScript globally using npm. This is required for TypeScript/JavaScript code intelligence. ```bash npm install -g typescript-language-server typescript ``` -------------------------------- ### Launch theme wizard Source: https://kiro.dev/docs/cli/chat/settings Opens the interactive theme customization wizard. ```bash /settings theme ``` -------------------------------- ### Start Chat Session with Specific Agent Source: https://kiro.dev/docs/cli/chat Starts an interactive chat session with a pre-defined agent. Use this to focus the AI on a specific role or task. ```bash kiro-cli --agent myagent ``` -------------------------------- ### Install Kiro CLI on Windows 11 Source: https://kiro.dev/docs/cli/installation Use this PowerShell command to install Kiro CLI on Windows 11. Ensure you are using Windows Terminal or PowerShell. ```powershell irm 'https://cli.kiro.dev/install.ps1' | iex ``` -------------------------------- ### Example: Architectural Decision (Microservices vs. Monolith) Source: https://kiro.dev/docs/cli/experimental/thinking Shows the thinking tool analyzing an architectural decision between microservices and a monolith. It outlines key considerations, advantages/disadvantages of each, and decision factors. ```text > Should we use microservices or a monolith for our new project? 🧠 Thinking... Let me analyze this architectural decision: 1. Project characteristics to consider: - Team size and structure - Expected scale and growth - Deployment requirements - Development velocity needs 2. Microservices advantages: - Independent scaling - Technology flexibility - Isolated failures - But: increased complexity, operational overhead 3. Monolith advantages: - Simpler deployment - Easier debugging - Lower operational cost - But: scaling limitations, tight coupling 4. Decision factors: - Small team → Monolith likely better - Unclear requirements → Start with monolith - Need rapid iteration → Monolith faster initially - Can refactor to microservices later if needed Based on this analysis... ``` -------------------------------- ### Install JDT Language Server for Java (macOS) Source: https://kiro.dev/docs/cli/code-intelligence Install the JDT language server for Java on macOS using Homebrew. For Linux, manual download and PATH configuration is required. ```bash # macOS brew install jdtls # Linux - download from https://download.eclipse.org/jdtls/snapshots/ # Extract and add to PATH ``` -------------------------------- ### Comparing Approaches - Diff Checkpoints Source: https://kiro.dev/docs/cli/experimental/checkpointing Demonstrates comparing two different implementations by using the diff command between their respective checkpoints. ```bash /checkpoint diff 1 2 ``` -------------------------------- ### Hook Event JSON Example Source: https://kiro.dev/docs/cli/hooks This is a general example of a hook event received via STDIN. It includes the hook event name, current working directory, and session ID. ```json { "hook_event_name": "agentSpawn", "cwd": "/current/working/directory", "session_id": "abc123-def456-789" } ``` -------------------------------- ### Start a New Chat Conversation Source: https://kiro.dev/docs/cli/chat Initiates a completely new chat conversation, saving the current session to the database. This is useful for starting a distinct topic without losing prior context. ```bash # Start a fresh conversation /chat new ``` -------------------------------- ### Combining Context from Files Source: https://kiro.dev/docs/cli/chat/file-references Integrate information from configuration files and source code files in a single query. ```bash > Using the config in @serverless.yml, update @src/lambda/index.ts ``` -------------------------------- ### Execute AWS CLI command Source: https://kiro.dev/docs/cli/reference/built-in-tools Example of invoking an AWS CLI command through the tool interface. ```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 ``` -------------------------------- ### Incorrect Boolean Value Example Source: https://kiro.dev/docs/cli/reference/settings Illustrates the incorrect usage of capitalized boolean values for settings. ```bash kiro-cli settings telemetry.enabled True # ✗ Wrong ``` -------------------------------- ### Correct Boolean Value Example Source: https://kiro.dev/docs/cli/reference/settings Demonstrates the correct lowercase usage of boolean values for settings. ```bash kiro-cli settings telemetry.enabled true # ✓ Correct ``` -------------------------------- ### Resuming Previous Work Example Source: https://kiro.dev/docs/cli/experimental/todo-lists Illustrates the process of resuming a TODO list. It shows the interactive selection menu and Kiro's response upon resuming a specific task, indicating progress. ```text > /todo resume ? Select a to-do list to resume: › ❯ ✗ User Authentication Implementation (3/8) ✗ Database Migration (1/6) ✔ Code Refactoring (5/5) # Select "User Authentication Implementation" ⟳ Resuming: User Authentication Implementation Let's continue with the authentication implementation. We've completed the first 3 tasks. Next up is implementing the login endpoint... ``` -------------------------------- ### Open settings file Source: https://kiro.dev/docs/cli/chat/effort Use the CLI to open the configuration file in your default editor. ```bash kiro-cli settings open ``` -------------------------------- ### Get a Specific Setting Source: https://kiro.dev/docs/cli/reference/cli-commands Retrieve the value of a particular Kiro CLI setting by specifying its key. ```bash kiro-cli settings telemetry.enabled ``` -------------------------------- ### Create Agent from Template Source: https://kiro.dev/docs/cli/custom-agents/creating Create a new agent based on an existing agent's configuration by using the `--from` flag with the `/agent create` command. ```text > /agent create my-agent --from backend-specialist ```