adds a basic CLI#12
Conversation
|
this has some very rough edges, for instance if the JSONpath is nonsense in some way it panics. it also doesn't respond with exit codes. so consider this a starting point. |
|
I like the idea of a Is this something you'd like to keep working on? |
|
Given the time and space, I'd love to work on it AND make it something more polished than this. I don't think it's nearly release-ready. But at present I wrote it purely to unblock myself on a work task and I'm not sure when I'd personally be able to come back to it. I don't mind if this doesn't get merged in, my fork unblocks me for now and I wouldn't want to introduce such a kluge upstream unless there were immediate plans to fix it up. 👍 |
|
Having written the above, it occurs to me a big blocker for me is deciding exactly how someone else's CLI should behave. If you had a think and decided on how you'd like it to work, me or any other contributor are more likely to be able implement it? |
|
I don't have strong feelings about it in advance, no, other than I like short names where possible. My first thought is to mimic how |
I wanted to be able to invoke this on the CLI to extract some data from a folder of JSON files. JQ doesn't implement RFC-9535 yet, so this is the next best thing but had no CLI. I've added a basic one -- define the query, pipe JSON to it via stdin, et voila. Example: