Giter Club home page Giter Club logo

jqp's People

Contributors

ccoveille avatar dependabot[bot] avatar emilygraceseville7cf avatar herbygillot avatar itchyny avatar ktprograms avatar lagerfeuer avatar mluna-again avatar nerg4l avatar nilock avatar noahgorstein avatar noahmayr avatar rvictorino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jqp's Issues

Ability to specify query via command line

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.

Layout problem

I use brew to install jqp
Although it can query as normal, but it shows like that.

image

Machine information:
MacOS: Sonoma 14.0
2.3 GHz 4 cores Intel Core i5

iTerm2: Build 3.4.21
jqp version: v0.5.0

Thanks

Output results to stdout

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

RFC: Configurable Chroma theme overrides

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).

Array not parsed correctly

I noticed that sometimes arrays aren't formatted correctly but when you grab one element it works just fine. Also, when the json isn't able to be parsed the output indicator also shows NaN%
image
image

Please consider adding more GitHub actions

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

Feature Request: Continuous evaluation

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! ๐Ÿ™‚

Copy query to clipboard

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.

Feature request: disable cursor blink when terminal window does not have focus

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!

Feature request. Implement session history of executed queries

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.

Feature Request: Tiny cheatsheet with examples built-in

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.

Input file does not has to be valid JSON and should not error

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.

Support for jsonl

Hi,
It would make jqp more convenient if it could handle jsonl file aka one json per line.

Feature request: vi mode in the editor input box

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!

Debian based release candidate

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

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.