2

Lately I've had to write a bunch of CLI tools for repetitive tasks that any team member might run. I've been using normal bash for this, and it's great, but it feels a bit cumbersome when you have to do a lot of prompts and progress indicators. What other language would you suggest? GO would seem like a good candidate.

Comments
  • 5
    I've seen some nice little CLI tools written in Go, PHP, Python, Rust, etc.
    I would advise staying far away from Node, though.
  • 2
    @Jilano node for cli? Shoot me in the face, I'm already falling into a mid life crisis and am pissed if I have to use that bullshit for normal projects
  • 1
  • 4
    @Kimmax Don't ask me! I'm at a point where I'd rather do something manually than install 300MB of dependencies to use a little CLI tool. Not everyone seem to be thinking the same, apparently.

    PS: There's also a full terminal emulator made with Electron if you need one more reason on your suicide note.

    @nitwhiz *points* He told me to.
  • 1
    @Jilano PHP sounds even worse than Node to be fair... But then I'll learn go perhaps
  • 1
    I’ve been doing the same to speed up some process I run at home and been using Python alongside bash,

    only just started to learn Python but seems like there’s not much you can’t do with it
  • 0
    @bigOHNOtation Might be true, but there are other things to dislike with Python. Like fucking indentation and funky error messages
  • 1
    We've used Task for our current helper scripts. AFAIK it uses go as well

    https://taskfile.dev/
  • 0
    @olof I'll keep that in mind! I've actually been looking for an alternative to makefiles
  • 1
    Python because it's already installed everywhere.

    C because it's fast and you can make it as pretty as you want. Cross-platform takes more effort though.

    Ruby because it'll make your life easy -- though i have no idea if there's a good gem for console text graphics.

    Assembly because you want to torture yourself.
  • 1
    Best bash replacement would probably be Python imho, it's still a scripting language and easy to throw together into a working, useful program, and is usually fast *enough*.
Add Comment