root

package
v0.22.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 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)"`
	Progress phasebox.Progress `` /* 142-byte string literal not displayed */
}

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 world"`
	Logs    *LogsCmd         `cmd:"" group:"Cardinal Commands:" help:"View and tail logs for shards + platform components"`
	Debug   *debugger.Cmd    `` /* 137-byte string literal not displayed */
	Build   *BuildCmd        `` /* 147-byte string literal not displayed */
	MCP     *mcp.Cmd         `` /* 147-byte string literal not displayed */
	Version kong.VersionFlag `` /* 162-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:""`
}

LogsCmd shows the shard/platform log picker against an already-running world — the same picker `world start` drops into. 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 (the world keeps running; the edge on :8080 belongs to `world start`).

func (*LogsCmd) Run

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

type PurgeCmd

type PurgeCmd struct {
	Image bool `help:"Also remove the images world built for this project's shards and services."`
}

func (*PurgeCmd) Run

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

Run removes the project's containers, volumes and network.

type ReloadCmd

type ReloadCmd struct {
	Instances []string `` /* 153-byte string literal not displayed */
	Debug     bool     `` /* 182-byte string literal not displayed */
	Purge     bool     `` /* 182-byte string literal not displayed */
}

ReloadCmd rebuilds one or more Cardinal shards and recreates their containers in the running world. Inner-loop 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

Run brings the world up on Docker and stays attached: the edge proxy lives in this process, so Ctrl+C (or quitting the log picker) stops the containers again, keeping their volumes, like `docker compose up`.

type StopCmd

type StopCmd struct{}

func (*StopCmd) Run

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

Run stops the project's containers; volumes stay so `world start` resumes with state.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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