TL;DR: It would be cool if all CLI apps supported JSON output, but in the meantime we can use jc

  • hallettj@beehaw.org
    link
    fedilink
    English
    arrow-up
    7
    ·
    11 months ago

    And there is also Nushell and similar projects. Nushell has a concept with the same purpose as jc where you can install Nushell frontend functions for familiar commands such that the frontends parse output into a structured format, and you also get Nushell auto-completions as part of the package. Some of those frontends are included by default.

    As an example if you run ps you get output as a Nushell table where you can select columns, filter rows, etc. Or you can run ^ps to bypass the Nushell frontend and get the old output format.

    Of course the trade-off is that Nushell wants to be your whole shell while jc drops into an existing shell.