cli

package
v0.0.0-...-b13a039 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package cli implements the command-line interface for aenv.

Run parses the command line and dispatches a subcommand.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context) error

Run parses the command line and runs the selected subcommand.

Types

type AreaEdit

type AreaEdit struct {
	textarea.Model
	// contains filtered or unexported fields
}

func (AreaEdit) Init

func (AreaEdit) Init() tea.Cmd

func (AreaEdit) Update

func (e AreaEdit) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (AreaEdit) View

func (e AreaEdit) View() tea.View

type Error

type Error struct {
	// Err is the wrapped error.
	Err error
	// Code is the exit code.
	Code int
}

Error pairs an error with an exit code.

func (Error) Error

func (e Error) Error() string

Error returns the message.

func (Error) ExitCode

func (e Error) ExitCode() int

ExitCode returns the exit code.

func (Error) Unwrap

func (e Error) Unwrap() error

Unwrap returns the wrapped error.

type Eval

type Eval struct {
	// contains filtered or unexported fields
}

Eval is the eval subcommand.

func (Eval) Run

func (e Eval) Run(ctx context.Context) error

Run executes the eval subcommand.

func (*Eval) Write

func (e *Eval) Write(b []byte) (int, error)

type LineEdit

type LineEdit struct {
	textinput.Model
	// contains filtered or unexported fields
}

func (LineEdit) Init

func (LineEdit) Init() tea.Cmd

func (LineEdit) Update

func (e LineEdit) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (LineEdit) View

func (e LineEdit) View() tea.View

type Namespace

type Namespace struct {

	// Namespace names the environment to generate.
	Namespace string `arg:""`
	// Args pass to the generator.
	Args []string `arg:"" optional:"" name:"args" help:"Namespace arguments."`
	// contains filtered or unexported fields
}

Namespace is the environment subcommand. It takes a namespace name; extra args pass to the generator.

func (Namespace) Run

func (n Namespace) Run() error

Run executes the namespace subcommand.

func (*Namespace) Write

func (n *Namespace) Write(b []byte) (int, error)

type TextEdit

type TextEdit struct {
	// contains filtered or unexported fields
}

func (TextEdit) Init

func (e TextEdit) Init() tea.Cmd

func (TextEdit) Update

func (e TextEdit) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (TextEdit) View

func (e TextEdit) View() tea.View

type Version

type Version struct {
	// Semantic prints the semantic version.
	Semantic bool `help:"Print only the semantic version." short:"s" xor:"version-output"`
	// URL prints the project URL.
	URL bool `help:"Print the project URL." xor:"version-output"`
	// Repo prints the repository URL.
	Repo bool `help:"Print the repository URL." xor:"version-output"`
	// License prints the license.
	License bool `help:"Print the license." xor:"version-output"`
}

Version is the version subcommand. All flags are mutually exclusive.

func (Version) Run

func (v Version) Run(app *kong.Kong) error

Run executes the version subcommand.

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

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