All Projects β†’ bradwood β†’ Glsnip

bradwood / Glsnip

Licence: mit
copy and paste across machines

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Glsnip

Lab
Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
Stars: ✭ 911 (+751.4%)
Mutual labels:  cli, snippets, gitlab
Reviewdog
🐢 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+4143.93%)
Mutual labels:  cli, gitlab
code-examples-manager
Software tool to manage your notes and code examples, to publish them as gists or snippets
Stars: ✭ 26 (-75.7%)
Mutual labels:  snippets, gitlab
Release It
πŸš€ Automate versioning and package publishing
Stars: ✭ 4,773 (+4360.75%)
Mutual labels:  cli, gitlab
Tox
Command line driven CI frontend and development task automation tool.
Stars: ✭ 2,523 (+2257.94%)
Mutual labels:  cli, gitlab
Cgx
πŸ’»πŸ”₯CLI to generate the recommended documentation/files to improve contribution (Github, Gitlab, CodeCommit and Bitbucket)
Stars: ✭ 190 (+77.57%)
Mutual labels:  cli, gitlab
Gitlab Time Tracker
πŸ¦ŠπŸ•˜ A command line interface for GitLab's time tracking feature.
Stars: ✭ 371 (+246.73%)
Mutual labels:  cli, gitlab
Git Chglog
CHANGELOG generator implemented in Go (Golang).
Stars: ✭ 1,895 (+1671.03%)
Mutual labels:  cli, gitlab
Git Req
Check out merge requests from your GitLab/GitHub hosted repositories from the command line with just the request number.
Stars: ✭ 50 (-53.27%)
Mutual labels:  cli, gitlab
Glab
An open-source GitLab command line tool bringing GitLab's cool features to your command line
Stars: ✭ 1,126 (+952.34%)
Mutual labels:  cli, gitlab
Cistern
A terminal UI for Unix to monitor Continuous Integration pipelines from the command line. Current integrations include GitLab, Azure DevOps, Travis CI, AppVeyor and CircleCI.
Stars: ✭ 161 (+50.47%)
Mutual labels:  cli, gitlab
Git Copy History
Copy commit history from another repository
Stars: ✭ 84 (-21.5%)
Mutual labels:  cli, gitlab
Tsrc
Manage groups of git repositories
Stars: ✭ 154 (+43.93%)
Mutual labels:  cli, gitlab
Gitlab Cli
Create a merge request from command line in gitlab
Stars: ✭ 224 (+109.35%)
Mutual labels:  cli, gitlab
The Way
A command line code snippets manager
Stars: ✭ 132 (+23.36%)
Mutual labels:  cli, snippets
Corgi
Corgi is a command-line workflow manager that helps with your repetitive command usages by organizing them into reusable snippet
Stars: ✭ 365 (+241.12%)
Mutual labels:  cli, snippets
Go Gitlab Client
A Go gitlab API client & powerful CLI written in Go
Stars: ✭ 107 (+0%)
Mutual labels:  cli, gitlab
Git Repo
Git-Repo: CLI utility to manage git services from your workspace
Stars: ✭ 818 (+664.49%)
Mutual labels:  cli, gitlab
Navi
An interactive cheatsheet tool for the command-line
Stars: ✭ 10,055 (+9297.2%)
Mutual labels:  cli, snippets
Lab
lab is a cli client of gitlab like hub
Stars: ✭ 94 (-12.15%)
Mutual labels:  cli, gitlab

Go Report Card Go Release Coverage Status

glsnip logo

Copy-paste across machines using GitLab Snippets as a storage backend.

This is a simple CLI tool inspired by the usability of pbcopy and pbpaste or xclip but designed to work across machines.

Installation

If you have Go installed go get github.com/bradwood/glsnip.

Alternatively, you can download a binary from the Releases page

Configuration

You can configure glsnip via a configuration file or via environment variables. Environment variables will always override configuration file settings.

Configuration file

Create a YAML-formatted config file (default location $HOME/.glsnip). You must include at least a single server profile YAML block called default, like this:

---
default:
  gitlab_url: https://url.of.gitlab.server/
  token: USERTOKEN
  clipboard_name: glsnip
...

Multiple additional server profile blocks can be added using any block name, like this:

...
work:
  gitlab_url: https://url.of.work.server/
  token: USERTOKENWORK
  clipboard_name: glsnip
...

You may also specify an alternative location for the configuration file with the --config flag.

Environment variables

Instead of using a configuration file, you may set environment variables by prefixing the key in a configuration file block with GLSNIP_ and then converting all alphabetic characters to UPPERCASE. Note that environment variables will override any configuration specified in the configuration file, regardless of the profile specified. You may specify a server profile by setting GLSNIP_PROFILE.

You can set environment variables as follows:

export GLSNIP_GITLAB_URL=https://gitlab.com
export GLSNIP_TOKEN=xxxx

Security & Privacy

It goes without saying, be careful what you chose to copy, especially to public services like gitlab.com. Reasonable security can be achieved by using TLS (https) when defining your gitlab_url and relying on glsnip defaulting to GitLab's private visibility level which will create a snippet that only you can see.

You may override the visibility setting by passing the --visibility flag when copying but this must be explicitly passed on every invocation. GitLab defines the public and internal visibility levels, both of which will work with glsnip, but note this issue if you are wanting to use the internal option on public gitlab.com

Usage

To specify a non-default server profile use the --profile flag.

Copying examples:

glsnip copy <some_file.txt
glsnip copy --profile work <some_file.txt  # copy to Snippet at on "work" GitLab server
ls | glsnip copy
ls | GLSNIP_GITLAB_URL=https://blah.com GLSNIP_TOKEN=xxx glsnip copy

Pasting examples:

glsnip paste   # paste to STDOUT
glsnip paste > myfile.txt
glsnip paste --profile public > myfile.txt  # paste from public GitLab server
glsnip paste | less

Contributions

Contributions are welcome, please feel free to raise a PR or issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].