{"id":13615324,"url":"https://github.com/bradwood/glsnip","last_synced_at":"2025-04-15T06:13:40.994Z","repository":{"id":44914151,"uuid":"314079561","full_name":"bradwood/glsnip","owner":"bradwood","description":"copy and paste across machines","archived":false,"fork":false,"pushed_at":"2022-01-18T23:42:40.000Z","size":6649,"stargazers_count":109,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T06:13:35.211Z","etag":null,"topics":["cli","copy-paste","gitlab","snippets"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bradwood.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-18T23:02:22.000Z","updated_at":"2024-07-09T07:31:20.000Z","dependencies_parsed_at":"2022-08-30T11:41:27.520Z","dependency_job_id":null,"html_url":"https://github.com/bradwood/glsnip","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradwood%2Fglsnip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradwood%2Fglsnip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradwood%2Fglsnip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradwood%2Fglsnip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradwood","download_url":"https://codeload.github.com/bradwood/glsnip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016638,"owners_count":21198833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","copy-paste","gitlab","snippets"],"created_at":"2024-08-01T20:01:11.935Z","updated_at":"2025-04-15T06:13:40.971Z","avatar_url":"https://github.com/bradwood.png","language":"Go","funding_links":[],"categories":["Go","Tools"],"sub_categories":["Video Conference","Satellite"],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/bradwood/glsnip)](https://goreportcard.com/report/github.com/bradwood/glsnip)\n![Go](https://github.com/bradwood/glsnip/workflows/Go/badge.svg)\n![Release](https://github.com/bradwood/glsnip/workflows/Release/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/bradwood/glsnip/badge.svg)](https://coveralls.io/github/bradwood/glsnip)\n\n![glsnip logo](.github/glsnip-logo.png?raw=true)\n\nCopy-paste across machines using [GitLab\nSnippets](https://docs.gitlab.com/ee/user/snippets.html) as a storage backend.\n\nThis is a simple CLI tool inspired by the usability of `pbcopy` and `pbpaste` or `xclip`\nbut designed to work across machines.\n\n## Installation\n\nIf you have Go installed `go get github.com/bradwood/glsnip`.\n\nAlternatively, you can download a binary from the [Releases\npage](https://github.com/bradwood/glsnip/releases)\n\n## Configuration\n\nYou can configure `glsnip` via a configuration file or via environment\nvariables. Environment variables will always override configuration file\nsettings.\n\n### Configuration file\n\nCreate a YAML-formatted config file (default location `$HOME/.glsnip`). You must\ninclude at least a single server profile YAML block called `default`, like this:\n\n```yaml\n---\ndefault:\n  gitlab_url: https://url.of.gitlab.server/\n  token: USERTOKEN\n  clipboard_name: glsnip\n...\n```\n\nMultiple additional server profile blocks can be added using any block name,\nlike this:\n\n```yaml\n...\nwork:\n  gitlab_url: https://url.of.work.server/\n  token: USERTOKENWORK\n  clipboard_name: glsnip\n  project_id: 12345678\n...\n```\n\nIf you set the project_id in a server profile, a project-based Gitlab Snippet\nAPI will be used.\n\nYou may also specify an alternative location for the configuration file with the\n`--config` flag.\n\n### Environment variables\n\nInstead of using a configuration file, you may set environment variables by\nprefixing the key in a configuration file block with `GLSNIP_` and then converting\nall alphabetic characters to UPPERCASE. Note that environment variables will\noverride any configuration specified in the configuration file, regardless of\nthe profile specified. You may specify a server profile by setting\n`GLSNIP_PROFILE`.\n\nYou can set environment variables as follows:\n```shell\nexport GLSNIP_GITLAB_URL=https://gitlab.com\nexport GLSNIP_TOKEN=xxxx\n```\n\n## Security \u0026 Privacy\nIt goes without saying, be careful what you chose to copy, especially to public\nservices like gitlab.com. Reasonable security can be achieved by using TLS\n(https) when defining your `gitlab_url` and relying on `glsnip` defaulting to\nGitLab's `private` visibility level which will create a snippet that only you\ncan see.\n\nYou may override the visibility setting by passing the `--visibility` flag when\ncopying but this must be explicitly passed on every invocation. GitLab defines\nthe `public` and `internal` visibility levels, both of which will work with\n`glsnip`, but note [this\nissue](https://gitlab.com/gitlab-org/gitlab/-/issues/12388) if you are wanting\nto use the `internal` option on public gitlab.com\n\n## Usage\n\nTo specify a non-`default` server profile use the `--profile` flag.\n\nCopying examples:\n```shell\nglsnip copy \u003csome_file.txt\nglsnip copy --profile work \u003csome_file.txt  # copy to Snippet at on \"work\" GitLab server\nls | glsnip copy\nls | GLSNIP_GITLAB_URL=https://blah.com GLSNIP_TOKEN=xxx glsnip copy\n```\n\nPasting examples:\n```shell\nglsnip paste   # paste to STDOUT\nglsnip paste \u003e myfile.txt\nglsnip paste --profile public \u003e myfile.txt  # paste from public GitLab server\nglsnip paste | less\n```\n\n## Contributions\n\nContributions are welcome, please feel free to raise a PR or issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradwood%2Fglsnip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradwood%2Fglsnip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradwood%2Fglsnip/lists"}