-
Notifications
You must be signed in to change notification settings - Fork 0
Support custom command #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add check custom command - Use enum instead of String - Edit mode improve - Add additional logs
- Add additional validation and checks - Reduced the allowed values and ranges
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive custom commands support to the Alex CLI tool, allowing users to define and automate complex workflows through YAML configuration. The feature introduces 24 different action types including command execution, file operations, git checks, and archive management.
Key changes:
- Custom command system with YAML-based configuration (
alex_custom_commands.yaml) - Command management interface:
list,add,show,edit,remove,checksubcommands - 24 action types supporting shell commands, alex commands, Dart scripts, file/directory operations, git operations, platform checks, and archive operations
- Variable substitution system using
{{var}}or${var}syntax - Security features including path validation, regex timeout detection, and file size limits
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Version bump to 1.10.0 |
| lib/src/version.dart | Updated package version constant to 1.10.0 |
| lib/src/custom_commands/custom_command_executor.dart | Core executor with 24 action types and security validations |
| lib/src/custom_commands/custom_command_config.dart | YAML configuration loading and management |
| lib/src/custom_commands/custom_command_action.dart | Action type definitions and YAML serialization |
| lib/src/custom_commands/custom_command_argument.dart | Argument type definitions (options and flags) |
| lib/runner/alex_command_runner.dart | Integration of custom commands into main runner |
| lib/commands/custom/*.dart | Command management interface (7 command files) |
| alex_custom_commands.yaml.example | Comprehensive example configuration with 15 examples |
| README.md | Documentation for custom commands feature |
| CHANGELOG.md | Release notes for version 1.10.0 |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
No description provided.