{"id":13433888,"url":"https://github.com/epilande/alfred-prettier-clipboard","last_synced_at":"2025-04-12T16:26:08.316Z","repository":{"id":50582972,"uuid":"325372338","full_name":"epilande/alfred-prettier-clipboard","owner":"epilande","description":"🎨 Format code in your clipboard with Prettier","archived":false,"fork":false,"pushed_at":"2022-01-14T19:31:46.000Z","size":10629,"stargazers_count":53,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T10:52:17.696Z","etag":null,"topics":["alfred","alfred-workflow","clipboard","code","format","prettier","workflow"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/epilande.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-12-29T19:40:00.000Z","updated_at":"2025-01-13T15:51:58.000Z","dependencies_parsed_at":"2022-09-11T15:41:58.386Z","dependency_job_id":null,"html_url":"https://github.com/epilande/alfred-prettier-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/epilande%2Falfred-prettier-clipboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epilande%2Falfred-prettier-clipboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epilande%2Falfred-prettier-clipboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epilande%2Falfred-prettier-clipboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epilande","download_url":"https://codeload.github.com/epilande/alfred-prettier-clipboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248595498,"owners_count":21130536,"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":["alfred","alfred-workflow","clipboard","code","format","prettier","workflow"],"created_at":"2024-07-31T02:01:39.442Z","updated_at":"2025-04-12T16:26:08.281Z","avatar_url":"https://github.com/epilande.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eAlfred Prettier Clipboard 🎨\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eFormat code in your clipboard with Prettier\u003c/strong\u003e\u003c/br\u003e\n  \u003cimg src=\"./assets/prettier-clipboard-preview.png\" width=\"530\"\u003e\n\u003c/p\u003e\n\n## Why?\n\nSometimes you're writing code in a textarea where you don't have plugins/extension to automatically format your code.\nRather than manually formatting, you can run prettier on it with this workflow.\n\n## Requirements\n\n- [`node`](https://nodejs.org/) - Node.js JavaScript runtime.\n- [`prettier`](https://prettier.io/) - Opinionated Code Formatter.\n\n## Installation\n\n1. Install dependencies [`node`](https://nodejs.org/) and [`prettier`](https://prettier.io/) (must be installed globally).\n1. Download the Alfred Workflow ([Prettier-Clipboard.alfredworkflow](https://github.com/epilande/alfred-prettier-clipboard/releases/latest/download/Prettier-Clipboard.alfredworkflow)).\n1. Double-click to import into Alfred (requires Powerpack).\n1. Customize prettier with workflow variable `PRETTIER_OPTIONS` or `.prettierrc` (see [configuration](#configuration)).\n\n## Usage\n\n`prettier {parser}` - Run prettier on your clipboard with selected `{parser}`.\n\n## Demo\n\n\u003cimg src=\"./assets/demo.gif\" width=\"600\"\u003e\n\n## Environment variables\n\n| Key                | Default            | Description                                 |\n| ------------------ | ------------------ | ------------------------------------------- |\n| `PRETTIER_OPTIONS` |                    | Options to be passed to `prettier` command. |\n| `PRETTIER_PATH`    | `\"/usr/local/bin\"` | Where to find `prettier`.                   |\n\n## Configuration\n\nTo customize prettier, we can either pass options with environment variables `PRETTIER_OPTIONS` or create a configuration file i.e. `.prettierrc`.\n\n#### `PRETTIER_OPTIONS`\n\nWith `PRETTIER_OPTIONS` we can use the CLI overrides from https://prettier.io/docs/en/options.html.\n\n\u003cimg src=\"./assets/prettier-options.png\" width=\"500\"\u003e\n\n#### Configuration file\n\nPrettier will automatically pick up configuration files, so we can customize prettier by adding a `.prettierrc` file in the workflow directory or globally at `~/.prettierc`.\n\nTo add `.prettierrc` in the workflow directory\n\n1. Go to Alfred workflows, find Prettier Clipboard. You can also do this by typing `?prettier` in Alfred.\n1. Right-click -\u003e Open in terminal. \u003c/br\u003e\n   \u003cimg src=\"./assets/open-in-terminal.png\" width=\"300\"\u003e\n1. Create `.prettierrc` for example: `$ echo '{ \"semi\": false, \"trailingComma\": \"all\" }' \u003e .prettierrc`\n   (see https://prettier.io/docs/en/options.html for available options).\n\n## More workflows\n\n- 🔍 [alfred-browser-tabs](https://github.com/epilande/alfred-browser-tabs) - Search browser tabs from Chrome, Brave, \u0026 Safari.\n- 🤫 [alfred-be-quiet](https://github.com/epilande/alfred-be-quiet) - Workflow to automatically pause audio/video playing.\n- 🔐 [alfred-wifi-password](https://github.com/epilande/alfred-wifi-password) - Get Wi-Fi password from Keychain.\n- 🗝 [alfred-password-generator](https://github.com/epilande/alfred-password-generator) - Workflow to generate passwords.\n\n## License\n\n[MIT License](https://oss.ninja/mit/epilande/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepilande%2Falfred-prettier-clipboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepilande%2Falfred-prettier-clipboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepilande%2Falfred-prettier-clipboard/lists"}