Search code examples
shellgithubgist

How do I pipe something from the command line to a new Github gist?


I don't know if this exists yet, but I'd love to be able to do:

$ cat mygist.js | gh new gist

And have it return the URL (and possibly copy it to the clipboard / open it in the browser).


Solution

  • Try this gem: https://github.com/defunkt/gist

    Worked for me ^_^