cli

package
v0.0.0-...-9208c1c Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli implements headless mode and command-line parsing (contract C10 v1).

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is set via -ldflags "-X github.com/thegriglat/platui/internal/cli.Version=…".

Functions

func Run

func Run(ctx context.Context, args []string, env Env) int

Run executes platui with args and returns the exit code.

Types

type Env

type Env struct {
	Stdout, Stderr io.Writer
	Getenv         func(string) string
	Getwd          func() (string, error)
	Stdin          io.Reader   // answers to confirmation prompts
	IsTTY          func() bool // stdin is a terminal
	Yes            bool        // global --yes flag (filled in by parsing)
	Build          func(cfg *config.Config, repoDir string) (*app.App, error)
	RunTUI         func(a *app.App, cfg *config.Config, start StartAt) error
}

Env holds the CLI's external dependencies.

type StartAt

type StartAt struct{ Project, Item string }

StartAt is where to open the TUI.

Jump to

Keyboard shortcuts

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