Kiro CLI Workflows
While this workshop focuses on Kiro IDE, Kiro CLI offers powerful capabilities for developers who prefer terminal-based workflows or need to integrate Kiro into automated pipelines.
Why Use the CLI?
Section titled “Why Use the CLI?”The CLI excels at running autonomous agent sessions — long-running tasks where Kiro works independently with minimal intervention:
- Complex refactoring across multiple files
- Codebase-wide migrations
- Extended debugging sessions
- Multi-step feature implementation
Integrate Kiro into your development pipelines:
- Automated code review on pull requests
- Pre-commit spec validation
- Documentation generation
- Test generation for new features
Script Kiro for repeatable tasks:
- Batch processing of code changes
- Standardised project setup
- Automated documentation updates
Getting Started with CLI
Section titled “Getting Started with CLI”-
Install Kiro CLI
Download from kiro.dev — the CLI is included with the IDE installation, or can be installed separately.
-
Authenticate
Terminal window kiro auth loginThis opens a browser for AWS Builder ID authentication.
-
Start a chat session
Terminal window kiro chatOpens an interactive chat session in your terminal.
-
Run autonomous tasks
Terminal window kiro agent "Refactor the authentication module to use JWT tokens"Starts an autonomous agent that works through the task independently.
Model Selection in CLI
Section titled “Model Selection in CLI”Just like the IDE, you can select models in the CLI:
# Use a specific modelkiro chat --model claude-opus-4
# Use open weight models for cost efficiencykiro chat --model qwen3-coder-nextCode Intelligence
Section titled “Code Intelligence”The CLI includes powerful code analysis features:
# Analyse codebase structurekiro analyze
# Generate documentationkiro docs generate
# Find related codekiro search "authentication flow"Learn more in the Code Intelligence documentation.
Combining IDE and CLI
Section titled “Combining IDE and CLI”A powerful workflow combines both tools:
- Plan in IDE — Use Spec mode to generate requirements and design
- Execute via CLI — Run autonomous agents for implementation
- Review in IDE — Use inline chat and checkpointing for refinement