GithubHelp home page GithubHelp logo

gist-1's Introduction

Gist

A command-line tool for publishing gists, inspired by icholy/gist.

Usage

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

In the next release...

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

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"

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.

gist-1's People

Contributors

oz avatar jakeswenson avatar spk avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.