{"id":21911551,"url":"https://github.com/xwmx/pb","last_synced_at":"2025-04-16T04:39:42.120Z","repository":{"id":57321142,"uuid":"45162657","full_name":"xwmx/pb","owner":"xwmx","description":"A tiny wrapper combining pbcopy \u0026 pbpaste in a single command.","archived":false,"fork":false,"pushed_at":"2023-06-27T23:51:44.000Z","size":47,"stargazers_count":25,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-16T10:32:17.374Z","etag":null,"topics":["bash","clipboard","command-line","copy-paste","pasteboard","pbcopy","pbpaste"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/xwmx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["xwmx"],"custom":"https://paypal.me/WilliamMelody"}},"created_at":"2015-10-29T05:39:49.000Z","updated_at":"2024-06-19T10:36:18.000Z","dependencies_parsed_at":"2024-08-23T04:01:51.412Z","dependency_job_id":"c8e27f9f-5289-483a-8581-7c6db2e9e5e0","html_url":"https://github.com/xwmx/pb","commit_stats":{"total_commits":63,"total_committers":1,"mean_commits":63.0,"dds":0.0,"last_synced_commit":"a9c766f444b621cc44ae5028b39995f49f877140"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fpb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fpb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fpb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fpb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwmx","download_url":"https://codeload.github.com/xwmx/pb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226574367,"owners_count":17653621,"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":["bash","clipboard","command-line","copy-paste","pasteboard","pbcopy","pbpaste"],"created_at":"2024-11-28T18:06:39.722Z","updated_at":"2024-11-28T18:06:40.343Z","avatar_url":"https://github.com/xwmx.png","language":"Shell","funding_links":["https://github.com/sponsors/xwmx","https://paypal.me/WilliamMelody"],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://github.com/xwmx/pb/actions\" rel=\"nofollow\"\u003e\n  \u003cimg  src=\"https://img.shields.io/github/actions/workflow/status/xwmx/pb/tests.yml?branch=master\"\n        alt=\"Build Status\"\n        style=\"max-width:100%;\"\u003e\n\u003c/a\u003e\n\n```text\n           __\n    ____  / /_\n   / __ \\/ __ \\\n  / /_/ / /_/ /\n / .___/_.___/\n/_/\n```\n\n# pb\n\nA tiny wrapper combining `pbcopy` \u0026amp; `pbpaste` in a single command.\n\nCopy to or paste from the macOS / OS X clipboard / pasteboards. With no\ninput, `pb` prints the current contents of the clipboard to stdout using the\n`pbpaste` command. When input is passed via stdin or an argument, `pb` acts as\na wrapper for `pbcopy`, which in the simplest case means that it replaces the\nclipboard contents with the input. `pb` also includes a `pb --clear` flag\nto easily clear the macOS clipboard.\n\n```bash\n# save the string \"Example text.\" to the clipboard\n\u003e pb \"Example text.\"\n\n# print the clipboard contents\n\u003e pb\nExample text.\n\n# save the string \"Example piped text.\" to the clipboard\n\u003e echo \"Example piped text.\" | pb\n\n# print the clipboard contents\n\u003e pb\nExample piped text.\n\n# clear the clipboard contents\n\u003e pb --clear\nPasteboards / Clipboard cleared.\n```\n\n## Installation\n\n### Homebrew\n\nTo install with [Homebrew](http://brew.sh/):\n\n```bash\nbrew tap xwmx/taps\nbrew install pb\n```\n\n### npm\n\nTo install with [npm](https://www.npmjs.com/package/pb.sh):\n\n```bash\nnpm install -g pb.sh\n```\n\n### bpkg\n\nTo install with [bpkg](http://www.bpkg.io/):\n\n```bash\nbpkg install xwmx/pb\n```\n\n### Manual\n\nTo install manually, simply add the `pb` script to your `$PATH`. If\nyou already have a `~/bin` directory, you can use the following command:\n\n```bash\ncurl -L https://raw.github.com/xwmx/pb/master/pb \\\n  -o ~/bin/pb \u0026\u0026 chmod +x ~/bin/pb\n```\n\n## Usage\n\n```text\nUsage:\n  pb [-pboard {general | ruler | find | font}] [-Prefer {txt | rtf | ps}]\n  pb \u003cinput\u003e [-pboard {general | ruler | find | font}]\n  pb --clear\n  pb --version\n  pb -h | --help\n\nOptions:\n  --clear    Clear the contents of all pasteboards.\n  -pboard    Specify the pasteboard to copy to or paste from.\n             Default: general\n  -Prefer    Specify what type of data to look for in the pasteboard first.\n  --version  Print the current program version.\n  -h --help  Show this screen.\n\nExamples:\n  pb \"Example text.\"          Copy data specied with an argument.\n  echo \"Example text.\" | pb   Copy piped data.\n  pb                          Print contents of the clipboard / pasteboard.\n\nMore information:\n  Run `man pbcopy` or `man pbpaste`.\n```\n\n## Background and Terminology\n\nmacOS refers to the clipboard as the pasteboard. There are multiple\npasteboards, with \"general\" as the default that is used when no\npasteboard is specified. The \"general\" pasteboard is also used in\n[Universal Clipboard](https://support.apple.com/en-us/HT209460).\n\nClipboard / Pasteboard Developer Documentation:\n- [Pasteboard | Apple Developer Documentation Archive\n  ](https://developer.apple.com/library/archive/documentation/General/Devpedia-CocoaApp-MOSX/Pasteboard.html)\n- [NSPasteboard | Apple Developer Documentation\n  ](https://developer.apple.com/documentation/appkit/nspasteboard#//apple_ref/doc/c_ref/NSPasteboard)\n- [NSPasteboardName | Apple Developer Documentation\n  ](https://developer.apple.com/documentation/appkit/nspasteboardname)\n\n## Tests\n\nTo run the test suite, install [Bats](https://github.com/sstephenson/bats) and\nrun `bats test` in the project root.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwmx%2Fpb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwmx%2Fpb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwmx%2Fpb/lists"}