Bootstrap empty git repositories for Kiro development
npm install kirogenBootstrap empty git repositories for Kiro development.
Kirogen is a lightweight CLI tool that initializes the necessary directory structure for Kiro-based development workflows. Run it once in your git repository to set up the .kiro/steering and .kiro/hooks directories.
No installation required! Use npx to run it directly:
``bash`
npx kirogen
Navigate to your git repository and run:
`bash`
npx kirogen
This will create:
- .kiro/steering/ - Directory for workflow guidance files.kiro/hooks/
- - Directory for agent hook configurations.kirogenrc.mjs
- - Configuration file for your Kiro environment
`bash`
$ cd my-project
$ npx kirogen
Initializing Kiro development environment...
✓ Created .kiro/steering directory
✓ Created .kiro/hooks directory
✓ Created .kirogenrc.mjs configuration file
✓ Kiro development environment initialized successfully!
You can automatically download steering files from a GitHub repository:
`bash`
npx kirogen --steering-from=DeepSRT/kiro-assets/dotkiro/steering
This will:
1. Create the .kiro directory structure*.global.md
2. Download all files from the specified GitHub path.kiro/steering/
3. Save them to your local directory
URL Formats:
- Shorthand (defaults to main branch): owner/repo/pathowner/repo/tree/branch/path
- Full format with branch:
Equivalent URLs:
- DeepSRT/kiro-assets/dotkiro/steering (shorthand)DeepSRT/kiro-assets/tree/main/dotkiro/steering
- (full)
- Both point to: https://github.com/DeepSRT/kiro-assets/tree/main/dotkiro/steering
`bash`
$ npx kirogen --steering-from=DeepSRT/kiro-assets/dotkiro/steering
Initializing Kiro development environment...
✓ Created .kiro/steering directory
✓ Created .kiro/hooks directory
Downloading steering files from DeepSRT/kiro-assets/dotkiro/steering...
✓ Downloaded 3 steering files
✓ Created .kirogenrc.mjs configuration file
✓ Kiro development environment initialized successfully!
Kirogen creates a .kirogenrc.mjs configuration file in your project root. This file stores your Kiro environment settings:
`javascript
/**
* Kirogen Configuration
*
* This file defines the configuration for your Kiro development environment.
*/
export default {
"steeringFrom": "DeepSRT/kiro-assets/dotkiro/steering",
"directories": {
"steering": ".kiro/steering",
"hooks": ".kiro/hooks"
}
};
`
You can manually edit this file to customize your Kiro environment settings.
If you've initialized your project with --steering-from, you can re-download the latest steering files at any time:
`bash`
npx kirogen sync
This command:
1. Reads the steeringFrom URL from your .kirogenrc.mjs*.global.md
2. Downloads the latest files from that GitHub location.kiro/steering/
3. Overwrites your local files with the latest versions
Example:
`bash`
$ npx kirogen sync
Syncing steering files from DeepSRT/kiro-assets/dotkiro/steering...
✓ Downloaded 3 steering files
✓ Steering files synced successfully!
This is useful when:
- The remote steering files have been updated
- You want to refresh your local steering files
- You've accidentally modified or deleted steering files
bash
npx kirogen [--steering-from=]
`
Initializes the Kiro development environment.$3
`bash
npx kirogen sync
`
Re-downloads steering files from the configured remote source.Requirements
- Node.js >= 14.0.0
Features
- Zero installation - Run directly with
npx
- Idempotent - Safe to run multiple times
- Fast - Completes in milliseconds
- Clear feedback - Visual indicators for success and errorsError Handling
Kirogen validates your environment before making changes:
- Not a git repository: Exits with code 1 if
.git directory is not found
- Permission errors: Exits with code 2 if unable to create directories
- Unexpected errors: Exits with code 3 for other failuresDevelopment
$3
`bash
npm test
`$3
`
kirogen/
├── bin/
│ └── kirogen.js # CLI entry point
├── lib/
│ ├── bootstrap.js # Directory creation logic
│ ├── logger.js # Console output utilities
│ └── validator.js # Git repository validation
└── test/
└── unit/ # Unit tests
``MIT