fx

20k

Interactive JSON viewer and JavaScript processor for exploring, transforming, and editing JSON in the terminal.

$brew install fx
Language
Go
Stars
20,317
Category
Data Processing
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

fx is a JSON-first terminal tool with two modes: a fullscreen viewer for browsing documents and a JavaScript-powered processor for transforming data from stdin or files. It can also parse YAML or TOML input and route it through the same workflow.

What It Enables
  • Browse nested JSON, search keys or values, collapse sections, preview nodes, and print selected paths or values from a terminal viewer.
  • Pipe JSON streams through JavaScript expressions to extract fields, map or filter arrays, slurp multiple objects, or process raw text lines.
  • Edit JSON files in place with expression chains and the built-in save function, or ingest YAML and TOML and emit JSON for later steps.
Agent Fit
  • Expression mode reads stdin or files, writes results to stdout, and returns non-zero exits on parse or JavaScript errors, which suits inspect and transform loops.
  • Structured output is native here: object and array results are emitted as pretty JSON, while scalar values print directly for shell composition.
  • The fullscreen viewer is useful for human debugging, but unattended agents should usually call explicit expressions and treat the TUI as optional exploration.
Caveats
  • The transformation language is JavaScript-flavored rather than jq syntax, so automation often needs a quick docs or --help pass before first use.
  • In-place edits require a real file path and the special save function; that path is unavailable on stdin and symbolic links are refused.