Gist
A command-line tool for publishing gists, inspired by icholy/gist.
Usage
Publish a single file, read from stdin:
|
Set a file name with -f
:
|
Make a public Gist with -p
:
|
Make a single gist with multiple files, preserving their names:
I want the Gist's URL copied to my clipboard, when it's done:
# *nix / X.org
| |
# mac
| |
Show me a brief list of public gists:
... or for a single user:
BTW, did you know that Github gists are also git repositories? You can
get a local copy of a gist by passing its URL (this uses git clone
behind the scenes):
Installation
Installation currently requires cargo, just cargo install gist
.
For authentication, the program requires an environment variable called
GITHUB_GIST_TOKEN
or GITHUB_TOKEN
. It is mandatory as Github killed
anonymous Gists in 2018.
You can generate one at: https://github.com/settings/tokens
Then append it to your .profile
, or something with:
# or
Or you can place it in the global configuration file (~/.gist/config.json
):
Github Enterprise
To use with Github Enterprise, set the env. var
GITHUB_GIST_API_ENDPOINT
to your private Gist API endpoint.
License
MIT.
Hacking & bug reports
Yes please: file issues, or better send patches and pull-requests.