-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Add essential global CLI options to improve user experience, configuration flexibility, and output formatting capabilities.
Proposed Options
--config, -c Path to config file (default: .globstar/.config.yml)
--verbose, -v Enable verbose output
--no-color Disable colored output
--format, -f Output format (json, yaml, text) (default: text)
--version Print version information
Implementation Details
Configuration File Path
- Add flag parsing for
--config/-c - Implement config file loading logic with YAML parsing
- Add fallback to default path if not specified
- Handle invalid config file gracefully with meaningful error messages
Verbose Output
- Implement verbose logging system
- Add debug information about:
- Checker loading and initialization
- Configuration details
- File processing information
Color Control
- Implement color detection for terminals
- Add color disable flag
- Ensure CI/CD compatibility
- Consider auto-detection of NO_COLOR environment variable
Output Formatting
- Implement formatters for each output type:
- JSON: Structured output for programmatic consumption
- YAML: Human-readable structured output
- Text: Default human-readable format
- Ensure consistent schema across formats
- Add output validation
Version Information
- Add version flag handler
- Display:
- Globstar version
- Git commit hash
- Go version used for build
Acceptance Criteria
- All flags work as specified when used individually
- Flags work correctly in combination
- Meaningful error messages for invalid usage
- Documentation updated to reflect new options
- Tests added for new functionality
- CI pipeline updated to test new options
Notes
Leverage urfave/cli's built-in features:
- Command categorization
- Shell completion
- Default help texts
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed