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

@@ -13,9 +13,8 @@ import (
)
var relateCmd = &cobra.Command{
Use: "relate <id1> <id2>",
GroupID: "deps",
Short: "Create a bidirectional relates_to link between issues",
Use: "relate <id1> <id2>",
Short: "Create a bidirectional relates_to link between issues",
Long: `Create a loose 'see also' relationship between two issues.
The relates_to link is bidirectional - both issues will reference each other.
@@ -29,9 +28,8 @@ Examples:
}
var unrelateCmd = &cobra.Command{
Use: "unrelate <id1> <id2>",
GroupID: "deps",
Short: "Remove a relates_to link between issues",
Use: "unrelate <id1> <id2>",
Short: "Remove a relates_to link between issues",
Long: `Remove a relates_to relationship between two issues.
Removes the link in both directions.
@@ -43,8 +41,20 @@ Example:
}
func init() {
rootCmd.AddCommand(relateCmd)
rootCmd.AddCommand(unrelateCmd)
// Add as subcommands of dep
depCmd.AddCommand(relateCmd)
depCmd.AddCommand(unrelateCmd)
// Backwards compatibility aliases at root level (hidden)
relateAliasCmd := *relateCmd
relateAliasCmd.Hidden = true
relateAliasCmd.Deprecated = "use 'bd dep relate' instead"
rootCmd.AddCommand(&relateAliasCmd)
unrelateAliasCmd := *unrelateCmd
unrelateAliasCmd.Hidden = true
unrelateAliasCmd.Deprecated = "use 'bd dep unrelate' instead"
rootCmd.AddCommand(&unrelateAliasCmd)
}
func runRelate(cmd *cobra.Command, args []string) error {