feat: add bd admin parent command for cleanup/compact/reset (bd-3u8m)
Move cleanup, compact, and reset commands under `bd admin` namespace. Creates hidden aliases for backwards compatibility that show deprecation notice when used. - Create cmd/bd/admin.go with parent command - Create cmd/bd/admin_aliases.go for hidden backwards-compat aliases - Update cleanup.go, compact.go, reset.go to remove rootCmd.AddCommand - Update all documentation to use `bd admin <cmd>` syntax 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
26
cmd/bd/admin.go
Normal file
26
cmd/bd/admin.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var adminCmd = &cobra.Command{
|
||||
Use: "admin",
|
||||
GroupID: "advanced",
|
||||
Short: "Administrative commands for database maintenance",
|
||||
Long: `Administrative commands for beads database maintenance.
|
||||
|
||||
These commands are for advanced users and should be used carefully:
|
||||
cleanup Delete closed issues and prune expired tombstones
|
||||
compact Compact old closed issues to save space
|
||||
reset Remove all beads data and configuration
|
||||
|
||||
For routine operations, prefer 'bd doctor --fix'.`,
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(adminCmd)
|
||||
adminCmd.AddCommand(cleanupCmd)
|
||||
adminCmd.AddCommand(compactCmd)
|
||||
adminCmd.AddCommand(resetCmd)
|
||||
}
|
||||
Reference in New Issue
Block a user