Skip to main content
The TalkValue CLI returns a predictable exit code on every run so shell scripts and CI pipelines can branch on outcome without parsing output. Pair the code with the JSON error envelope on stderr to surface a useful message.

Reference

Read the exit code

Branch in a shell script

set -e halts on the first non-zero exit. The case block maps each domain code to a human-readable message and re-exits with 1 so the calling script can detect the failure.

Combine with the JSON error envelope

When --json is set (or output is piped), errors land on stderr as:
Capture it separately from stdout to get both the message and the code:

CI pipelines

Most CI runners (GitHub Actions, GitLab CI, CircleCI) fail a step on any non-zero exit code, so the CLI integrates without extra plumbing:
If auth login was skipped because TALKVALUE_TOKEN is missing, the command exits 3 and the CI step fails with the auth error printed to stderr.