Skip to content

feat: Add stream option for real-time output without requiring TTY #1179

@jasonwbarnett

Description

@jasonwbarnett

Description

Add a new stream configuration option that enables real-time log streaming for commands and scripts without requiring a TTY. This would provide an alternative to interactive: true that works in non-TTY environments.

What problem it is solving?

Currently, using interactive: true in non-TTY environments (like VS Code's commit interface, GitHub Desktop, or CI/CD pipelines) fails with the error:

Couldn't enable TTY input: open /dev/tty: device not configured

This happens because interactive: true attempts to open /dev/tty for user input, which doesn't exist in these environments.

Users who want real-time streaming output (like test results or linter output) but don't need user input are forced to either:

  1. Use interactive: true and deal with TTY errors in non-TTY environments
  2. Accept buffered output (default behavior using pseudo-TTY)

Proposed solution

Add a stream: true option that:

  • Streams output in real-time without requiring TTY access
  • Does not attempt to open /dev/tty for input
  • Works in all environments (TTY and non-TTY)
  • Provides the same real-time output visibility as interactive but without the input requirement

Use case example

pre-commit:
  commands:
    tests:
      run: npm test
      stream: true
    lint:
      run: npm run lint
      stream: true

This would allow developers to see test and lint output in real-time when committing from VS Code, without encountering TTY errors.

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