Consolidate CLI commands to reduce top-level surface area
- migrate-* commands → subcommands of `bd migrate` - relate/unrelate → subcommands of `bd dep` - daemons subcommands → available under `bd daemon` - comment alias → hidden with deprecation warning All old commands still work with deprecation warnings for backwards compatibility. Reduces visible top-level commands from ~73 to 66. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,8 +23,7 @@ import (
|
||||
|
||||
// TODO: Consider integrating into 'bd doctor' migration detection
|
||||
var migrateHashIDsCmd = &cobra.Command{
|
||||
Use: "migrate-hash-ids",
|
||||
GroupID: "maint",
|
||||
Use: "hash-ids",
|
||||
Short: "Migrate sequential IDs to hash-based IDs (legacy)",
|
||||
Long: `Migrate database from sequential IDs (bd-1, bd-2) to hash-based IDs (bd-a3f8e9a2).
|
||||
|
||||
@@ -425,5 +424,12 @@ func copyFile(src, dst string) error {
|
||||
|
||||
func init() {
|
||||
migrateHashIDsCmd.Flags().Bool("dry-run", false, "Show what would be done without making changes")
|
||||
rootCmd.AddCommand(migrateHashIDsCmd)
|
||||
migrateCmd.AddCommand(migrateHashIDsCmd)
|
||||
|
||||
// Backwards compatibility alias at root level (hidden)
|
||||
migrateHashIDsAliasCmd := *migrateHashIDsCmd
|
||||
migrateHashIDsAliasCmd.Use = "migrate-hash-ids"
|
||||
migrateHashIDsAliasCmd.Hidden = true
|
||||
migrateHashIDsAliasCmd.Deprecated = "use 'bd migrate hash-ids' instead"
|
||||
rootCmd.AddCommand(&migrateHashIDsAliasCmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user