Why *not* parse `ls` (and what to do instead)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. PowerShell

    PowerShell for every system!

    PowerShell is so alien to an experienced bash/zsh/etc. user that it's an entirely different language not any kind of drop-in replacement. Its designers also refuse to add simple things to make the switch any easier (e.g. https://github.com/PowerShell/PowerShell/issues/3316).

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. fs

    File system utility library for Clojure (by babashka)

  4. marcel

    A modern shell (by geophile)

    I wrote a pipe-objects-instead-of-strings shell: https://marceltheshell.org.

    Not piping strings avoids this issue completely. Marcel’s ls produces a stream of File objects, which can be processed without worrying about whitespace, EOL, etc.

    In general, this approach avoids parsing the output of any command. You always get a stream of Python values.

  5. csv-nix-tools

    List system information as CSV, manipulate it, pretty print, or export.

  6. jc

    CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.

    the thing with the coreutils is they provide basic core functionality; you dont need bash on your system - `ls` is not bash (and then you still end up with busybox where json still would not be part of ls). add more utilities to your system to do more complex logic; ive used similar apps to this in the past: https://github.com/kellyjonbrazil/jc

    there's also using zero terminiated lines in ls with `--zero`; then piping that to a number of apps which also support similar (read,xargs,ect)

    might also checkout powershell on linux which may suite your needs where instead of string manipulation, everything is a class object

  7. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Xonsh: Python-powered, cross-platform, Unix-gazing shell

    12 projects | news.ycombinator.com | 14 Feb 2024
  • The Case for Nushell

    7 projects | news.ycombinator.com | 30 Aug 2023
  • Looking for a CLI tool that stores reference information / DSLs for other shell commands

    1 project | /r/commandline | 4 Jan 2022
  • Is there a way to save/bookmark often used terminal commands?

    1 project | /r/linuxquestions | 1 Jan 2022
  • Bunster: Compile bash scripts to self contained executables

    7 projects | news.ycombinator.com | 23 Jan 2025