homelab/services/games-console/cli/cmd/root.go
Dan V deb6c38d7b chore: commit homelab setup — deployment, services, orchestration, skill
- Add .gitignore: exclude compiled binaries, build artifacts, and Helm
  values files containing real secrets (authentik, prometheus)
- Add all Kubernetes deployment manifests (deployment/)
- Add services source code: ha-sync, device-inventory, games-console,
  paperclip, parts-inventory
- Add Ansible orchestration: playbooks, roles, inventory, cloud-init
- Add hardware specs, execution plans, scripts, HOMELAB.md
- Add skills/homelab/SKILL.md + skills/install.sh to preserve Copilot skill
- Remove previously-tracked inventory-cli binary from git index

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 08:10:32 +02:00

43 lines
1.1 KiB
Go

package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
"github.com/vandachevici/gconsole/cmd/servers"
"github.com/vandachevici/gconsole/config"
)
var rootCmd = &cobra.Command{
Use: "gconsole",
Short: "gconsole — manage game servers in your homelab",
Long: `gconsole is a CLI for managing game servers running on Kubernetes.
It connects to the games-console backend API to list, create, edit,
delete, and control (start/stop/restart) game servers.
Configuration is read from ~/.gconsole/config.yaml.
Override the API URL with --api-url or the GCONSOLE_API_URL env var.`,
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the gconsole version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("gconsole v1.0.0")
},
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
func init() {
rootCmd.PersistentFlags().String("api-url", "", "Games console API URL (overrides config file)")
rootCmd.AddCommand(versionCmd)
rootCmd.AddCommand(servers.NewServersCmd(config.GetAPIURL))
}