-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Allow interactive mode to stay alive even when process.stdin.isTTY is false #13924
Copy link
Copy link
Open
Copy link
Labels
area/non-interactiveIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!We will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p2Important but can be addressed in a future release.Important but can be addressed in a future release.type/feature
Metadata
Metadata
Assignees
Labels
area/non-interactiveIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!We will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p2Important but can be addressed in a future release.Important but can be addressed in a future release.type/feature
Type
Fields
Give feedbackNo fields configured for Feature.
What would you like to be added?
I would like gemini-cli to provide a new CLI option that allows the CLI to remain active and continue listening to stdin even when stdin.isTTY is false.
Currently, the CLI immediately exits if it detects that stdin is not a TTY (for example, when launched by another program, a script, or a background service). This makes it hard to run the CLI in a programmatically controlled long-running session.
Why is this needed?
As a developer, integrating gemini-cli into other applications can be very useful.
However, when the CLI is launched programmatically (e.g., from Java, Node.js, or a backend service), stdin is usually not a TTY, which prevents the interactive mode from working.
Supporting interactive mode without a TTY would enable many valuable integration scenarios, including:
Additional context
Thanks for providing this great CLI tool! This feature would make it much easier to embed the CLI into other applications while still using the interactive experience.