CLI reference
Common flags, output, confirmations, exit codes, credentials and shell completion.
What every Voidhash CLI command shares. For the commands themselves, see CLI.
Common flags
| Flag | Applies to | What it does |
|---|---|---|
--project <project> | Project commands | The project to act on. See Choose a project. |
--org <team> | member, notices, project list, project create | The team to act on, by slug, name or ID. |
--json | Most commands | Print the API objects as JSON. |
--quiet, -q | Most commands | Print only IDs, one per line. |
--yes, -y | Commands that ask first | Confirm without asking. |
--profile <name> | Every command | Use a profile. |
--debug, -d | Every command | Print debug logs and full error traces. |
--completions <shell> | The root command | Print a completion script. |
--version, -v | The root command | Print the CLI version. |
Output
In a terminal, commands print tables and summaries. For scripts:
--jsonprints the API objects, the stable shape to parse.--quiet(-q) prints only IDs, one per line, for piping into another command.
The CLI asks questions only when both standard input and output are a terminal. Elsewhere a missing
value fails the command and says which flag to pass. Color appears only in a terminal, and never
when NO_COLOR is set.
Confirmations
A change that can't be undone, or that changes what people get, shows what it will do and asks
first. Each command's --help says when. Pass --yes (-y) to confirm without asking; without a
terminal, such a command fails unless you pass it. Deleting a team or project, and erasing a
person, ask you to type its name, email or distinct ID instead. product perks set and push send
take --dry-run to show the change without making it.
Exit codes
Errors go to standard error, with the command that fixes them when there is one.
| Code | Meaning |
|---|---|
0 | Done, or help printed. |
1 | The command failed, or a check it ran didn't pass. |
2 | Wrong usage: a missing, ambiguous or invalid value, or an unanswered confirmation. |
3 | Not signed in, or the server no longer accepts the stored token or key. |
4 | Not found: no such item, or the credential can't see it. |
130 | Interrupted with Ctrl+C. |
provider test, webhook test and webhook retry exit with 1 when the endpoint doesn't work, so
a script can stop on it.
Credentials
The CLI stores its token in the macOS login keychain, or in the Secret Service keyring (through
secret-tool) on Linux. Where neither works, it uses credentials.json in
$XDG_CONFIG_HOME/voidhash/ (by default ~/.config/voidhash/), or %APPDATA%\voidhash\ on
Windows, readable only by you. A token is only ever sent to the API server that issued it.
Shell completion
The CLI prints a completion script for bash, zsh, fish, sh, powershell or pwsh:
voidhash --completions zsh > "${fpath[1]}/_voidhash"
voidhash --completions fish > ~/.config/fish/completions/voidhash.fishNext steps
- CLI: install, sign in and run in CI.
- Types, API and config: profiles and raw API calls.
- API overview: the HTTP API behind every command.
Something wrong or missing on this page? Tell us by email or on Discord.