cmd

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(args []string) (err error)

func VersionString

func VersionString() string

Types

type AuthCmd

type AuthCmd struct {
	SetKey AuthSetKeyCmd `cmd:"" help:"Set API key (uses --stdin by default)"`
	Status AuthStatusCmd `cmd:"" help:"Show authentication status"`
	Remove AuthRemoveCmd `cmd:"" help:"Remove stored credentials"`
}

type AuthRemoveCmd

type AuthRemoveCmd struct{}

func (*AuthRemoveCmd) Run

func (cmd *AuthRemoveCmd) Run(ctx context.Context) error

type AuthSetKeyCmd

type AuthSetKeyCmd struct {
	Stdin bool   `help:"Read API key from stdin (default: true)" default:"true"`
	Key   string `arg:"" optional:"" help:"API key (discouraged; exposes in shell history)"`
}

func (*AuthSetKeyCmd) Run

func (cmd *AuthSetKeyCmd) Run(ctx context.Context) error

type AuthStatusCmd

type AuthStatusCmd struct{}

func (*AuthStatusCmd) Run

func (cmd *AuthStatusCmd) Run(ctx context.Context) error

type CLI

type CLI struct {
	RootFlags `embed:""`

	Version    kong.VersionFlag `help:"Print version and exit"`
	Auth       AuthCmd          `cmd:"" help:"Auth and credentials"`
	Locations  LocationsCmd     `cmd:"" help:"Location search operations"`
	Rankings   RankingsCmd      `cmd:"" help:"Ranking check operations"`
	VersionCmd VersionCmd       `cmd:"" name:"version" help:"Print version"`
}

type ExitError

type ExitError struct {
	Code int
	Err  error
}

ExitError wraps an error with an exit code.

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

type LocationsCmd

type LocationsCmd struct {
	Search LocationsSearchCmd `cmd:"" help:"Search for locations"`
}

type LocationsSearchCmd

type LocationsSearchCmd struct {
	Query   string `required:"" help:"Search query (e.g. 'Columbia, MO')"`
	Country string `help:"Country code (e.g. USA, GBR)" default:"USA"`
	Limit   int    `help:"Maximum number of results" default:"10"`
}

func (*LocationsSearchCmd) Run

func (cmd *LocationsSearchCmd) Run(ctx context.Context) error

type RankingsCheckCmd

type RankingsCheckCmd struct {
	Business string `required:"" help:"Business name"`
	Location string `required:"" help:"Location (e.g. 'Columbia, MO')"`
	Terms    string `required:"" help:"Comma-separated search terms"`
}

func (*RankingsCheckCmd) Run

func (cmd *RankingsCheckCmd) Run(ctx context.Context) error

type RankingsCmd

type RankingsCmd struct {
	Check RankingsCheckCmd `cmd:"" help:"Check rankings for a business"`
	Get   RankingsGetCmd   `cmd:"" help:"Get rankings results by request ID"`
}

type RankingsGetCmd

type RankingsGetCmd struct {
	RequestID string `arg:"" required:"" help:"Request ID (UUID)"`
}

func (*RankingsGetCmd) Run

func (cmd *RankingsGetCmd) Run(ctx context.Context) error

type RootFlags

type RootFlags struct {
	Color   string `help:"Color output: auto|always|never" default:"${color}"`
	JSON    bool   `help:"Output JSON to stdout (best for scripting)" default:"${json}"`
	Plain   bool   `help:"Output stable, parseable text to stdout (TSV; no colors)" default:"${plain}"`
	Force   bool   `help:"Skip confirmations for destructive commands"`
	NoInput bool   `help:"Never prompt; fail instead (useful for CI)"`
	Verbose bool   `help:"Enable verbose logging"`
}

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (cmd *VersionCmd) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL