CLI: Add cluster operations and management commands #98

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-09-16 18:09:09 +02:00
parent 5db044284b
commit dbf1650c1c
24 changed files with 1862 additions and 48 deletions

View File

@@ -0,0 +1,31 @@
package commands
import (
"github.com/urfave/cli/v2"
)
// JsonFlag enables machine-readable JSON output for cluster commands.
var JsonFlag = &cli.BoolFlag{
Name: "json",
Usage: "print machine-readable JSON",
}
// OffsetFlag for pagination offset (>= 0).
var OffsetFlag = &cli.IntFlag{
Name: "offset",
Usage: "result `OFFSET` (>= 0)",
Value: 0,
}
// ClusterCommands configures the cluster command group and subcommands.
var ClusterCommands = &cli.Command{
Name: "cluster",
Usage: "Cluster operations and management (portal, nodes)",
Subcommands: []*cli.Command{
ClusterSummaryCommand,
ClusterHealthCommand,
ClusterNodesCommands,
ClusterRegisterCommand,
ClusterThemePullCommand,
},
}