Luban has 16 commands, organized into four groups.
Command What it does
luban setupInstall LLVM-MinGW + cmake + ninja + mingit + vcpkg into <data>/toolchains/
luban envShow env state; rewrite activate scripts; register HKCU PATH (rustup-style)
Command What it does
[`luban new app lib `](./new.md)
luban buildcmake --preset && cmake --build; sync compile_commands.json
[`luban target add remove`](./target.md)
These work before any subcommand:
Flag Effect
-V, --versionPrint luban X.Y.Z and exit
-h, --helpPrint top-level help
-v, --verboseVerbose log output (including stack traces on internal errors)
Idempotent : every command can be re-run safely. luban setup skips already-installed components, luban add replaces existing dep, luban target add refuses duplicate names.
Atomic file writes : every config/manifest write goes via tmp + rename, so a crash leaves either the old or new file fully intact, never half-written.
Idiomatic exit codes : 0 success, 1 runtime failure (download failed, cmake error), 2 user error (invalid args, refused operation).
Logs to stderr : useful info (✓, →, !, ✗ prefixed lines) goes to stderr . stdout is for machine-readable output (e.g., compile_commands.json paths). You can pipe stdout cleanly.