Settings

Theme

Show HN: shortcommand – Easily run a set of commands quickly using a YAML file

github.com

7 points by kermire 3 years ago · 7 comments · 1 min read

Reader

This tiny command line tool was created mainly because I have several apps that I run on my server and finding the right set of commands for deploying an app is a hassle. So this basically documents the set of commands for each of my projects, as well as gives me quick access to them. Just wanted to share it here in case anyone else might find it useful.

broknbottle 3 years ago

Reminds me of just, sake or rucksack.

https://github.com/casey/just

https://github.com/alajmo/sake

https://github.com/acritelli/rucksack

Juminuvi 3 years ago

Neat project! I use a tool called taskfile.dev for managing tasks like this in projects but I've always thought it would be nice to have a more global tool like this.

Right now what I do is write functions and add them to my profile but this leads to adding helper code to do stuff like handle errors, handle vars, printing out index of commends with documentation, etc. This makes my profile just messy so I think a tool like this could come in handy.

  • kermireOP 3 years ago

    Thanks :)

    taskfile.dev looks quite useful for project specific stuff.

inshadows 3 years ago

    #!/bin/bash
    command1
    command2
wow, magic
  • kermireOP 3 years ago

    Haha yes, that works too.

    For clarification. For running a set of commands, one can just use a shell script. This does a little more that. This allows you to have a set of commands under a group and a sub group in a single yaml file, for easy access.

    This is more a centralized shortcut to manage multiple command sets.

    • inshadows 3 years ago

      Check out functions/procedures/subroutines.

      • kermireOP 3 years ago

        You're right. Can't argue with that. In the end, this is just another interface to do the same thing in a different way.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection