All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Enhanced
mergeOptions
function to accept a callback that runs after loading higher priority options, improving pre-script execution timing
- Improved Templates documentation in README.md with clearer explanations and examples of how to use templates with commits.denyhs.com
- Powerful Template System: New template-based commit message generation
- Interactive template selection with
--withTemplates
flag - Direct template usage with
--templateName
flag - Support for template variables with interactive prompts
- Template configuration in
.cortexrc
file
- Interactive template selection with
You can create new templates on https://commits.denyhs.com/templates
- New
--preScript
flag to execute commands (like linting or tests) before generating the commit message
- Improved handling of binary files (SVGs, images, videos, etc.) in diffs to prevent excessive token usage
- Modified how binary files are reported in diffs to only show their status (added/modified/deleted) without content
- Changed when the message is saved in the app
- Renamed
stageChanges
tostageAllChanges
for better clarity - Renamed
commitAndPush
tocommitAndPushStaged
for consistency with other staged-related flags - Removed support for different change scopes (
--onlyStaged
,--onlyUnstaged
,--all
flags)
- Validation for configuration options in
.cortexrc
file - now throws an error if unknown options are found
- Log usage message from API
- enhances diff accuracy by ignoring unnecessary whitespace and blank lines, improving the quality of commit messages.
- Fixed command version by getting it from package.json
- Showing commit link only if shouldPush is true
- Fixed boolean CLI options handling to properly accept true/false values
- Improved configuration merging to correctly prioritize CLI boolean options over config file
- Added proper type definitions for boolean flags in Commander.js options
- New
.cortexrc
configuration file support for setting default options - Pattern-based file filtering with
--include
and--exclude
options - Support for glob patterns in file inclusion/exclusion
- Renamed
--stageAll
flag to--stageChanges
for clarity - Staging behavior now supports selective file inclusion/exclusion
- Improved error handling and user feedback for file staging
- The
--stageAll
flag has been replaced with--stageChanges
- Staging behavior now requires explicit patterns when using include/exclude options
- Updated default API hostname from localhost to production URL (https://commit-messages-production-denihs.svc-us5.zcloud.ws)
- New
--stageAll
flag to automatically stage all changes before generating the commit message
- Initial release of the Cortex CLI tool
- Core command
cortex commit-message
to generate commit messages - Support for different change scopes:
- Staged changes (default)
- Unstaged changes via
--onlyUnstaged
- All changes via
--all
- Custom commit message header support via
--header
option - Automatic clipboard integration for generated messages
- Git integration features:
- Automatic commit via
--commitStaged
- Automatic commit and push via
--commitAndPush
- Automatic commit via
- Environment configuration:
- Support for API token via environment variable
- Support for
.env
file configuration
- Validation features:
- Git repository validation
- Environment variable validation
- Changes validation (staged/unstaged)
- Error handling and user feedback:
- Colored console output
- Clear error messages
- Operation status feedback
- chalk: ^5.3.0 - For colored console output
- clipboardy: ^4.0.0 - For clipboard integration
- commander: ^11.1.0 - For CLI argument parsing
- dotenv: ^16.3.1 - For environment variable management
- simple-git: ^3.22.0 - For git operations