Skip to content

GC CLI Tool with Authentication #247

@bupd

Description

@bupd

Context

Ground Control needs a CLI tool for administrators to manage satellites, groups, and configs without using the REST API directly.

Current State

  • GC only accessible via REST API
  • No official CLI tool
  • Users must use curl or write custom scripts

Expected Behavior

CLI binary gcctl with:

  • gcctl login - authenticate and store session
  • gcctl logout - clear session
  • gcctl whoami - show current user

Config stored at ~/.gcctl/config.yaml:

server: https://gc.example.com
token: <session-token>

Features:

  • Tab completion (bash/zsh)
  • Multiple output formats (table, json, yaml)
  • Config file for default server

Value

  • Easier administration
  • Scriptable operations
  • Better developer experience

Changes to be Made

  • Create CLI skeleton with cobra
  • Implement login command
  • Implement logout command
  • Implement whoami command
  • Config file management
  • Tab completion generation
Files to Create
  • ground-control/cmd/gcctl/main.go
  • ground-control/cmd/gcctl/auth.go
  • ground-control/cmd/gcctl/config.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Next

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions