{"id":22180666,"url":"https://github.com/jftuga/sqs_clipboard","last_synced_at":"2025-07-26T17:32:22.647Z","repository":{"id":64303532,"uuid":"314655294","full_name":"jftuga/sqs_clipboard","owner":"jftuga","description":"Use AWS SQS as a clipboard to copy and paste across different systems and platforms","archived":false,"fork":false,"pushed_at":"2020-12-08T12:38:13.000Z","size":1636,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-06-20T10:11:51.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jftuga.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-20T19:53:23.000Z","updated_at":"2024-02-03T21:02:08.000Z","dependencies_parsed_at":"2023-01-15T10:01:04.485Z","dependency_job_id":null,"html_url":"https://github.com/jftuga/sqs_clipboard","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fsqs_clipboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fsqs_clipboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fsqs_clipboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fsqs_clipboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jftuga","download_url":"https://codeload.github.com/jftuga/sqs_clipboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227700373,"owners_count":17806365,"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":"2024-12-02T09:19:04.757Z","updated_at":"2024-12-02T09:19:14.445Z","avatar_url":"https://github.com/jftuga.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sqs_clipboard\nUse [AWS SQS](https://aws.amazon.com/sqs/) as a clipboard to copy and paste across different systems and platforms. Clipboard contents are encrypted in transit and at rest.\n\nBinaries for Windows, MacOS, and Linux can be found on the [Releases Page](https://github.com/jftuga/sqs_clipboard/releases).\n___\n\n**Description**\n\nThis set of programs can be used to *copy* and *paste* clipboard text by using an [AWS SQS FIFO Queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html) as an intermediary. To minimize the amount of data transferred, the contents are compressed with the `XZ` algorithm before sending to the SQS queue via `sqscopy` and then decompressed upon arrival via `sqspaste`.  A maximum of `256 KB` of compressed *(and then encoded)* data can be sent to the queue.\n\n**NOTE:** There can be a small AWS cost when using this program.  Each copy / paste operation uses 3 SQS requests, plus the data transferred associated with `sqspaste` and `sqspastesmallfile`.  See [Amazon SQS pricing](https://aws.amazon.com/sqs/pricing/) for more details.\n\n**Programs**\n\n* `sqscopy` - send the system clipboard contents to a user-defined AWS SQS FIFO queue\n* `sqspaste` - get the queue contents and then place it onto the system clipboard\n* `sqspurge` - remove all entries from the queue\n* `sqscopysmallfile` - copy a small file to the queue with file name given on command line\n* * after XZ compression and base 91 encoding, the resulting file size must be less than 256 KB\n* `sqspastesmallfile` - retrieve a file from the queue\n* * **will overwrite** an existing file with the same name\n* * file name is stored in the queue along with the file\n* * no command line arguments needed\n\n**AWS Queue Creation**\n\n* Open the [Amazon SQS Console](https://console.aws.amazon.com/sqs/v2/home)\n* Make sure to create a `fifo` queue instead of a `standard` queue\n* * The name of your queue should end in `.fifo`\n* Set the `Receive message wait time` aka *long polling* to at least `12` seconds\n* **Note:** Do **not** check: `Content-based deduplication`, otherwise you will **not** be able to copy the exact same contents with a 5 minute interval.\n* Send / Receive Access: `Only the queue owner`\n* Encryption: Optional, but recommended\n* * Data key reuse period: `1 hour`\n* * A shorter time period provides better security, but results in more calls to AWS KMS, which might incur charges after Free Tier.\n\n**AWS Queue Creation - Automation**\n\n* Please review these scripts before running them and make any adjustments as needed:\n* * [Windows](create_stack.ps1)\n* * [Linux, MacOS](create_stack.sh)\n* Both of these scripts use [cloud_formation_template.json](cloud_formation_template.json)\n\n**AWS IAM Permissions**\n\n* Make sure to change the `Resource` value listed below.\n\n```json\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"VisualEditor0\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"sqs:DeleteMessage\",\n                \"sqs:GetQueueUrl\",\n                \"sqs:ChangeMessageVisibility\",\n                \"sqs:PurgeQueue\",\n                \"sqs:ReceiveMessage\",\n                \"sqs:DeleteQueue\",\n                \"sqs:SendMessage\",\n                \"sqs:GetQueueAttributes\",\n                \"sqs:ListQueueTags\",\n                \"sqs:CreateQueue\" \n            ],\n            \"Resource\": \"arn:aws:sqs:region:account-id:QueueName.fifo\"\n        }\n    ]\n}\n```\n\n**Setting Environment Variables**\n\n* The `SQS_CLIPBOARD_URL` environment variable should be set to URL of your SQS `FIFO` Queue\n* * This URL can be found on the AWS SQS Dashboard for the queue that you have created\n* [How to set environment variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html#envvars-set)\n\n**Setting Configuration File**\n* For Windows and MacOS, you might want to set the `SQS_CLIPBOARD_URL` value in a configuration file instead of using environment variable.\n* This will allow you to launch the programs from the *Windows Taskbar* or *MacOS Dock*.\n* To do this you will need to create this file:\n* * Windows: `%HOMEPATH%\\.aws\\sqs_clipboard`\n* * MacOS: `${HOME}/.aws/sqs_clipboard`\n\nFile format:\n\n```ini\n[default]\nSQS_CLIPBOARD_URL=https://sqs.region.amazonaws.com/account-id/queuename.fifo\n```\n\n___\n\n**Compilation**\n\n* Install [GoReleaser](https://goreleaser.com/)\n* Run: `goreleaser build --rm-dist --snapshot`\n* There should now be 5 resulting binaries found in the `dist` directory:\n* * sqscopy\n* * sqspaste\n* * sqspurge\n* * sqscopysmallfile\n* * sqspastesmallfile\n\nYou can also create a *Mac App* by running [mac_app_builder.sh](cmd/mac_app_builder.sh)\n\n___\n\n**Windows Icons Used**\n\n* [Button Upload Icon](https://www.iconarchive.com/show/soft-scraps-icons-by-hopstarter/Button-Upload-icon.html)\n* [Button Download Icon](https://www.iconarchive.com/show/soft-scraps-icons-by-hopstarter/Button-Download-icon.html)\n* [Email Delete Icon](https://www.iconarchive.com/show/soft-scraps-icons-by-hopstarter/Email-Delete-icon.html)\n\n**Bundling Icons**\n\n* `Cross Platform`\n* [a cross platform Go library to place an icon and menu in the notification area](https://github.com/getlantern/systray)\n* `Windows`\n* [How do you set the application icon in golang?](https://stackoverflow.com/questions/25602600/how-do-you-set-the-application-icon-in-golang)\n* * [goversioninfo](https://github.com/josephspurrier/goversioninfo)\n* `Mac`\n* [Packaging a Go application for macOS](https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5)\n* * [Distribute your Go program (or any single binary) as a native macOS application](https://gist.github.com/mholt/11008646c95d787c30806d3f24b2c844)\n* * [Go library to create menubar apps- programs that live only in OSX's NSStatusBar](https://github.com/caseymrm/menuet)\n\n**AWS Resources**\n* https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html\n* https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-cli-creating-stack.html\n* https://docs.aws.amazon.com/cli/latest/reference/cloudformation/describe-stacks.html\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Fsqs_clipboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjftuga%2Fsqs_clipboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Fsqs_clipboard/lists"}