cli

package
v0.23.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = builder.Version
	Commit  = builder.Commit
	BuiltAt = builder.BuiltAt
)

The exported fields remain for source compatibility; build metadata is owned by builder.

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 Print

func Print(w io.Writer)

func PrintCommandHelp

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

func PrintTopHelp

func PrintTopHelp(w io.Writer)

func Run

func Run(args []string) int

func RunContext added in v0.15.0

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

func RunEmbedded

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

func RunEmbeddedWithBundleFactoriesForRequirements added in v0.15.0

func RunEmbeddedWithBundleFactoriesForRequirements(ctx context.Context, source string, args, targets []string, construct func(func(core.Bundle) error) error) int

func RunEmbeddedWithBundles

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

func RunEmbeddedWithBundlesForRequirements added in v0.15.0

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

func RunPath

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

func RunWithBundleFactoriesAndNative added in v0.23.0

func RunWithBundleFactoriesAndNative(
	args, targets []string,
	nativeFactory func() []core.Bundle,
	construct func(func(core.Bundle) error) error,
) int

func RunWithBundleFactoriesForRequirements added in v0.15.0

func RunWithBundleFactoriesForRequirements(args, targets []string, construct func(func(core.Bundle) error) error) int

func RunWithBundles

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

func RunWithBundlesForRequirements added in v0.15.0

func RunWithBundlesForRequirements(args []string, bundles []core.Bundle, targets []string) 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 ASTNode added in v0.14.0

type ASTNode struct {
	Kind string       `json:"kind"`
	Pos  *ASTPosition `json:"pos,omitempty"`

	Name string         `json:"name,omitempty"`
	Args map[string]any `json:"args,omitempty"`

	Raw       string `json:"raw,omitempty"`
	Condition string `json:"condition,omitempty"`
	Message   string `json:"message,omitempty"`
	Until     string `json:"until,omitempty"`

	L        *ASTNode   `json:"l,omitempty"`
	R        *ASTNode   `json:"r,omitempty"`
	Cond     *ASTNode   `json:"cond,omitempty"`
	Then     *ASTNode   `json:"then,omitempty"`
	Else     *ASTNode   `json:"else,omitempty"`
	Body     *ASTNode   `json:"body,omitempty"`
	Branches []*ASTNode `json:"branches,omitempty"`
}

ASTNode is the machine-readable form of one AST node. Fields are populated selectively based on Kind:

Atom          — Name, Args
Pipe          — L, R
Parallel      — Branches
Fallback      — L, R
Conditional   — Cond, Then, Else
Projection    — Raw
Loop          — Body, Until
Assert        — Condition, Message

A consumer that switches on Kind only reads the fields the Kind documents. Unknown kinds carry only Kind, which is the extension point: a future AST node type adds a new Kind string and its own fields without breaking existing consumers.

type ASTPipeline added in v0.14.0

type ASTPipeline struct {
	Name string   `json:"name"`
	Body *ASTNode `json:"body"`
}

ASTPipeline is one named pipeline definition.

type ASTPosition added in v0.19.0

type ASTPosition struct {
	File string `json:"file,omitempty"`
	Line int    `json:"line,omitempty"`
	Col  int    `json:"col,omitempty"`
}

type ASTReport added in v0.14.0

type ASTReport struct {
	Path      string        `json:"path"`
	TopLevel  *ASTNode      `json:"top_level,omitempty"`
	Pipelines []ASTPipeline `json:"pipelines,omitempty"`
}

ASTReport is the top-level JSON envelope. TopLevel is omitted when the file contains only @pipeline definitions.

type ActionGraphPipeline added in v0.23.0

type ActionGraphPipeline struct {
	Name  string                    `json:"name"`
	Graph action.IntrospectionGraph `json:"graph"`
}

type ActionGraphReport added in v0.23.0

type ActionGraphReport struct {
	SchemaVersion int                        `json:"schema_version"`
	Path          string                     `json:"-"`
	Program       *action.IntrospectionGraph `json:"program,omitempty"`
	Pipelines     []ActionGraphPipeline      `json:"pipelines,omitempty"`
}

type ActionPlanGraph added in v0.23.0

type ActionPlanGraph struct {
	Entry string                 `json:"entry,omitempty"`
	Exit  string                 `json:"exit,omitempty"`
	Nodes []ActionPlanNode       `json:"nodes,omitempty"`
	Edges []core.ActionGraphEdge `json:"edges,omitempty"`
}

ActionPlanGraph contains only control-flow structure and source positions. It intentionally excludes modifiers and action argument values.

type ActionPlanNode added in v0.23.0

type ActionPlanNode struct {
	ID     string `json:"id"`
	Kind   string `json:"kind"`
	Name   string `json:"name,omitempty"`
	File   string `json:"file,omitempty"`
	Line   int    `json:"line,omitempty"`
	Column int    `json:"column,omitempty"`
}

ActionPlanNode describes a planned action without carrying request data.

type ActionPlanPipeline added in v0.23.0

type ActionPlanPipeline struct {
	Name  string          `json:"name"`
	Graph ActionPlanGraph `json:"graph"`
}

ActionPlanPipeline is the AST-derived plan for one @pipeline body.

type ActionPlanReport added in v0.23.0

type ActionPlanReport struct {
	Path      string               `json:"path"`
	TopLevel  *ActionPlanGraph     `json:"top_level,omitempty"`
	Pipelines []ActionPlanPipeline `json:"pipelines,omitempty"`
}

ActionPlanReport is an AST-derived Flow lowering plan. It is deliberately separate from ActionGraphReport, which snapshots the program built by Kernel.

type LintIssue

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

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