Crates.io | gist |
lib.rs | gist |
version | 0.9.2 |
source | src |
created_at | 2016-04-15 07:06:33.576551 |
updated_at | 2024-05-09 22:11:14.648318 |
description | A simple Github Gist client |
homepage | |
repository | https://github.com/oz/gist |
max_upload_size | |
id | 4757 |
size | 33,793 |
A command-line tool for publishing gists, inspired by icholy/gist.
Publish a single file, read from stdin:
cat notes.md | gist
Set a file name with -f
:
cat error.log | gist -f "weird-bug.log"
Make a public Gist with -p
:
cat file.sh | gist -p
Make a single gist with multiple files, preserving their names:
gist src/*.rs
I want the Gist's URL copied to my clipboard, when it's done:
# *nix / X.org
echo stuff | gist | xclip
# mac
echo something | gist | pbcopy
Show me a brief list of public gists:
gist -l
... or for a single user:
gist -l some_login
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):
gist https://gist.github.com/oz/123478097
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:
export GITHUB_TOKEN="blah blah blah"
# or
export GITHUB_GIST_TOKEN="blah blah blah"
Or you can place it in the global configuration file (~/.gist/config.json
):
{
"gist_token": "blah blah blah"
}
To use with Github Enterprise, set the env. var
GITHUB_GIST_API_ENDPOINT
to your private Gist API endpoint.
MIT.
Yes please: file issues, or better send patches and pull-requests.