{"id":24873901,"url":"https://github.com/beeender/richclip","last_synced_at":"2025-10-15T17:31:12.360Z","repository":{"id":271401684,"uuid":"904781070","full_name":"beeender/richclip","owner":"beeender","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-24T11:21:26.000Z","size":80,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T01:41:37.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/beeender.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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}},"created_at":"2024-12-17T14:40:55.000Z","updated_at":"2025-01-24T11:21:28.000Z","dependencies_parsed_at":"2025-01-08T21:33:28.308Z","dependency_job_id":null,"html_url":"https://github.com/beeender/richclip","commit_stats":null,"previous_names":["beeender/richclip"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeender%2Frichclip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeender%2Frichclip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeender%2Frichclip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeender%2Frichclip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeender","download_url":"https://codeload.github.com/beeender/richclip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236625416,"owners_count":19179131,"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":[],"created_at":"2025-02-01T06:19:23.450Z","updated_at":"2025-10-15T17:31:12.354Z","avatar_url":"https://github.com/beeender.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# richclip - Command line clipboard utility for multiple platforms\n\n`richclip` is created for [richclip.nvim](https://github.com/beeender/richclip.nvim)\nwhich intends to copy rich text format of source code from neovim with\nhighlights to the system clipboard. But it can also be used as a standalone\ncommand line utility as an alternative to [xclip](https://github.com/astrand/xclip),\n[xsel](https://github.com/astrand/xclip), [wl-clipboard](https://github.com/bugaevc/wl-clipboard)\nor other command line clipboard tools.\n\n- Supports Multiple environments. Xorg, Wayland and macOS are supported by the current\n  version. Windows is planned.\n- Recognizes the environment automatically, and choose the right clipboard to\n  use.\n- Supports multiple content with different mime-types simultaneously. A typical\n  use case is to have the plain source code with mime-type `text/plain` and\n  highlighted HTML format code with mime-type `text/html` copied, so the client\n  can choose the preferred content type to paste.\n\n## Installing\n\n### Arch Linux\n\nInstall `richclip` from the [AUR](https://aur.archlinux.org/packages/richclip).\n\n### macOS \u0026 Other Linux Distributions\n\nDownload the static linked binary from the [release page](https://github.com/beeender/richclip/releases).\n\n### Windows\n\nNot supported yet\n\n## Usage\n\n### Paste\n\n```\n❯ richclip paste --help\nPaste the data from clipboard to the output\nUsage: richclip paste [OPTIONS]\nOptions:\n  -l, --list-types        List the offered mime-types of the current clipboard only without the contents\n  -t, --type \u003cmime-type\u003e  Specify the preferred mime-type to be pasted\n  -p, --primary           Use the 'primary' clipboard\n  -h, --help              Print help\n```\n\n### Copy\n\n```\n❯ richclip copy --help\nReceive and copy data to the clipboard\nUsage: richclip copy [OPTIONS]\n\nOptions:\n  -p, --primary             Use the 'primary' clipboard\n      --foreground          Run in foreground\n      --one-shot            Enable one-shot mode, anything received from stdin will be copied as it is\n  -t, --type [\u003cmime-type\u003e]  Specify mime-type(s) to copy and implicitly enable one-shot copy mode\n  -h, --help                Print help\n```\n\n#### Bulk mode copy\n\nBy default, `richclip` receives data in bulk mode. In this mode, multiple formats\nof data can be copied to the clipboard with multiple mime-types. This allows\nthe paste side to choose the favorite format of data to use.\n\nThe data to be copied to the clipboard needs to follow a simple protocol which\nis described as below.\n\n| Item             | Bytes    | Content             |\n|------------------| :------- | :------------------ |\n| Magic            | 4        | 0x20 0x09 0x02 0x14 |\n| Protocol Version | 1        | 0x00                |\n| Section Type     | 1        | 'M'                 |\n| Section Length   | 4        | 0x00 0x00 0x00 0x0a |\n| Section Data     | 10        | \"text/plain\"        |\n| Section Type     | 1        | 'M'                 |\n| Section Length   | 4        | 0x00 0x00 0x00 0x04 |\n| Section Data     | 4        | \"TEXT\"              |\n| Section Type     | 1        | 'C'                 |\n| Section Length   | 4        | 0x00 0x00 0x00 0x09 |\n| Section Data     | 9        | \"SOME Data\"         |\n| Section Type     | 1        | 'M'                 |\n| Section Length   | 4        | 0x00 0x00 0x00 0x09 |\n| Section Data     | 9        | \"text/html\"         |\n| Section Type     | 1        | 'C'                 |\n| Section Length   | 4        | 0x00 0x00 0x00 0x09 |\n| Section Data     | 9        | \"HTML code\"         |\n\n- Every section starts with the section type, `M` (mime-type) or `C` (content).\n- Before `C` section, there must be one or more `M` section to indicate the data type.\n- Section length will be parsed as big-endian uint32 number.\n\n#### One-shot mode copy\n\nThis is the traditional way to copy data like other clipboard utilities. The\nmime-types can be specified through the command line, and all data received\nthrough `stdin` will be copied as it is.\n\n```bash\n# Copy \"TestData\" to the clipboard, with default mime-type\necho TestData | richclip copy --one-shot\n\n\n# Copy \"\u003cbody\u003eHaha\u003c/body\u003e\" to the clipboard, as \"text/html\" and \"HTML\"\necho \"\u003cbody\u003eHaha\u003c/body\u003e\" | richclip copy --type \"text/html\" --type \"HTML\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeender%2Frichclip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeender%2Frichclip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeender%2Frichclip/lists"}