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 AuditsCmd

type AuditsCmd struct {
	List   AuditsListCmd   `cmd:"" help:"List all audits"`
	Create AuditsCreateCmd `cmd:"" help:"Create a new audit for a URL"`
}

type AuditsCreateCmd

type AuditsCreateCmd struct {
	URL string `arg:"" required:"" help:"URL to audit"`
}

func (*AuditsCreateCmd) Run

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

type AuditsListCmd

type AuditsListCmd struct{}

func (*AuditsListCmd) Run

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

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"`
	Editors    EditorsCmd       `cmd:"" help:"Content Editor operations"`
	Audits     AuditsCmd        `cmd:"" help:"Audit operations"`
	VersionCmd VersionCmd       `cmd:"" name:"version" help:"Print version"`
}

type EditorsCmd

type EditorsCmd struct {
	List   EditorsListCmd   `cmd:"" help:"List all content editors"`
	Create EditorsCreateCmd `cmd:"" help:"Create a new content editor"`
	Get    EditorsGetCmd    `cmd:"" help:"Get a content editor by ID"`
	Score  EditorsScoreCmd  `cmd:"" help:"Get content score for an editor"`
}

type EditorsCreateCmd

type EditorsCreateCmd struct {
	Keywords string `required:"" help:"Comma-separated keywords"`
	Language string `help:"Language code (e.g., en, es, de)" default:"en"`
	Location string `help:"Location (e.g., United States)"`
	Device   string `help:"Device type (desktop or mobile)" default:"desktop"`
}

func (*EditorsCreateCmd) Run

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

type EditorsGetCmd

type EditorsGetCmd struct {
	ID string `arg:"" required:"" help:"Content editor ID"`
}

func (*EditorsGetCmd) Run

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

type EditorsListCmd

type EditorsListCmd struct {
	Page     int `help:"Page number" default:"1"`
	PageSize int `help:"Page size" default:"10"`
}

func (*EditorsListCmd) Run

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

type EditorsScoreCmd

type EditorsScoreCmd struct {
	ID string `arg:"" required:"" help:"Content editor ID"`
}

func (*EditorsScoreCmd) Run

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

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 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