Coder Social home page Coder Social logo

jqp's Introduction

jqp

a TUI playground for exploring jq.

jqp

This application utilizes itchyny's implementation of jq written in Go, gojq.

Installation

homebrew

brew install noahgorstein/tap/jqp

macports

sudo port install jqp

Github releases

Download the relevant asset for your operating system from the latest Github release. Unpack it, then move the binary to somewhere accessible in your PATH, e.g. mv ./jqp /usr/local/bin.

Build from source

Clone this repo, build from source with cd jqp && go build, then move the binary to somewhere accessible in your PATH, e.g. mv ./jqp /usr/local/bin.

Usage

➜ jqp --help
jqp is a TUI to explore the jq command line utility

Usage:
  jqp [flags]

Flags:
  -f, --file string   path to the input JSON file
  -h, --help          help for jqp
  -v, --version       version for jqp

jqp also supports input from STDIN.

➜ curl "https://api.github.com/repos/stedolan/jq/issues?per_page=2" | jqp 

Keybindings

Keybinding Action
tab cycle through sections
shift-tab cycle through sections in reverse
ctrl-y copy query to system clipboard1
ctrl-s save output to file
ctrl-c quit program

Query Mode

Keybinding Action
enter execute query
ctrl-a go to beginning of line
ctrl-e go to end of line
/ctrl-b move cursor one character to left
/ctrl-f move cursor one character to right
ctrl-k delete text after cursor line
ctrl-u delete text before cursor
ctrl-w delete word to left
ctrl-d delete character under cursor

Input Preview and Output Mode

Keybinding Action
↑/k up
↓/j down
ctrl-u page up
ctrl-d page down

Built with:

Credits

  • jqq for inspiration

Footnotes

  1. jqp uses https://github.com/atotto/clipboard for clipboard functionality. Things should work as expected with OSX and Windows. Linux, Unix require xclip or xsel to be installed.

jqp's People

Contributors

noahgorstein avatar itchyny avatar nilock avatar herbygillot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.