noahgorstein / jqp Goto Github PK
View Code? Open in Web Editor NEWA TUI playground to experiment with jq
License: MIT License
A TUI playground to experiment with jq
License: MIT License
It would be useful to be able to specify the query via the command line and have the query input pre-populated with the query, and the results applying the query.
My example use case is that I'm using jq
to run queries and view them on the command line. It would be handy to easily switch to jqp
to have the results displayed in jqp
instead.
I realise I could just pipe data through jq before jqp (eg. jq 'my query' | jqp
) but it would be helpful for the query to be passed in too.
So something like:
curl "http://mydomain.com" | jqp 'my query'
Thanks.
It would be nice if you can output the results to stdout. This way you can use it in a pipe, for example:
jqp <file.json | rg 'something' | vipe >output
I personally like the vulcan
theme, except that the KeywordConstant
token uses a grey background.
The ability to override specific parts of a theme in the config file would be nice.
There is a map of TokenType
to string
in chroma, which can be used in combination with a chroma.StyleBuilder
to override specific parts.
For the configuration, I propose a subkey to the theme:
, like overrides:
. For example:
theme: "vulcan"
overrides:
- "kc": "#CF5967"
- "nf": "#FFFFFF bold"
The quick.Highlight
function only supports the chroma style name, so it can't be used with customized styles, but the function itself is only about 28 lines of code (less if we hardcode lexer
and formatter
), so it's feasible to copy it and allow it to take a chroma.Style
directly (the change is also just removing 3 lines).
I'm thinking about
launching test on PR
launching golangci-lint on PR
checking typos (avoid corrective PR like #59)
dependabot to make sure dependencies are up to date, but also that github actions are also kept up to date
Hi there,
this is a nice tool, very similar to @gpanders/ijq which I've been using so far. The main difference (and why I'll be continuing to use ijq
for now) is that ijq
continually evaluates the expression, not just on Enter
. This allows iterating, playing and trying things faster.
Maybe this is something you'd consider having as well? If not as default mode then at least with a hotkey for switching?
Thanks for writing this tool! ๐
It would be really useful to be able to copy the query to clipboard so that I can share the query with others. At the moment, I can't highlight the query and tmux select doesn't work either.
Hello,
Thank you for providing a wonderful tool that I use almost every day! This is a very minor thing, but it would be great if jqp
could somehow disable the cursor blinking when the terminal window it's running in does not have focus. My jqp
workflow frequently involves toggling between multiple windows on multiple screens and when I see a blinking cursor my brain immediately thinks that window has focus and I'll start typing and entering jqp
things that are actually going elsewhere (text editors, web browsers, company Slack channels ๐คฆโโ๏ธ , etc.).
Not sure if this is an upstream bubbletea
thing, but it would be great to have if possible. Thanks again!
would be great if this had persisted history! .jqp_history
like a zsh/bash session
Thanks for the great tool!
I think it would be very helpful for users like me, who are not familiar with jq syntax and do many tries and experiments searching for solving their issues.
It would be great if I can select a previously executed query from the dropdown and have the ability to edit it and execute it again.
Since you're so great implementing my requested features I've got another one for you hahaha ๐
Would be cool to have a tiny cheatsheet built-in with common operations, when you press a hotkey for help.
You could maybe implement this by just rendering a markdown file with all the options, not sure if there is something fancy like that in this go lib. But I think it would be a quick win.
Would be nice to have a hotkey to save the query in the clipboard, so I can use it in my scripts.
Maybe one with the full (escaped) command, and one with just the query.
jq
can easily handle streams of json objects:
{}
{}
{}
They can for example be wrapped into list with [inputs]
, where inputs
is a keyword for input stream.
It would be great if jqp
could load such streams like jq
does. For now it fails with an error of invalid JSON.
Here it says ".jqp" (without extension)
, but in the help it says .jqp.yaml
Hi,
It would make jqp
more convenient if it could handle jsonl file aka one json per line.
Love that we have another interactive jq client, thank you for developing it. I was wondering if you'd consider vi mode in the editor input box? In other words, just like one has the ability to switch from the default (emacs) mode on the (*nix) command line to vi mode. See https://readline.kablamo.org/vi.html for background. I'm not sure how many folks use vi mode on the command line, but I do, and it makes things so much faster and more efficient for me, and would be amazing to have that same experience when constructing and editing filters in jqp.
Thanks!
Hello,
The project makes life so much easier, thanks.
I just want to know if for Ubuntu/Debian Distros should we only make
the jqp or it is also possible to install it via package managers?
Best
Steps to reproduce:
Type just a simple query .
Press Ctrl+a to jump to the beginning
Try to type map
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.