Our great sponsors
jq | nushell | |
---|---|---|
50 | 212 | |
28,806 | 29,485 | |
3.6% | 4.0% | |
9.4 | 9.9 | |
2 days ago | 7 days ago | |
C | Rust | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
jq
-
I turned my open-source project into a full-time business
I think like you. But also, one does not necessarily know beforehand that they will want to make money.
Like a project could be born out of pure generosity, but after the happy initial phase the project might get too heavy on the maintenance requirements, causing the author to approach burnout, and possibly deciding that they want to make money to continue pulling the cart forward.
However, here's something I do think: if you create something as Open Source, it should be out of a mentality of goodwill and for the greater good, regardless of how it ends up being used. OSS licenses do mean this with their terms. If you later get tired or burned out, you should just retire and allow the community to keep taking care of it. Just like it happened with the Jq tool [1].
-
Essential Command Line Tools for Developers
Official Documentation: jqlang.github.io/jq
View on GitHub
-
Command line tools I always install on Ubuntu servers
To handle JSON files and JSON outputs in a script or format and highlight it, jq can be very handy. Many command line tools provide a json output, so you don't have to write a custom parser for a table a list in a terminal. Instead of that, you can use jq to get a specific value from the output or even modify the output. For more information, you can visit https://jqlang.github.io/jq/
-
How I use Nix in my Elm projects
In some projects I've wanted to use HTTPie to test APIs and jq to work with some JSON data. Nix has been really helpful in managing those dependencies that I can't easily get from npm.
-
Gooey: Turn almost any Python command line program into a full GUI application
> I'd love to see programs communicate through a typed JSON/proto format that shed enough details to make this more independent, and get useful shell command structuring/completion or full blown GUIs from simply introspecting the expected input and output types.
You should try PowerShell. It's basically Microsoft's .NET ecosystem molded into an interactive command line. I'm not entirely sure if PoweShell can make full use of the static types that build up its core, but its ability to exchange objects in the command line is almost unmatched.
On Linux you can use `jc` (https://github.com/kellyjonbrazil/jc) combined with `jq` (https://jqlang.github.io/jq/) to glue together command lines.
-
To a Man with `Jq`, Everything Looks Like JSON
Yeah, but muscle memory bites me all the time and I put the backslash on the closing paren, too, because I'm so used to the regex usage of that syntax which needs them to match
I also want to draw the reader's attention to the magic of |@uri <https://github.com/jqlang/jq/blob/jq-1.7/docs/content/manual...> for a bunch of cases, but doubly so in TFA's case where they're plugging strings into a URI context. Simple string concat often works great for "hello world", but the world is not always just hello, so one quick use of the filter and jq's got your back
echo "the world's scary" | jq -Rr '"\(.)"'
-
Jaq – A jq clone focused on correctness, speed, and simplicity
I think the original devs just got burnt out for a while https://github.com/jqlang/jq/issues/2305#issuecomment-157263...
jq 1.7 do preserve large integers but will truncate if any operation is done on them. Unfortunetly it currently truncates to a decimal64 which is a bit confusing, this will be fixed in next release where it follow the suggestion from the JSON spec and truncates to binary64 (double) https://github.com/jqlang/jq/pull/2949
The fact that jq takes almost a second to run on a Pi is crazy[0]. And the tool is written in C.
nushell
- Xonsh: Python-powered, cross-platform, Unix-gazing shell
-
Fish shell 3.7.0: last release branch before the full Rust rewrite
Any thoughts on fish as compared to nushell [0]? It's similar to PowerShell in its philosophy and is also written in Rust.
That or https://www.nushell.sh/ which seems to be more interesting as it could be an equivalent to PowerShell for Unix.
-
jc: Converts the output of popular command-line tools to JSON
> In PowerShell, structured output is the default and it seems to work very well.
PowerShell goes a step beyond JSON, by supporting actual mutable objects. So instead of just passing through structured data, you effectively pass around opaque objects that allow you to go back to earlier pipeline stages, and invoke methods, if I understand correctly: https://learn.microsoft.com/en-us/powershell/module/microsof....
I'm rather fond of wrappers like jc and libxo, and experimental shells like https://www.nushell.sh/. These still focus on passing data, not objects with executable methods. On some level, I find this comfortable: Structured data still feels pretty Unix-like, if that makes sense? If I want actual objects, then it's probably time to fire up Python or Ruby.
Knowing when to switch from a shell script to a full-fledged programming language is important, even if your shell is basically awesome and has good programming features.
-
Ripgrep is faster than {grep, ag, Git grep, ucg, pt, sift}
Maybe if the "popular" shells, but http://www.nushell.sh/ is looking better and better
- "<ESC>[31M"? ANSI Terminal security in 2023 and finding 10 CVEs
-
jq 1.7 Released
Yeah agreed, especially now that PowerShell is available cross-platform.
Nushell[1] also seems like a promising alternative, but I haven’t had a chance to play with it yet.
-
The Case for Nushell
I also discovered an existing discussion[1] related to this topic which includes a link[2] to a "helper to call nushell nuon/json/yaml commands from bash/fish/zsh" and a comment[3] that the current nushell dev focus is "on getting the experience inside nushell right and [we] probably won't be able to dedicate design time to get the interface of native Nu commands with an outside POSIX shell right and stable.".
[0] https://gitlab.com/RancidBacon/notes_public/-/blob/main/note...
[1] "Expose some commands to external world #6554": https://github.com/nushell/nushell/issues/6554
[2] https://github.com/cruel-intentions/devshell-files/blob/mast...
[3] https://github.com/nushell/nushell/issues/6554#issuecomment-...
Today I learned (after disappearing down a rabbit hole after reading the linked article) that it's actually possible to begin to use & benefit from nushell's structured data pipe feature without changing one's current shell.
Structured data pipes have always been my primary reason for keeping an eye on nushell's development but after looking at the project's documentation again today it all still seemed "too much initial effort with uncertain outcome".
Because I don't want to switch my shell (not because bash is good but because it's not a priority to justify the expenditure of effort), I just want to have structured data in pipes within bash!
Turns out it's as easy as:
* nu --commands 'ls | where size > 1MiB'
(Where `nu` is the nushell binary being called from your existing shell prompt.)
Or, as more complete flow of data example:
* echo "[1,2,3]" | nu --stdin --commands 'from json | to json' | cat
Now you can fit nushell within your existing workflow where ever it's useful enough for you--without needing to commit to changing your entire shell.
(And this isn't the only or necessarily the best way to arrange things for the communication with bash--there's "^" & "externals" & "command signatures" & "from ssv" etc too.)
And nushell does have some nifty tools such as `explore` with `:try` to interactively build a processing pipeline.
But this information doesn't seem to be documented anywhere in the "book" or other introductory material. It only seems to be documented in the help message of the `nu` binary--which I almost didn't even get as far downloading today.
But then I found the help text in the source, so decided to try it again: https://github.com/nushell/nushell/blob/fd4ba0443d01e67f6304...
If the structured data pipes is one of the main appeals for you, maybe try this approach out?
What are some alternatives?
fish-shell - The user-friendly command line shell.
elvish - Powerful scripting language & Versatile interactive shell
starship - ☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
yq - Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
PowerShell - PowerShell for every system!
alacritty - A cross-platform, OpenGL terminal emulator.
xonsh - :shell: Python-powered, cross-platform, Unix-gazing shell.
volta - Volta: JS Toolchains as Code. ⚡
oil - Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
jq - Command-line JSON processor [Moved to: https://github.com/jqlang/jq]
nvim-nu - Basic editor support for the nushell language
ion - Mirror of https://gitlab.redox-os.org/redox-os/ion