cli

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 55 Imported by: 0

Documentation

Overview

Package cli implements the orb commands.

Index

Constants

View Source
const JSONSchemaVersion = 1

JSONSchemaVersion is the "schemaVersion" of every orb --json output (ADR-0015, ADR-0054). Scripts check it before reading the rest. Adding a field keeps the version; removing, renaming or retyping one is a breaking change that needs a new major version of orb and a new schema version.

View Source
const LockAPIVersion = "gorbital.dev/v2"

LockAPIVersion versions the gorbital.lock format (ADR-0015, ADR-0050).

Variables

View Source
var Version = moduleVersion("v0.3.1-dev", debug.ReadBuildInfo)

Version is the orb version. Release builds set it with -ldflags "-X gorbital.dev/cli/internal/cli.Version=v0.2.0"; go install gorbital.dev/cli/cmd/orb@v0.2.0 gets it from the module version. The fallback is what an unstamped build of this tree reports, so it names the release being prepared: it reaches users' apps through gorbital.lock and orb upgrade's branch and commit names.

Functions

func EjectIntoApp added in v0.2.1

func EjectIntoApp(dir string, modules []recipes.EjectedModule, checkout string) error

EjectIntoApp copies the built-in modules into the app in dir as orb new does after writing a Full app (preset.Ejects), from the gorbital checkout at checkout, and removes the gorbital.lock that records them when the app had none. go generate writes the golden apps with it, so they show what orb new writes; it runs neither go mod tidy nor the surface test.

func Main

func Main(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) int

Main runs orb with args and returns the process exit code: 0 on success, 1 on failure, 2 on invalid usage, 130 when the user cancels a prompt. Prompts read stdin and draw on stderr, only when both are terminals.

Types

This section is empty.

Jump to

Keyboard shortcuts

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