feat(cli): add configuration and hooks management commands
- Add --config flag to show current configuration and search paths - Add --create-config flag to generate example .shush.toml files - Add hook management flags: --install-hook, --uninstall-hook, --list-hooks, --hook-status - Implement cross-scope conflict detection with clear error messages - Add -s flag for hook scope selection (user-wide vs project-specific)
This commit is contained in:
+19
-12
@@ -3,18 +3,25 @@ package types
|
||||
import "github.com/alecthomas/kong"
|
||||
|
||||
type CLI struct {
|
||||
Path string `arg:"" name:"path" help:"Source code file or directory to process" optional:""`
|
||||
Inline bool `help:"Remove only line comments"`
|
||||
Block bool `help:"Remove only block comments"`
|
||||
Recursive bool `short:"r" help:"Process directories recursively"`
|
||||
DryRun bool `help:"Show what would be removed without making changes"`
|
||||
Backup bool `help:"Create backup files before modification"`
|
||||
Verbose bool `help:"Show detailed output"`
|
||||
LLM bool `help:"Show LLM-friendly usage guide"`
|
||||
ChangesOnly bool `help:"Remove comments only from git changes (staged + unstaged + untracked)"`
|
||||
Staged bool `help:"Remove comments only from staged git changes"`
|
||||
Unstaged bool `help:"Remove comments only from unstaged git changes"`
|
||||
Version kong.VersionFlag `help:"Show version information"`
|
||||
Path string `arg:"" name:"path" help:"Source code file or directory to process" optional:""`
|
||||
Inline bool `help:"Remove only line comments"`
|
||||
Block bool `help:"Remove only block comments"`
|
||||
Recursive bool `short:"r" help:"Process directories recursively"`
|
||||
DryRun bool `help:"Show what would be removed without making changes"`
|
||||
Backup bool `help:"Create backup files before modification"`
|
||||
Verbose bool `help:"Show detailed output"`
|
||||
LLM bool `help:"Show LLM-friendly usage guide"`
|
||||
ChangesOnly bool `help:"Remove comments only from git changes (staged + unstaged + untracked)"`
|
||||
Staged bool `help:"Remove comments only from staged git changes"`
|
||||
Unstaged bool `help:"Remove comments only from unstaged git changes"`
|
||||
InstallHook bool `help:"Install Claude Code hooks for automatic comment cleanup"`
|
||||
UninstallHook bool `help:"Uninstall Claude Code hooks"`
|
||||
ListHooks bool `help:"List current Claude Code hooks configuration"`
|
||||
HookStatus bool `help:"Check if shush hooks are installed"`
|
||||
HookScope string `short:"s" help:"Hook scope: 'project' for local, default for user-wide"`
|
||||
Config bool `help:"Show current configuration and location"`
|
||||
CreateConfig bool `help:"Create example .shush.toml configuration file"`
|
||||
Version kong.VersionFlag `help:"Show version information"`
|
||||
}
|
||||
|
||||
type Language struct {
|
||||
|
||||
Reference in New Issue
Block a user