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
Contributor
There was a problem hiding this comment.
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 <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.