glsnip

command module
v0.0.0-...-9510b4a Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: GPL-2.0 Imports: 1 Imported by: 0

README

glsnip - CLI tool for GitLab Snippets

Features

  • Create snippets
  • Delete snippets
  • Update snippets
  • List snippets

Installation

go install github.com/blufor/glsnip@latest

Make sure you have these ENV variables set-up:

  • GITLAB_URL
  • GITLAB_TOKEN

Usage

The command displays all the parameters:

> glsnip -h
GitLab Snippet CLI util

Usage:
  glsnip [flags]

Flags:
  -D, --delete uint          Delete snippet by its ID
  -d, --description string   description of the snippet
  -h, --help                 help for glsnip
  -i, --internal             internal visibility
  -p, --public               public visibility
  -t, --title string         title for the snippet
      --token string         GitLab authentication token (use GITLAB_TOKEN in ENV)
  -U, --update uint          Update snippet by its ID
      --url string           GitLab URL (use GITLAB_URL in ENV)
Create snippet
From STDIN
uname -a | glsnip -t 
From file

You can upload a single file:

glsnip -t test /proc/cpuinfo

or multiple files:

glsnip -t test /proc/cpuinfo /proc/vmstat
Delete snippet

You can delete your snippet by its ID:

glsnip -D <ID>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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