14 lines
1.5 KiB
Markdown
14 lines
1.5 KiB
Markdown
# REQUIREMENTS
|
|
|
|
## cli
|
|
|
|
ring id requirement
|
|
0 001 `have` must be a compiled single-file Zig CLI with no runtime dependencies beyond the OS/libc boundary needed for POSIX executable checks.
|
|
0 002 `have` must inspect command availability through `PATH` only; it must not mutate files, execute discovered commands, invoke a shell, inspect package managers, access the network, read hidden config, prompt, page, colorize, or emit JSON by default.
|
|
1 003 With no arguments, `have` must stream executable file names discovered in `PATH`, one per stdout line, de-duplicated by first executable `PATH` occurrence without collecting the full listing before writing records.
|
|
1 004 With `NAME...` arguments, `have` must print only available command names found through `PATH`, exit 0 when all requested names are available, and exit nonzero when any requested name is missing or not a command name.
|
|
1 005 `have` must not report shell builtins, aliases, shell functions, directories, non-executable files, or package installation state unless they also exist as executable files in `PATH`.
|
|
1 006 Usage-error and runtime diagnostics must go to stderr and never corrupt stdout records.
|
|
1 007 `zig build test` must prove PATH listing, executable-bit filtering, first-occurrence de-duplication, query output, missing-command failure, help stdout behavior, and that inspected commands are not executed.
|
|
1 008 `have --help` and `have -h` must print manual text to stdout and exit 0 without emitting stderr.
|