Snippet 0.1.0

GitLab snippets are useful, but hard to use effectivally as often that means that the content supposed to be a snippet needs to be copied from the location to the snippets interface.

This means you’d need a session there and browse to the right page, check the default settings, past the form and submit. I found that at the moment I really wanted to make a snippet this was a hurdle and sometimes just gave up.

To remedy this, I’ve created snippet. A CLI tool that posts whatever is piped into it, as snippet. The output consists of the URL on which the snippet now is reachable. Simple.

$ snippet -h
Usage of snippet:
    	Set the visibilty level to internal
    	Set the visibilty level to private
  -token string
    	Token if not using the ~/.gitlab-token file
    	Print version and exit

$ cat | snippet

The requirement for this to work is that you have an access token which is exposed either as contents of ~/.gitlab-token or passed in with the -token flag.

Installing requires go and is done through go install!