cmd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	Taskfile string `arg:"" help:"Path to the taskfile to process."`
	Output   string `help:"Path to the output file." long:"output" required:"true" short:"o"`
	Config   string `help:"Path to a config file (YAML or JSON)." long:"config" short:"c"`

	GroupByNamespace bool `help:"Group tasks in the same namespace together in the output." long:"group-by-namespace"`

	//nolint:revive // Intentially long name for clarity in the CLI help.
	Highlight string `` /* 134-byte string literal not displayed */

	//nolint:revive // Intentially long name for clarity in the CLI help.
	RenderImage string `help:"Render the graph as an image using graphviz dot. Specify the file type (e.g. png, svg)." long:"render-image"`

	//nolint:revive // Intentially long name for clarity in the CLI help.
	ExportConfig string `help:"Export the effective configuration to a file (YAML or JSON based on file extension)." long:"export-config"`
	Verbose      bool   `help:"Enable verbose logging."`
}

func (*CLI) CreateConfig

func (c *CLI) CreateConfig() (*config.Config, error)

func (*CLI) CreateLogger

func (c *CLI) CreateLogger() *slog.Logger

CreateLogger builds a slog logger configured from the CLI flags.

func (*CLI) ExportConfigToFile

func (c *CLI) ExportConfigToFile(cfg *config.Config) error

ExportConfigToFile writes the effective configuration to the given file path. The format is determined by the file extension (.yaml, .yml, or .json).

func (*CLI) Run

func (c *CLI) Run(
	flags *Flags,
) error

Run executes the CLI command with the given flags.

type Flags

type Flags struct {
	Verbose bool
	Log     *slog.Logger
	Config  *config.Config
}

Jump to

Keyboard shortcuts

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