antonmedv / fx

Terminal JSON viewer & processor
https://fx.wtf
MIT License
19.08k stars 438 forks source link

Question: how to enable interactive mode? #223

Closed wernerdegroot closed 1 year ago

wernerdegroot commented 2 years ago

I just installed fx on a Mac (using brew install fx, which installed version 24.0) in combination with zsh. For some reason, commands like fx data.json just spits out the highlighted JSON to stdout, but not much else (very similar to what jq data.json does). How do I enter interactive mode?

antonmedv commented 2 years ago

This is strange. If stdout in TTY is should automatically start.

adriansr commented 2 years ago

Was having the same problem. In my case it was caused by the input containing more than one document (i.e. ndjson), which causes fx to revert to streaming mode.

This issue https://github.com/antonmedv/fx/issues/214 describes a workaround.

hoclun-rigsep commented 1 year ago

Same problem. Invoked as npx fx data.json and it doesn't run interactively. Run in a nothing-special iterm2 window.

antonmedv commented 1 year ago

Yes, npm version of fx is only for CI usage, it is not interactive. You need to install the "full" version. For example via brew install fx.