CI non-interactive confirmation gates
Problem
Commands that prompt on TTY (share upload, cleanup --ask, locales delete, init without --yes) hang or fail in GitHub Actions, Docker, and other non-TTY environments.
What we do
- Global
--yes: skips interactive confirms where the command respects it; wins over--ask(CLI prompts). --json: machine-readable stdout contract — no interactive prompts for required inputs on JSON-capable commands; share upload auto-proceeds without TTY confirm (same practical effect as--yesfor upload).- Non-TTY default for share: without a TTY,
share uploaduploads without the manifest confirm unless you rely on dry workflows — prefer explicit--yesor--jsonin CI for clarity. - Explicit ids:
share view/share deleteerror without--project/--reporton non-TTY — pass ids fromshare list --jsonor cache files. canAskgating inpackages/cli/src/core/ask/— combines TTY detection,--json, and--yes.
CI patterns
bash
# Validate gate
i18nprune validate --json | jq -e '.ok and ((.issues | length) == 0)'
# Destructive cleanup
i18nprune cleanup --yes --json
# Share upload
i18nprune share upload --project --json
# Init in automation
i18nprune init --yes