Skip to main content
The CLI turns a person’s answer into an exit code, so any CI system can gate a step on it: the job continues on approval and fails otherwise.

GitHub Actions

Store the API key as a secret and the agent ID as a variable, then add a step before the risky one:
.github/workflows/deploy.yml
  • Pass untrusted text (like the commit message) through an environment variable, never straight into the script, so it can’t inject shell commands.
  • --request-id makes a re-run of the same attempt reuse the approval instead of asking again.
  • --max-wait should be shorter than the job’s timeout. If it’s reached, the CLI exits 6 and the approval stays open; someone can still answer, and a re-run picks it up.

Branching on the answer

Any exit code other than 0 fails the step. To do different things per answer, read the exit code or the JSON:

Other CI systems

GitLab CI, CircleCI, Buildkite and Jenkins work the same way: install Node.js 20+, set FINALSAY_API_KEY and FINALSAY_AGENT_ID from your secret store, and run npx finalsay ask … --wait. See exit codes.