cli

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = unknownValue
	BuiltAt = unknownValue
)
View Source
var ErrCompletionEmpty = errors.New("completion: nothing to complete")

ErrCompletionEmpty is reserved for future dynamic completions that may return nothing. Kept for API stability.

View Source
var SupportedShells = []string{"bash", "zsh", "pwsh", "powershell"}

SupportedShells lists the shells for which completion scripts exist.

Functions

func Completion

func Completion(shell string, w io.Writer) error

Completion writes a completion script for the named shell to w.

func EnsureHarness

func EnsureHarness(reqs []require.Requirement, flowPath ...string) (string, error)

EnsureHarness builds or reuses a runner binary linked with exactly the external modules declared by reqs.

func ExecHarness

func ExecHarness(bin string, args []string) int

func Print

func Print(w interface{ Write([]byte) (int, error) })

Print writes a multi-line build summary to w.

func PrintCommandHelp

func PrintCommandHelp(w io.Writer, command string) bool

func PrintTopHelp

func PrintTopHelp(w io.Writer)

func Run

func Run(args []string) int

Run is the central CLI dispatcher.

func RunEmbedded

func RunEmbedded(ctx context.Context, source string, args []string) int

func RunEmbeddedWithBundles

func RunEmbeddedWithBundles(ctx context.Context, source string, args []string, bundles []core.Bundle) int

func RunPath

func RunPath(ctx context.Context, args []string) int

func RunWithBundles

func RunWithBundles(args []string, bundles []core.Bundle) int

func SelfBuild

func SelfBuild(ctx context.Context) error

SelfBuild rebuilds the running nexssflow binary in place, injecting VCS metadata from the source directory. It replaces the manual `go install` step for developers who want consistent version output.

func SourceRequires

func SourceRequires(path string) ([]require.Requirement, error)

Types

type LintIssue

type LintIssue struct {
	File    string `json:"file"`
	Line    int    `json:"line,omitempty"`
	Kind    string `json:"kind"`
	Message string `json:"message"`
}

LintIssue is one problem found in a .nflow source. The shape is stable — the CLI prints it as JSON so tooling and editors can consume it. File is always a real path (never a synthetic label).

type Step

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

Step is one in-flight build step. Exactly one terminal method should be called; further calls are ignored.

func (*Step) Done

func (s *Step) Done()

Done finishes the step with no suffix.

func (*Step) DoneTimed

func (s *Step) DoneTimed()

DoneTimed finishes the step and appends the elapsed wall clock.

func (*Step) Fail

func (s *Step) Fail(err error)

Fail finishes the step with a red error marker.

type StepLogger

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

StepLogger prints numbered build steps. In an interactive terminal it animates a spinner while a step is running. When stdout is redirected to a file or a pipe, the spinner is disabled so CI logs stay clean.

func NewStepLogger

func NewStepLogger(w io.Writer, total int) *StepLogger

NewStepLogger returns a logger that will print at most total steps.

func (*StepLogger) Start

func (l *StepLogger) Start(label, detail string) *Step

Start begins a step. In a TTY it launches the spinner goroutine.

Directories

Path Synopsis
Package selftest runs the Nexss Flow self-test suite: a feature-by- feature check of every registered bundle, run in-process against the binary's own compiler and runtime.
Package selftest runs the Nexss Flow self-test suite: a feature-by- feature check of every registered bundle, run in-process against the binary's own compiler and runtime.

Jump to

Keyboard shortcuts

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