Skip to content

[Feature Request] Add FX_NO_PAGER env var to suppress the TUI and print to stdout #421

Description

@cohml

Feature request: --no-paging flag to suppress the TUI

Current behavior

fx always launches the interactive TUI when no transform expression is provided, regardless of how stdout is connected:

fx file.json          # TUI
fx file.json | cat    # still TUI — stdout is not checked
cat file.json | fx    # still TUI — no args triggers interactive mode

The only way to get plain output today is to pass a no-op transform:

fx file.json .        # prints and exits
cat file.json | fx .  # same

This is non-obvious and not documented as the escape hatch for non-interactive use.

Requested behavior

Add a FX_NO_PAGER env var (consistent with FX_LINE_NUMBERS, FX_COLLAPSED, etc.) that prints formatted output to stdout and exits immediately, without launching the TUI:

FX_NO_PAGER=1 fx file.json
FX_NO_PAGER=1 cat file.json | fx

A CLI flag (--no-paging) would also be welcome as a per-invocation alternative.

Motivation

  • Scripting and shell pipelines where the TUI is unwanted
  • CI/logging contexts where a TUI breaks output capture
  • Discoverability: the . workaround is easy to miss; an explicit flag is clearer
  • Ability to pretty-print JSON outputs even alongside response headers (e.g., curl -i)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions