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:
Steve Yegge
2025-12-28 13:52:21 -08:00
parent 5ccf12ea57
commit 135802f1aa
8 changed files with 86 additions and 138 deletions

View File

@@ -15,8 +15,7 @@ import (
// TODO: Consider integrating into 'bd doctor' migration detection
var migrateSyncCmd = &cobra.Command{
Use: "migrate-sync <branch-name>",
GroupID: "maint",
Use: "sync <branch-name>",
Short: "Migrate to sync.branch workflow for multi-clone setups",
Long: `Migrate to using a dedicated sync branch for beads data.
@@ -60,7 +59,14 @@ Examples:
func init() {
migrateSyncCmd.Flags().Bool("dry-run", false, "Preview migration without making changes")
migrateSyncCmd.Flags().Bool("force", false, "Force migration even if already configured")
rootCmd.AddCommand(migrateSyncCmd)
migrateCmd.AddCommand(migrateSyncCmd)
// Backwards compatibility alias at root level (hidden)
migrateSyncAliasCmd := *migrateSyncCmd
migrateSyncAliasCmd.Use = "migrate-sync"
migrateSyncAliasCmd.Hidden = true
migrateSyncAliasCmd.Deprecated = "use 'bd migrate sync' instead"
rootCmd.AddCommand(&migrateSyncAliasCmd)
}
func runMigrateSync(ctx context.Context, branchName string, dryRun, force bool) error {