Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Run commands directly from github gists.


Assuming you put scripts into ${HOME}/bin:

curl -ks | sh

Configure a command

Let's run the Gist:

First, create a symlink to it.

SCRIPT=nicerobot/1623040/raw/ ${HOME}/bin/ginln

That didn't download the file. It only creates a symbolic link. The benefit (and danger) is that, now, with each execution of ${HOME}/bin/gin-shtest, the file will be pulled from github. e.g.

Test the command

The symbolic link that was created above can be executed just like any other command line script.

${HOME}/bin/gin-shtest gin
Hello, gin!
  • Note how script-links are created without extensions. The extension is important to gin but it isn't important to you so it's left off.

What happened?

Look at the source for on GitHub.

Basically, what just happened is:

curl -ks | sh -s gin
  1. Fetch the file from GitHub: curl -ks
  2. Pipe the script to sh
  3. Pass in the parameter "gin": -s gin

That's it.

You can run gin scripts within other scripts. Even call other gin scripts from within gin scripts. It's simply a shell script (almost) like any other.

Possible Uses

Imagine a GitHub-centralized configuration utility for your local computing environment. For example, i want to always share the same homebrew installation. I can write a Gist that lits all the packages to install. I can write a gin that reads it and runs the update. I can even write a gin that keeps all my gin symlinks consistent across machines.

It works for python too

SCRIPT=nicerobot/1623040/ ${HOME}/bin/ginln

Test the command

Hello, gin!


Link to specific versions of scripts which you know are safe.

Configure commands

To be secure, it's a good idea to link to a specific commit to ensure that someone doesn't change the file out from under you. It's possible with gin like so:

curl -ks \
| SCRIPT=nicerobot/1623040/raw/1ac7c67efbca6db651e15f319e3cad5eaa86e656/ sh
Hello, gin, from an old commit!

As seen, the SCRIPT= value is simply the link to the file. Include a specific commit and it's locked to that file.

curl -ks \
| SCRIPT=nicerobot/1623040/raw/21c07ed06a5ba0160d0918beb4cd83b82021abf3/ sh
Hello, gin!


gist bin - run a gist directly from github, like a locally installed binary.




No releases published


No packages published


You can’t perform that action at this time.