Skip to main content

Github Gist client allowing for quick uploads via commandline.

Project description


Github Gist client allowing for quick uploads via commandline!

Currently only *nix OSes are supported


Via pip:

pip3 install gistbin


git clone
cd gistbin
pip install .



Because Gistbin uses the GitHub API, authentication is required. This requires a Github Personal Access Token, instructions of where to find and how to generate can be found here. To authenticate, simply run gistbin --login after installing and enter the prompted information. Here is an example:

octocat@octoserv:~$ gistbin --login
Enter GitHub username: octocat
Enter GitHub access token: ****************
Keyfile saved.

The key file is saved at $HOME/.gistbin/auth.json.


To use, simply pipe the file you want to upload into Gistbin like so:

octocat@octoserv:~$ cat hello_world.rb | gistbin

By default, the gist that you upload is given a random name and a .txt extension with a blank description. You can edit this later on the gist's webpage, or you can also pass the --name and --desc to add a name and description respectively. You can also use the shortcut parameters, -n and -d.

octocat@octoserv:~$ cat test.cs | gistbin -n "test.cs"

If you don't want others to see your gist, and you just want it for your eyes only, you can pass --private or -p.

octocat@octoserv:~$ cat private.txt | gistbin -n "private.txt" -p

If you want to get the raw url for the uploaded file, such as if you want to then download the file immediately onto another machine, you can pass the -r or --raw argument.

octocat@octoserv:~$ cat | gistbin -n "" -r

You can also get the instructions for all of these commands with the help flag:

octocat@octoserv:~$ gistbin -h
usage: gistbin [-h] [-n NAME] [-v] [-d DESC] [--login] [-p] [-r]

A commandline tool for GitHub Gists.

optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Gives your gist a name. Input as a string. Default is
  -v, --verbose         Enables verbose output.
  -d DESC, --desc DESC  Gives your gist a description. Input as a string.
  --login               Login to GitHub Gists.
  -p, --private         Sets your Gist to private so only those with the link
                        can see.
  -r, --raw             Makes Gistbin return the raw URL instead of the HTML
                        URL of the file.

Gistbin doesn't just work with cat you can pipe any terminal output (that ends) into it! For example, if you wanted to list all the files in a directory, you could use ls -1 | gistbin -n "filelist.txt". If you wanted to get all the logs from yesterday from the journal, you could run journalctl --since yesterday | gistbin -n "yesterday-today-journal.log". The possibilities are endless!


  • Windows Support.
  • Multi-file uploads.
  • Some more stuff probably.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gistbin-0.2.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

gistbin-0.2.0-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page