{"id":13438152,"url":"https://github.com/mptre/yank","last_synced_at":"2026-10-19T11:49:19.407Z","repository":{"id":39917540,"uuid":"41288520","full_name":"mptre/yank","owner":"mptre","description":"Yank terminal output to clipboard","archived":false,"fork":false,"pushed_at":"2026-07-16T18:26:13.000Z","size":167,"stargazers_count":1715,"open_issues_count":2,"forks_count":48,"subscribers_count":21,"default_branch":"master","last_synced_at":"2026-10-04T08:49:38.184Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/mptre.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-08-24T07:23:17.000Z","updated_at":"2026-09-27T04:52:56.000Z","dependencies_parsed_at":"2022-07-19T08:29:48.179Z","dependency_job_id":null,"html_url":"https://github.com/mptre/yank","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/mptre/yank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mptre%2Fyank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mptre%2Fyank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mptre%2Fyank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mptre%2Fyank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mptre","download_url":"https://codeload.github.com/mptre/yank/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mptre%2Fyank/sbom","scorecard":{"id":663180,"data":{"date":"2025-08-11","repo":{"name":"github.com/mptre/yank","commit":"aef4e2fc47bcf5a9391ada3254dbe4ab3b17f2f4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"Code-Review","score":1,"reason":"Found 4/30 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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.3.0 not signed: https://api.github.com/repos/mptre/yank/releases/69761668","Warn: release artifact v1.2.0 not signed: https://api.github.com/repos/mptre/yank/releases/19222814","Warn: release artifact v1.1.0 not signed: https://api.github.com/repos/mptre/yank/releases/13781329","Warn: release artifact v1.0.0 not signed: https://api.github.com/repos/mptre/yank/releases/12802117","Warn: release artifact v0.8.3 not signed: https://api.github.com/repos/mptre/yank/releases/9860295","Warn: release artifact v1.3.0 does not have provenance: https://api.github.com/repos/mptre/yank/releases/69761668","Warn: release artifact v1.2.0 does not have provenance: https://api.github.com/repos/mptre/yank/releases/19222814","Warn: release artifact v1.1.0 does not have provenance: https://api.github.com/repos/mptre/yank/releases/13781329","Warn: release artifact v1.0.0 does not have provenance: https://api.github.com/repos/mptre/yank/releases/12802117","Warn: release artifact v0.8.3 does not have provenance: https://api.github.com/repos/mptre/yank/releases/9860295"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 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"}}]},"last_synced_at":"2025-08-21T16:53:12.814Z","repository_id":39917540,"created_at":"2025-08-21T16:53:12.814Z","updated_at":"2025-08-21T16:53:12.814Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38356429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-07-31T03:01:03.269Z","updated_at":"2026-10-19T11:49:19.396Z","avatar_url":"https://github.com/mptre.png","language":"C","funding_links":[],"categories":["C","Utilities","Tools","\u003ca name=\"copy-paste\"\u003e\u003c/a\u003eCopy/paste and clipboard","Other","\\*nix/\\*nux"],"sub_categories":["System Interaction Utilities","C","Terminal"],"readme":"# yank\n\nYank terminal output to clipboard.\n\n![yank](https://raw.githubusercontent.com/mptre/yank/gh-pages/screencast.gif)\n\n## Description\n\nThe\n[yank(1)][yank]\nutility reads input from `stdin` and display a selection interface that allows a\nfield to be selected and copied to the clipboard.\nFields are either recognized by a regular expression using the `-g` option or by\nsplitting the input on a delimiter sequence using the `-d` option.\n\nUsing the arrow keys will move the selected field.\nThe interface supports several Emacs and Vi like key bindings,\nconsult the man page for further reference.\nPressing the return key will invoke the yank command and write the selected\nfield to its `stdin`.\nThe yank command defaults to\n[xsel(1)][xsel]\nbut could be anything that accepts input on `stdin`.\nWhen invoking yank,\neverything supplied after the `--` option will be used as the yank command,\nsee examples below.\n\n## Motivation\n\nOthers including myself consider it a cache miss when resort to using the mouse.\nCopying output from the terminal is still one of the few cases where I still use\nthe mouse.\nSeveral terminal multiplexers solves this issue,\nhowever I don't want to be required to use a multiplexer but instead use a\nterminal agnostic solution.\n\n## Examples\n\n- Yank an environment variable key or value:\n\n  ```sh\n  $ env | yank -d =\n  ```\n\n- Yank a field from a CSV file:\n\n  ```sh\n  $ yank -d \\\", \u003cfile.csv\n  ```\n\n- Yank a whole line using the `-l` option:\n\n  ```sh\n  $ make 2\u003e\u00261 | yank -l\n  ```\n\n- If `stdout` is not a terminal the selected field will be written to `stdout`\n  and exit without invoking the yank command.\n  Kill the selected PID:\n\n  ```sh\n  $ ps ux | yank -g [0-9]+ | xargs kill\n  ```\n\n- Yank the selected field to the clipboard as opposed of the default primary\n  clipboard:\n\n  ```sh\n  $ yank -- xsel -b\n  ```\n\n## Installation\n\n### Arch Linux\n\n```sh\n$ pacman -S yank\n```\n\n### Debian\n\n```sh\n$ sudo apt-get install yank\n```\n\nThe binary is installed at `/usr/bin/yank-cli` due to a naming conflict.\n\n### Fedora\n\nVersions 24/25/26/Rawhide:\n\n```sh\n$ sudo dnf install yank\n```\n\nThe binary is installed at `/usr/bin/yank-cli` due to a naming conflict.\nMan-pages are available as both `yank` and `yank-cli`.\n\n### Nix/NixOS\n\n```sh\n$ nix-env -i yank\n```\n\n### openSUSE\n\n```\n$ zypper install yank\n```\n\n### macOS via Homebrew\n\n```sh\n$ brew install yank\n```\n\n### macOS via MacPorts\n\n```sh\n$ sudo port install yank\n```\n\n### FreeBSD\n\n```sh\n$ pkg install yank\n```\n\n### OpenBSD\n\n```sh\n$ pkg_add yank\n```\n\n### From source\n\nThe install directory defaults to `/usr/local`:\n\n```sh\n$ make install\n```\n\nChange the install directory using the `PREFIX` variable:\n\n```sh\n$ make PREFIX=DIR install\n```\n\nThe default yank command can be defined using the `YANKCMD` variable.\n\n- macOS users would prefer `pbcopy(1)`:\n\n  ```sh\n  $ make YANKCMD=pbcopy\n  ```\n\n- Using `shcopy(1)` allows the selected field to be synchronized with the\n  clipboard on your local machine when using yank over SSH or in headless\n  environments.\n\n  ```sh\n  $ make YANKCMD=shcopy\n  ```\n\n## License\n\nCopyright (c) 2015-2026 Anton Lindqvist.\nDistributed under the MIT license.\n\n[xsel]: http://www.vergenet.net/~conrad/software/xsel/\n[yank]: https://www.basename.se/yank/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmptre%2Fyank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmptre%2Fyank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmptre%2Fyank/lists"}