snippet

command module
v0.0.0-...-95564c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2019 License: MIT Imports: 8 Imported by: 0

README

Snippet

A terminal based interface to create a new GitLab snippet.

head -n 100 path/to/file | snippet
# => https://gitlab.com/snippets/<id>

Installation

When running Arch Linux, a install the snippet package from the AUR.

Binaries for the releases can be downloaded from the release page.

When Go is installed on your machine, go install gitlab.com/zj/snippet will install the binary to $GOPATH/bin. When added to your $PATH, it can be invoked by executing snippet.

Usage

For authentication access to an access token is required. This token can be either stored in $HOME/.gitlab-token, or passed with the --token flag.

NAME:
   snippet - Pipe to GitLab.com as Snippet

USAGE:
   snippet [global options] command [command options] [arguments...]

VERSION:
   0.4.0

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --file value, -f value        Create a snippet from file on disk instead of piped input
   --permission value, -p value  Set visibility of the snippet, one of: public, internal, or private (default: "public")
   --token value, -t value       Token if not using the $HOME/.gitlab-token file [$GITLAB_TOKEN]
   --host value                  Hostname of a GitLab istance to create the snippet on (default: "https://gitlab.com")
   --help, -h                    show help
   --version, -v                 print the version

License

Documentation

Overview

snippet allows to to create snippets on GitLab.com from STDIN or a file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL