Skip to content
/ fx Public
forked from antonmedv/fx

Command-line tool and terminal JSON viewer 🔥

License

Notifications You must be signed in to change notification settings

brewingcode/fx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fx logo

fx example

* Function eXecution

Command-line JSON processing tool

This is a fork of antonmedv/fx.

Differences

  • find is plaintext by default, and regex if the query looks like a regex (ie /\d+ items/i)
  • find is synchronous, so that the total number of hits can be displayed, and you can move forward ("n") and backward ("p") through results
  • find displays the property/element chain of each hit
  • implement counts instead of ellipses ({ 22 } vs {…} and [ 3 ] vs […])
  • bottom bar behaves differently: it shows all the time, and always reflects the current path under the cursor
  • slightly more modular require() structure, instead of everything being in fx.js
  • canceling the filter does not apply it
  • hitting "." loads the filter with the path under the cursor

Additions

  • find is available via --find on the command line
  • key "w" will write the current view to a file
  • key "c" will copy the current path to the clipboard
  • fix initial .[ and [ in filter
  • fix keys that start with a digit
  • moving left on a leaf-node will collapse up to the parent node

Removals

  • the ? functionality, use Object.keys(this) (or even better, jq keys)
  • status bar
  • generator

Contributing

Open in Gitpod

Or clone locally and run:

# install dependencies
npm install

# run fx from node_modules
npx fx package.json

# or install globally and run anywhere
npm link
fx package.json

# run the build binary
npm run build
./dist/fx-linux package.json

License

MIT

About

Command-line tool and terminal JSON viewer 🔥

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 100.0%