This document provides detailed migration guidance for updating from the old q command to the new kiro-cli command structure.
The git-qcommit project has been updated to use the new kiro-cli command structure. This migration ensures compatibility with the latest AI-powered CLI tools and provides a more explicit, maintainable command interface.
| Aspect | Old (q command) |
New (kiro-cli) |
|---|---|---|
| Base Command | q chat |
kiro-cli chat |
| Auto-approve Flag | -a |
--no-interactive --trust-all-tools |
| Input Method | Piped stdin | Piped stdin (unchanged) |
| Output | Stdout | Stdout (unchanged) |
Before:
echo -e "..." | q chat -aAfter:
echo -e "..." | kiro-cli chat --no-interactive --trust-all-toolsBefore:
# git-qcommit: Git plugin to generate commit messages using Amazon QAfter:
# git-qcommit: Git plugin to generate commit messages using kiro-cliThe new --no-interactive and --trust-all-tools flags are more explicit than the cryptic -a flag, making the code:
- More readable and self-documenting
- Easier to understand for new contributors
- More maintainable in the long term
The kiro-cli command structure is the official, supported interface going forward. Migrating ensures:
- Long-term compatibility
- Access to new features
- Continued support and updates
The kiro-cli naming makes it clear that this is a separate CLI tool, not tied to any specific cloud provider's branding.
Follow the official installation instructions for kiro-cli. The tool should be available in your PATH.
kiro-cli --versionReplace your existing git-qcommit script with the new version from this repository.
Stage some changes and run:
git qcommitIf successful, you should see the same behavior as before.
The user-facing interface remains 100% unchanged:
- Same command:
git qcommit [prompt_name|prompt] - Same behavior: generates commit messages based on staged changes
- Same prompt styles: all existing prompts continue to work
- Same workflow: interactive confirmation before committing
If you have:
- Custom scripts that directly call the old
qcommand - Automation that depends on the
qbinary
You'll need to update those separately to use kiro-cli.
While git-qcommit maintains its simple interface, kiro-cli offers additional features you might want to explore:
kiro-cli chat --resumekiro-cli chat --agent <agent-name> "Your question"kiro-cli chat "Your question"Solution: Install kiro-cli and ensure it's in your PATH:
which kiro-cliSolution: Verify that --no-interactive --trust-all-tools produces the same behavior as -a:
# Test with a simple command
echo "Hello" | kiro-cli chat --no-interactive --trust-all-toolsSolution: Ensure kiro-cli is properly configured:
kiro-cli chat "test"If this works interactively, the non-interactive mode should work too.
If you're migrating other scripts or tools, here's the flag mapping:
| Old Flag | New Flag(s) | Purpose |
|---|---|---|
-a |
--no-interactive --trust-all-tools |
Auto-approve/non-interactive mode |
| (none) | --resume |
Resume previous session (new feature) |
| (none) | --agent <name> |
Use specific agent (new feature) |
If you encounter any issues during migration:
- Check that kiro-cli is properly installed:
kiro-cli --version - Verify the script syntax:
bash -n git-qcommit - Test with a simple staging and commit scenario
- Review the kiro-cli documentation for additional options
The migration maintains backward compatibility in terms of user interface, but provides a foundation for future enhancements:
- Potential to add agent selection to git-qcommit
- Option to resume previous commit message generation sessions
- Integration with other kiro-cli features
These enhancements can be added without breaking existing functionality.