Expand description
Argv routing and the dispatch skeleton.
Structsยง
- Doctor
Args - Serve
Prep - What
serveresolves before it starts logging: settings loaded with the RAW environment (an emptyOPENCODE_CTL_SERVERmust stay visible as the background-service override), the pairing identity resolved and applied (pairing.rs), and the warnings for the log.
Enumsยง
Constantsยง
- SUBCOMMANDS ๐
Functionsยง
- argv0_
stem ๐ - The file stem of
argv0with the directory and a.exesuffix stripped (either separator). - blank_
is_ unset - The ONE empty-is-unset rule: a value empty after trimming is unset; any other value is returned verbatim.
- dispatch
- doctor_
main ๐ doctor-json: the report for the real environment, as the value to print on stdout.- emit_
skill emit-skill <name> --host <cc|qwen|agy|opencode>(the two words in either order): the rendered skill, byte for byte what goes to stdout. Any other argument shape, name or host isINVALID_ARGUMENT.- env_
nonempty - gc_main ๐
gc(no arguments): the report for the real environment as the JSON to print on stdout.- launcher_
bin_ dir - The launcher install dir (spec Launcher, install-launcher):
~/.local/binon POSIX,%LOCALAPPDATA%\opencode-ctlon Windows.getis the raw environment lookup. - launcher_
main ๐ pairandinstall-launcherfor the real environment; returns the exit code.- launcher_
run ๐ - launcher_
withheld ๐ - The OpenCode host (the compiled constant or
OPENCODE_CTL_HOST=opencode) is never offered the launcher. - log_
gc_ ๐report - One line per pair
gctouched, appended to that pairโspair-<id>.log(thegcsubcommand opens each logScoped;pairwrites to its own already-open log instead and never calls this). - parse_
doctor_ args doctor-json [verbose] [--host <h>], the two in either order; any other word isINVALID_ARGUMENT.- prepare_
serve - route
- Under the name
opencode-pair(the launcher link) a leadingresume,attach,gc,install-launcher,doctor-jsonor--versionis that subcommand and anything else, no arguments included, ispair. Under the long binary names the subcommand is always explicit. - serve ๐
- usage
- version_
line