Skip to content

full non-interactive mode: eliminate all tty prompts when flags are provided #816

@yigitkonur

Description

@yigitkonur

problem

several commands still prompt for interactive input even when all required flags are provided. this breaks ci/cd pipelines, scripts, and ai agent automation.

specific commands that prompt unnecessarily:

  • railway add --database mysql — prompts "what do you need?" even though --database is explicit
  • railway add --image <img> -s <name> — prompts "enter a variable" with no way to skip
  • railway down — prompts for confirmation with no --yes flag support

real-world scenario

building an automated deployment script that provisions a full stack (mysql + redis + backend + frontend). every railway add call hangs waiting for tty input despite having all flags. the workaround is piping /dev/null or < /dev/null which sometimes works, sometimes doesn't.

proposed solution

  1. when all required params are provided via flags, skip interactive prompts entirely
  2. add --yes / -y flag to all destructive commands (down, delete, etc.)
  3. detect non-tty environments and error with a clear message instead of hanging

related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions