{"id":13495490,"url":"https://github.com/nakabonne/pbgopy","last_synced_at":"2026-04-29T10:10:40.003Z","repository":{"id":38542474,"uuid":"315934293","full_name":"nakabonne/pbgopy","owner":"nakabonne","description":"Copy and paste between devices","archived":false,"fork":false,"pushed_at":"2026-04-29T04:04:35.000Z","size":744,"stargazers_count":817,"open_issues_count":8,"forks_count":30,"subscribers_count":14,"default_branch":"main","last_synced_at":"2026-04-29T05:28:39.127Z","etag":null,"topics":["cli","clipboard","copy-paste","go","golang"],"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/nakabonne.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.txt","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-11-25T12:35:10.000Z","updated_at":"2026-04-07T13:17:14.000Z","dependencies_parsed_at":"2022-08-09T04:23:24.745Z","dependency_job_id":null,"html_url":"https://github.com/nakabonne/pbgopy","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/nakabonne/pbgopy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakabonne%2Fpbgopy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakabonne%2Fpbgopy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakabonne%2Fpbgopy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakabonne%2Fpbgopy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nakabonne","download_url":"https://codeload.github.com/nakabonne/pbgopy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakabonne%2Fpbgopy/sbom","scorecard":{"id":673297,"data":{"date":"2025-08-11","repo":{"name":"github.com/nakabonne/pbgopy","commit":"66749855046bb410362bc37380762968bc35b07e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 3/24 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/lint.yaml:1","Warn: no topLevel permission defined: .github/workflows/release.yaml:1","Warn: no topLevel permission defined: .github/workflows/test.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/nakabonne/pbgopy/lint.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/nakabonne/pbgopy/lint.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/nakabonne/pbgopy/release.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/nakabonne/pbgopy/release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/nakabonne/pbgopy/release.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/nakabonne/pbgopy/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/nakabonne/pbgopy/test.yaml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.3.0 not signed: https://api.github.com/repos/nakabonne/pbgopy/releases/35770281","Warn: release artifact v0.2.1 not signed: https://api.github.com/repos/nakabonne/pbgopy/releases/35203020","Warn: release artifact v0.2.0 not signed: https://api.github.com/repos/nakabonne/pbgopy/releases/34863708","Warn: release artifact v0.1.1 not signed: https://api.github.com/repos/nakabonne/pbgopy/releases/34530321","Warn: release artifact v0.1.0 not signed: https://api.github.com/repos/nakabonne/pbgopy/releases/34524515","Warn: release artifact v0.3.0 does not have provenance: https://api.github.com/repos/nakabonne/pbgopy/releases/35770281","Warn: release artifact v0.2.1 does not have provenance: https://api.github.com/repos/nakabonne/pbgopy/releases/35203020","Warn: release artifact v0.2.0 does not have provenance: https://api.github.com/repos/nakabonne/pbgopy/releases/34863708","Warn: release artifact v0.1.1 does not have provenance: https://api.github.com/repos/nakabonne/pbgopy/releases/34530321","Warn: release artifact v0.1.0 does not have provenance: https://api.github.com/repos/nakabonne/pbgopy/releases/34524515"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0229 / GHSA-cjjc-xp8v-855w","Warn: Project is vulnerable to: GO-2020-0012 / GHSA-ffhg-7mh4-33c4","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T20:50:58.150Z","repository_id":38542474,"created_at":"2025-08-21T20:50:58.150Z","updated_at":"2025-08-21T20:50:58.150Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32420576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","clipboard","copy-paste","go","golang"],"created_at":"2024-07-31T19:01:35.284Z","updated_at":"2026-04-29T10:10:39.997Z","avatar_url":"https://github.com/nakabonne.png","language":"Go","funding_links":[],"categories":["Go","cli","Other","\u003ca name=\"transfer\"\u003e\u003c/a\u003eData transfer","Repositories"],"sub_categories":[],"readme":"# pbgopy\n[![Release](https://img.shields.io/github/release/nakabonne/pbgopy.svg?color=orange\u0026style=flat-square)](https://github.com/nakabonne/pbgopy/releases/latest)\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat-square)](https://pkg.go.dev/mod/github.com/nakabonne/pbgopy?tab=packages)\n\n`pbgopy` acts like [pbcopy/pbpaste](https://www.unix.com/man-page/osx/1/pbcopy/) but for multiple devices. It lets you share data across devices like you copy and paste.\n\n![Demo](assets/demo.gif)\n\n## Installation\nBinary releases are available through [here](https://github.com/nakabonne/pbgopy/releases).\n\n#### macOS\n\n```\nbrew install nakabonne/pbgopy/pbgopy\n```\n\n#### RHEL/CentOS\n\n```\nrpm -ivh https://github.com/nakabonne/pbgopy/releases/download/v0.4.0/pbgopy_0.4.0_linux_amd64.rpm\n```\n\n#### Debian/Ubuntu\n\n```\nwget https://github.com/nakabonne/pbgopy/releases/download/v0.4.0/pbgopy_0.4.0_linux_amd64.deb\napt install ./pbgopy_0.4.0_linux_amd64.deb\n```\n\n#### Arch Linux\n\nAUR package is available: [pbgopy](https://aur.archlinux.org/packages/pbgopy/)\n\n```\nyay pbgopy\n```\n\n#### Nix\n\n```\nnix-shell -p nixpkgs.pbgopy\n```\n\n#### Go\n\n```\ngo install github.com/nakabonne/pbgopy@latest\n```\n\n#### Docker\n\n```\ndocker run --rm nakabonne/pbgopy pbgopy help\n```\n\n## Usage\nFirst up, you start the pbgopy server which works as a shared clipboard for devices. It listens on port 9090 by default.\nYou must allow access to this port for each device you want to share data with.\n\n```bash\npbgopy serve\n```\n\nPopulate the address of the host where the above process is running into the `PBGOPY_SERVER` environment variable. Then put the data entered in STDIN into the server with:\n\n```bash\nexport PBGOPY_SERVER=http://host.xz:9090\npbgopy copy \u003cfoo.png\n```\n\nPaste it on another device with:\n\n```bash\nexport PBGOPY_SERVER=http://host.xz:9090\npbgopy paste \u003efoo.png\n```\n\n## History of copies\n\nTo keep previous copies, start the server with a larger history limit:\n\n```bash\npbgopy serve --history-limit 20\n```\n\nEach successful `copy` creates a new history entry and `paste` still returns the latest entry by default. You can list entries without printing full clipboard contents, paste a specific entry, or delete history:\n\n```bash\n$ pbgopy history\nID                                AGE  TYPE                       SIZE   LATEST  PREVIEW\nfcd0bc9afd9586c4544c377024d4e3b1  4s   text/plain; charset=utf-8  6B     *       \"world\"\nf9db4d7b8befb5d8b86b39e58b695126  9m   image/jpeg                 1.6MB          JPEG image 3144x4192\n\n$ pbgopy paste --id f9db4d7b8befb5d8b86b39e58b695126 \u003efoo.jpg\n```\n\nThe default history limit is `1`, which preserves the existing latest-only behavior. Give `--history-limit 0` for unlimited in-memory history.\n\n## End-to-end encryption\n`pbgopy` comes with a built-in ability to encrypt/decrypt with a variety of keys.\n\n### With symmetric-key:\n\nYou can derive the key from password with the `-p` flag, which is provided so that you can encrypt/decrypt without previous setting.\n```bash\npbgopy copy -p your-password \u003cplaintext.txt\n```\n\n```bash\npbgopy paste -p your-password\n```\n\nBe aware that this way cannot prevent a dictionary attack.\n\nFor more safety, it is highly recommended to use a 32-bytes symmetric key generated by other methods.\nThe `-k` flag or the `PBGOPY_SYMMETRIC_KEY_FILE` environment variable is available to indicate the path to key file.\n\n```bash\npbgopy copy -k /path/to/pbgopy.key \u003cplaintext.txt\n```\n\n### With public/private key-pair:\n`pbgopy` can also encrypt using hybrid cryptosystem. If you have already exchanged public keys between devices you want to share data with, this is the way to go.\n\n```bash\npbgopy copy --public-key-file /path/to/public.key \u003cplaintext.txt\n```\n\n```bash\npbgopy paste --private-key-file /path/to/private.key \u003cplaintext.txt\n```\n\nNote that you can only use an RSA key in PEM or DER format.\n\n#### Via GPG\nYou manage your keyring in GPG? The `--gpg-user-id` (`-u`) flag is for you!\nSuppose you want to encrypt with a public key whose user id is `alice`:\n\n```bash\npbgopy copy -u alice \u003cplaintext.txt\n```\n\nThen you decrypt it with the private key by specifying the user id on another device:\n\n```bash\npbgopy paste -u alice\n```\n\nThere are a couple of ways to specify a user ID. Visit [here](https://www.gnupg.org/documentation/manuals/gnupg/Specify-a-User-ID.html) to see the entire list.\n\n## TTL\nIf you don't want more data to be cached on the server than necessary, use the `--ttl` flag to set TTL for the cache.\nTTL applies to each history entry, and expired entries are not listed or pasteable.\nGive `0s` for disabling it. Default is `24h`.\n\n```bash\npbgopy serve --ttl 10m\n```\n\n## Authentication\nHTTP Basic Authentication is available with `-a` flag.\n\n```bash\npbgopy serve -a user:pass\n```\n\n```bash\npbgopy copy -a user:pass \u003cfoo.png\n```\n\n```bash\npbgopy paste -a user:pass \u003efoo.png\n```\n\n## From clipboard on your OS\nYou can put the data stored at the clipboard on your OS into pbgopy server.\n\n```bash\npbgopy copy -c\n```\n\n## Command-line options\n\n#### Copy\n```\npbgopy copy -h\nCopy from stdin\n\nUsage:\n  pbgopy copy [flags]\n\nExamples:\n  export PBGOPY_SERVER=http://host.xz:9090\n  echo hello | pbgopy copy\n\nFlags:\n  -a, --basic-auth string           Basic authentication, username:password\n  -c, --from-clipboard              Put the data stored at local clipboard into pbgopy server\n      --gpg-path string             Path to gpg executable (default \"gpg\")\n  -u, --gpg-user-id string          GPG user id associated with public-key to be used for encryption\n  -h, --help                        help for copy\n      --max-size string             Max data size with unit (default \"500mb\")\n  -p, --password string             Password to derive the symmetric-key to be used for encryption\n  -K, --public-key-file string      Path to an RSA public-key file to be used for encryption; Must be in PEM or DER format\n  -k, --symmetric-key-file string   Path to symmetric-key file to be used for encryption\n      --timeout duration            Time limit for requests (default 5s)\n```\n\n#### Paste\n```\npbgopy paste -h\nPaste to stdout\n\nUsage:\n  pbgopy paste [flags]\n\nExamples:\n  export PBGOPY_SERVER=http://host.xz:9090\n  pbgopy paste \u003ehello.txt\n  pbgopy paste --id \u003centry-id\u003e \u003ehello.txt\n\nFlags:\n  -a, --basic-auth string                  Basic authentication, username:password\n      --gpg-path string                    Path to gpg executable (default \"gpg\")\n  -u, --gpg-user-id string                 GPG user id associated with private-key to be used for decryption\n  -h, --help                               help for paste\n      --id string                          History entry id to paste\n      --max-size string                    Max data size with unit (default \"500mb\")\n  -p, --password string                    Password to derive the symmetric-key to be used for decryption\n  -K, --private-key-file string            Path to an RSA private-key file to be used for decryption; Must be in PEM or DER format\n      --private-key-password-file string   Path to password file to decrypt the encrypted private key\n  -k, --symmetric-key-file string          Path to symmetric-key file to be used for decryption\n      --timeout duration                   Time limit for requests (default 5s)\n```\n\n#### History\n```\npbgopy history -h\nList clipboard history\n\nUsage:\n  pbgopy history [flags]\n  pbgopy history [command]\n\nAvailable Commands:\n  clear       Delete all history entries\n  delete      Delete a history entry\n\nExamples:\n  export PBGOPY_SERVER=http://host.xz:9090\n  pbgopy history\n  pbgopy history --json\n  pbgopy history delete \u003centry-id\u003e\n  pbgopy history clear\n\nFlags:\n  -a, --basic-auth string   Basic authentication, username:password\n  -h, --help                help for history\n      --json                Output history metadata as JSON\n      --timeout duration    Time limit for requests (default 5s)\n```\n\n#### Serve\n```\npbgopy serve -h\nStart the server that acts like a clipboard\n\nUsage:\n  pbgopy serve [flags]\n\nExamples:\npbgopy serve --port=9090 --ttl=10m --history-limit=20\n\nFlags:\n  -a, --basic-auth string     Basic authentication, username:password\n  -h, --help                  help for serve\n      --history-limit int     Number of clipboard entries to retain. Give 0 for unlimited history (default 1)\n  -p, --port int              The port the server listens on (default 9090)\n      --ttl duration          The time that the contents is stored. Give 0s for disabling TTL (default 24h0m0s)\n```\n\n## Inspired By\n- [nwtgck/piping-server](https://github.com/nwtgck/piping-server)\n- [bradwood/glsnip](https://github.com/bradwood/glsnip)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnakabonne%2Fpbgopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnakabonne%2Fpbgopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnakabonne%2Fpbgopy/lists"}