CLI Reference
Complete reference for the
ck
command-line tool.
Installation
uv tool install claude-kiro
pip install claude-kiro
Core Commands
ck init
Initialize a Claude Kiro project in the current directory.
ck init [OPTIONS]
Options
-
--force- Overwrite existing files if they already exist
What It Does
Creates the following structure in your project:
.claude/
├── commands/spec/
│ ├── create.md
│ ├── implement.md
│ └── review.md
├── output-styles/
│ └── spec-driven.md
├── specs/
│ └── (your specs will go here)
└── CLAUDE.md
Example
# Initialize in current project
ck init
# Force overwrite existing configuration
ck init --force
Output
✅ Created .claude directory
✅ Installed slash commands
✅ Configured spec-driven output style
✅ Created specs directory
✅ Generated CLAUDE.md
🎉 Claude Kiro initialized! Run 'ck doctor' to verify.
ck doctor
Validate your Claude Kiro setup and check for issues.
ck doctor
What It Checks
-
Claude Code configuration exists (
.claude/directory) - All required directories are present
- Slash commands are properly configured
- Output style is active
- Spec directory structure is valid
Example
ck doctor
Output
🏥 Running Claude Kiro health check...
✅ .claude directory exists
✅ Slash commands configured
✅ Output style active
✅ Specs directory present
✅ CLAUDE.md found
✨ Everything looks good!
Hook Commands
The
ck hook
command group helps you manage custom hooks for integrating Claude
Code with your Claude Kiro specs.
ck hook list
List all available hook modules in the Claude Kiro package.
ck hook list
Output
📦 Available Hook Modules:
spec_task_context
- Inject spec context for implementation tasks
Location: claude_kiro.hooks.spec_task_context
Use 'ck hook config' to generate settings.json configuration.
ck hook status
Show which hooks are currently configured in your project.
ck hook status
Output
📋 Hook Status (.claude/settings.local.json):
✅ spec_task_context
Events: post-tool-use (Write, Edit, MultiEdit)
Module: claude_kiro.hooks.spec_task_context:post_tool_use_hook
ck hook test
Test a hook with sample or real data.
ck hook test <name> [json_file]
Arguments
-
name- Hook name (e.g.,spec_task_context) -
json_file- Optional path to JSON file with test data
Examples
# Test with sample data
ck hook test spec_task_context
# Test with real tool event
ck hook test spec_task_context /path/to/tool-event.json
Output
🧪 Testing hook: spec_task_context
Using sample data for: Write
📤 Hook Response:
{
"message": "📋 **Spec Task Context: example-spec**\n\nYou are working on Task 1: Example task\n..."
}
✅ Hook executed successfully!
ck hook config
Generate settings.json snippet for configuring hooks.
ck hook config
Output
📋 Add this to your .claude/settings.local.json:
{
"hooks": {
"post-tool-use": [
{
"module": "claude_kiro.hooks.spec_task_context",
"function": "post_tool_use_hook",
"tools": ["Write", "Edit", "MultiEdit"]
}
]
}
}
Command Reference Summary
| Command | Description |
|---|---|
ck init |
Initialize Claude Kiro in your project |
ck doctor |
Validate setup and check for issues |
ck hook list
|
List available hook modules |
ck hook status
|
Show configured hooks |
ck hook test
|
Test a hook with sample data |
ck hook config
|
Generate hook configuration |