You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whether a command prompts is inferred from stdin. The prompt wrapper skips the prompt when ci-info reports CI or when stdin is a non-TTY with no data; create has its own rule (TTY and not CI). When an agent runs the CLI in a pseudo-terminal (IDE terminals, tmux-based harnesses), the prompt renders on stderr and waits until the harness times out, with nothing on stdout and no exit code. Verified on 1.10.0:
$ script -q /dev/null apify datasets rm <id>
? Are you sure you want to delete this Dataset? (Y/n)
(killed after 8 s, dataset still exists)
What we want
A global --non-interactive flag, with APIFY_CLI_NON_INTERACTIVE=1 as the env equivalent, that forces every prompt onto the skip path regardless of stdin. A skipped prompt with no answer fails fast and names the flag that answers it.
Requirements
P0
Flag in _buildParseArgsOption next to --help and --user-agent, plus the env var.
One resolver replacing the three decision points: _stdinCheckWrapper, the rule in create.ts, and detectIsInteractive in telemetry.
A skipped prompt without an answer exits non-zero with the exact flag to pass.
P1
Default to non-interactive under known agent env vars, once each variable is verified against a real session.
One line in apify help --skill: always pass --non-interactive.
Activity
feat: add global --non-interactive flag and agent env var auto-detection
fix(init): stop the name prompt looping when stdin is not a TTY (#1479)