root

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: LGPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PosthogAPIKey string
	SentryDsn     string
	AppVersion    string
)

These variables are overridden by ldflags during build. Example: go build -ldflags "-X github.com/argus-labs/world-engine/cli/commands/root.PosthogAPIKey=<POSTHOG_API_KEY> -X github.com/argus-labs/world-engine/cli/commands/root.SentryDsn=<SENTRY_DSN> -X github.com/argus-labs/world-engine/cli/commands/root.AppVersion=<VERSION>"

Functions

This section is empty.

Types

type BuildCmd

type BuildCmd struct {
	Debug bool   `default:"true" help:"Enable debug mode"                                                        negatable:""`
	Shard string `               help:"Build only the specified shard ID (defaults to all shards in world.toml)"`
}

BuildCmd builds Cardinal shard images without starting any containers. Hidden from `world -h` because it exists for deployment CI, not interactive use — `world start` is the supported user flow.

func (*BuildCmd) Run

func (c *BuildCmd) Run(ctx context.Context) error

type Cmd

type Cmd struct {
	Setup   *SetupCmd        `cmd:"" group:"Getting Started:"   help:"Setup a new World Engine project"`
	Docs    *DocsCmd         `cmd:"" group:"Getting Started:"   help:"Open the World CLI documentation"`
	Doctor  *DoctorCmd       `cmd:"" group:"Getting Started:"   help:"Check your development environment"`
	Start   *StartCmd        `cmd:"" group:"Cardinal Commands:" help:"Launch your Cardinal game environment"`
	Stop    *StopCmd         `cmd:"" group:"Cardinal Commands:" help:"Gracefully shut down your Cardinal game environment"`
	Purge   *PurgeCmd        `cmd:"" group:"Cardinal Commands:" help:"Reset your Cardinal game shard to a clean state by removing all data and containers"`
	Reload  *ReloadCmd       `cmd:"" group:"Cardinal Commands:" help:"Rebuild and roll Cardinal shards in the running cluster"`
	Logs    *LogsCmd         `cmd:"" group:"Cardinal Commands:" help:"View and tail logs for shards + platform components"`
	Debug   *debugger.Cmd    `` /* 137-byte string literal not displayed */
	SDK     *sdk.Cmd         `` /* 148-byte string literal not displayed */
	Build   *BuildCmd        `` /* 162-byte string literal not displayed */
	MCP     *mcp.Cmd         `` /* 162-byte string literal not displayed */
	Version kong.VersionFlag `` /* 152-byte string literal not displayed */
	Verbose bool             `` /* 172-byte string literal not displayed */
}

func (*Cmd) GetEnv

func (c *Cmd) GetEnv() string

GetEnv resolves runtime environment.

func (*Cmd) GetVersion

func (c *Cmd) GetVersion() string

GetVersion resolves CLI version.

type DocsCmd

type DocsCmd struct{}

func (*DocsCmd) Run

func (c *DocsCmd) Run() error

type DoctorCmd

type DoctorCmd struct{}

func (*DoctorCmd) Run

func (c *DoctorCmd) Run() error

type LogsCmd

type LogsCmd struct {
	Debug    bool     `help:"Enable debug mode"                                                             default:"true" negatable:""`
	Env      string   `help:"Tail a deployed environment instead of the local cluster (e.g. us-west1)"`
	Shard    []string `help:"Limit to these shards (remote only); repeatable"`
	Tail     int32    `help:"Historical lines to replay before tailing (remote only)"                       default:"200"`
	Previous bool     `help:"Logs from the previous container, for a crashed pod (remote only)"`
}

LogsCmd shows the shard/platform log picker against an already-running cluster — the same picker `world start` drops into after its initial reload. Doesn't bring up the cluster or deploy anything; ENTER tails the highlighted target, 'r' reloads the highlighted instance's shard, ctrl+r does the same but first purges just that instance's state, Ctrl+C exits.

func (*LogsCmd) Run

func (c *LogsCmd) Run(ctx context.Context) error

type PurgeCmd

type PurgeCmd struct {
	Image bool `help:"Also prune Cardinal shard images + per-reload registry tags. k3d base images are NOT removed."`
}

func (*PurgeCmd) Run

func (c *PurgeCmd) Run(ctx context.Context) error

type ReloadCmd

type ReloadCmd struct {
	Instances []string `arg:"" optional:"" help:"Instance IDs to reload; defaults to every instance"`
	Debug     bool     `                   help:"Enable debug mode"                                  default:"true"  negatable:""`
	Purge     bool     `                   help:"Wipe instance state (NATS JetStream) before reload" default:"false" negatable:""`
}

ReloadCmd rebuilds one or more Cardinal shards and rolls them in the already-running local cluster. Inner-loop iteration alternative to `world stop` + `world start`.

func (*ReloadCmd) Run

func (c *ReloadCmd) Run(ctx context.Context) error

type SetupCmd

type SetupCmd struct {
	Directory string `` /* 131-byte string literal not displayed */
	Template  string `` /* 141-byte string literal not displayed */
}

func (*SetupCmd) Run

func (c *SetupCmd) Run(rootCmd *Cmd) error

type StartCmd

type StartCmd struct {
	Debug bool `help:"Enable debug mode" default:"true" negatable:""`
}

func (*StartCmd) Run

func (c *StartCmd) Run(ctx context.Context) error

type StopCmd

type StopCmd struct{}

func (*StopCmd) Run

func (c *StopCmd) Run(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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