command

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 39 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 command is dockhand's command line, rebuilt for Design v3 (docs/design-v3.md).

A command parses its arguments, finds its context (the branch, from the worktree, --branch, or a prompt), asks what only a person can answer, and renders what the engine reports. The engine decides. Anything that chooses what is eligible, enforces a guardrail or a publication rule, runs several engine operations as one with its own rule for a failure partway, or keeps state belongs in the engine, whose tests then hold it; the command calls it and says what happened.

That keeps the command line from becoming v2's cli, which grew by repeating one sequence thirteen times and by reaching past its layer to work out verdicts (the architecture review of 2026-09-21, at tag docs-archive-2026-10-25). TestCommandTalksToTheEngine holds the line mechanically: its packages import only what they bind, render, and compose, and read and write records only through the engine.

It's split into packages, one concept each (v0.5.0 part 4, item 2): a package per verb or family of verbs (author, check, status, …), which imports no other but the composites, ship and bump; and below them the layers they share, view (what the engine returns, shown), checkrun (a queued check seen through), host (the Mac, or a test's stand-in), settings (what every command shares, and the engine it opens), branchflags (the branch a command works in), and cmdtest (the tests' harness). This package is the root, newRoot's command tree, which registers each verb, and RunWith, the command line a test binary runs through cmdtest. TestCommandTalksToTheEngine holds the shape too.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, args []string, streams term.Streams) error

Run executes the command line in args, in the process's environment and working directory.

func RunWith added in v0.5.0

func RunWith(ctx context.Context, line settings.Invocation, streams term.Streams, dependencies compose.Dependencies, mac *host.Host) error

run executes the command line on the host, with the stand-ins given, compose's real ones where they're empty, which a test gives its own.

Types

This section is empty.

Directories

Path Synopsis
Package branchflags finds the branch a command works in: -b, -p, and --pr (BranchFlags), an authoring command's -b or --new (BranchChoice), the question where several branches change a port, and a run command's named or latest check.
Package branchflags finds the branch a command works in: -b, -p, and --pr (BranchFlags), an authoring command's -b or --new (BranchChoice), the question where several branches change a port, and a run command's named or latest check.
Package checkrun sees a queued check through for the command line: run here where no serve leads, or followed where one does, its progress and its results reported as they come, and what a failure's log says.
Package checkrun sees a queued check through for the command line: run here where no serve leads, or followed where one does, its progress and its results reported as they come, and what a failure's log says.
Package cmdtest is the command line's tests' shared harness: a world of a MacPorts checkout, an upstream, and a fork (NewWorld), each test's stand-ins for compose and the host (Stands, Hosted), command lines run through them (Dockhand, RunFor, JSONOf), and the fakes a test gives the engine.
Package cmdtest is the command line's tests' shared harness: a world of a MacPorts checkout, an upstream, and a fork (NewWorld), each test's stand-ins for compose and the host (Stands, Hosted), command lines run through them (Dockhand, RunFor, JSONOf), and the fakes a test gives the engine.
Package console is dockhand console: the branches in a table the terminal's size, kept current as serve works, a pane of the journal's events or a branch's detail under it, and keys that run logs, check, tidy, and submit on the row selected.
Package console is dockhand console: the branches in a table the terminal's size, kept current as serve works, a pane of the journal's events or a branch's detail under it, and keys that run logs, check, tidy, and submit on the row selected.
Package decide is dockhand decide: a person's decision on one concern that holds a branch, with their reason (the person's voice, Then's item 13).
Package decide is dockhand decide: a person's decision on one concern that holds a branch, with their reason (the person's voice, Then's item 13).
Package host is the Mac the command line runs on, or a test's stand-in for it: its clock, identity, notifications, launchd, the background cleanup and drain it starts, its Tart and its login's stores, and the timings serve and dockhand console keep (Timings).
Package host is the Mac the command line runs on, or a test's stand-in for it: its clock, identity, notifications, launchd, the background cleanup and drain it starts, its Tart and its login's stores, and the timings serve and dockhand console keep (Timings).
Package settings is what every command shares: the paths and configuration a command line gives, the engine it opens with them, the places it works in, its --json mark, and the person's editor.
Package settings is what every command shares: the paths and configuration a command line gives, the engine it opens with them, the places it works in, its --json mark, and the person's editor.
Package tidyrun is tidy's stage, which tidy, ship, and submit each run: a branch's edits committed as tidy plans them, previewed as tidy previews them, applied unasked where the plan allows (AppliesUnasked), asked on a terminal otherwise, and made through history.Make.
Package tidyrun is tidy's stage, which tidy, ship, and submit each run: a branch's edits committed as tidy plans them, previewed as tidy previews them, applied unasked where the plan allows (AppliesUnasked), asked on a terminal otherwise, and made through history.Make.
Package usage prints the guide in the binary, a page a topic, for one who has dockhand and no checkout of it (the person's "usage", 2026-10-28).
Package usage prints the guide in the binary, a page a topic, for one who has dockhand and no checkout of it (the person's "usage", 2026-10-28).
Package view is how the command line shows what the engine returns: the --json shapes, the writers of results, plans, and the queue, the attention rows and their Next lines, and the words they share.
Package view is how the command line shows what the engine returns: the --json shapes, the writers of results, plans, and the queue, the attention rows and their Next lines, and the words they share.

Jump to

Keyboard shortcuts

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