cmd

package
v1.186.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Overview

Package cmd はコマンドラインインターフェースを提供する。

Index

Constants

This section is empty.

Variables

View Source
var CmdDesignDoc = &cli.Command{
	Name:        "designdoc",
	Usage:       "designdoc [gen|validate|list]",
	Description: "docs/design の frontmatter を生成・検証・一覧する",
	Commands: []*cli.Command{
		{
			Name:   "gen",
			Usage:  "frontmatter を欠くドキュメントに既定値を決定的に付与する",
			Action: runDesignDocGen,
		},
		{
			Name:   "validate",
			Usage:  "frontmatter の有無と妥当性、進捗との整合を検証する",
			Action: runDesignDocValidate,
		},
		{
			Name:  "list",
			Usage: "frontmatter で絞り込んで一覧する。validate を通した状態で使う前提。--open は不正 status を閉じた扱いで除外する",
			Flags: []cli.Flag{
				&cli.StringFlag{Name: "status", Usage: "指定 status のみ"},
				&cli.StringFlag{Name: "auto", Usage: "指定 auto のみ"},
				&cli.StringFlag{Name: "tag", Usage: "指定タグを含むもののみ"},
				&cli.BoolFlag{Name: "open", Usage: "着手対象、すなわち open な status のみ"},
			},
			Action: runDesignDocList,
		},
	},
}

CmdDesignDoc は設計ドキュメントの frontmatter を扱うサブコマンド

View Source
var CmdGenComponents = &cli.Command{
	Name:  "gencomponents",
	Usage: "コンポーネント定義(EntitySpec/Components等)を登録表から生成する",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:  "out",
			Value: "internal/components/components_gen.go",
			Usage: "出力先ファイルパス",
		},
	},
	Action: runGenComponents,
}

CmdGenComponents は genspec.Registry から components パッケージの EntitySpec / Components / InitializeComponents / AddEntity を生成するサブコマンド。 通常はトップの //go:generate から呼ばれる。

View Source
var CmdGenReadme = &cli.Command{
	Name:   "genreadme",
	Usage:  "README.tmpl.mdからREADME.mdを生成する",
	Action: runGenReadme,
}

CmdGenReadme はREADME.mdを生成するサブコマンド

View Source
var CmdPlay = &cli.Command{
	Name:        "play",
	Usage:       "play",
	Description: "play game",
	Action:      runPlay,
	Flags:       []cli.Flag{},
}

CmdPlay はゲームをプレイするコマンド

View Source
var CmdSimulateBalance = &cli.Command{
	Name:        "simulate-balance",
	Usage:       "simulate-balance",
	Description: "Run balance simulation and output results as JSON",
	Action:      runSimulateBalance,
}

CmdSimulateBalance はバランスシミュレーションを実行してJSON出力するコマンド

Functions

func NewMainApp

func NewMainApp() *cli.Command

NewMainApp は新しいメインアプリケーションを作成する

func RunMainApp

func RunMainApp(app *cli.Command, args ...string) error

RunMainApp はメインアプリケーションを実行する

Types

This section is empty.

Jump to

Keyboard shortcuts

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