nito ask and nito fusion print their answer to standard output and then exit, so they compose like any other Unix tool. This page covers the parts you need when Nito runs inside a script or pipeline rather than in front of a person.
Output Formats
--quiet and --verbose are mutually exclusive. The NO_COLOR environment variable is honored, so NO_COLOR=1 nito ask ... also drops color.
--json structures a successful response. Errors always print as plain text to standard error and set a non-zero exit code, so a script can tell success from failure without parsing anything.Exit Codes
Nito exits0 on success and non-zero on failure. Branch on that directly:
Piping Input
--stdin reads the prompt from standard input. The piped text becomes the whole prompt, so you cannot also pass a prompt argument (Nito rejects that combination). To ask a question about piped content, put the question into the stream:
--file, which attaches an image or document without reshaping your prompt:
Recipes
- Shell script
- Git hook
- CI step
Privacy still applies in scripts exactly as it does in a chat. A scripted
nito ask runs at the privacy level of the model it uses, and --json or --quiet change only the shape of the output, never where the request goes. See Privacy Levels.Related
Nito CLI
The full command surface and flags on one page.
Document Q&A Pipeline
A recipe using
--json output and client-side validation over many files.
