Documentation
¶
Overview ¶
Package cli registers selfdoc's whole command tree on one strictcli application.
One binary carries what used to be two Python CLIs, so every cross-CLI refusal they made is gone: `build --target unified` builds a unified site here rather than naming another package, and `check` answers for every project kind. What each command does, refuses and prints is otherwise the Python's, verbatim.
Nothing here changes the process's working directory. The directory a command operates on is Options.Dir, which the editor's publish path sets explicitly so an in-process invocation can act on a repository that is not the one the editor was started in.
Index ¶
Constants ¶
const AppHelp = "Code-aware static site generator with directive-based content extraction"
AppHelp is the one-line description `selfdoc --help` prints.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Dir is the project directory every command operates on. Empty means
// the process's own working directory, spelled ".".
Dir string
// Stdout and Stderr collect a command's human output, for the editor's
// publish path, which calls the command through strictcli's App.Call (a
// call whose context discards what it writes). Nil, as the binary and
// the suite leave them, sends the output through the dispatch's strictcli
// context: the answer through ctx.Out, a refusal through ctx.Error.
Stdout io.Writer
Stderr io.Writer
// Registry is how a toolchain pin is checked for publication. The zero
// value reads the real registries.
Registry assembly.Registry
// Version is the binary's own release version: what `selfdoc --version`
// prints, and the selfdoc pin a generated deploy workflow installs when
// no version is named explicitly. The binary reads it from the
// repository's VERSION file, embedded at compile time, and hands it in
// here -- nothing under internal/ reads that file. Empty states no
// version, and the paths that need a real one refuse rather than
// inventing one.
Version string
}
Options is everything one application is built from.
Only Version comes from the binary itself; every other member has a working zero value. Those members exist for the two callers that are not the binary: the editor's publish path, which runs a command in-process against a stated directory and collects its output, and the suite, which stubs the two registries a toolchain pin is checked against.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package faketool is the fake external tool the cli suite puts at the front of PATH under whatever names a test asks for -- "gh", "npx", and so on.
|
Package faketool is the fake external tool the cli suite puts at the front of PATH under whatever names a test asks for -- "gh", "npx", and so on. |
|
Command faketoolcmd is the executable the cli suite installs at the front of PATH under each external tool's name.
|
Command faketoolcmd is the executable the cli suite installs at the front of PATH under each external tool's name. |