{"id":13815748,"url":"https://github.com/CleanCocoa/OpenAny","last_synced_at":"2025-05-15T09:33:29.587Z","repository":{"id":211936013,"uuid":"730288108","full_name":"CleanCocoa/OpenAny","owner":"CleanCocoa","description":"macOS app and file launching springboard","archived":false,"fork":false,"pushed_at":"2023-12-13T09:32:59.000Z","size":1336,"stargazers_count":77,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-04T04:09:25.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CleanCocoa.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-11T15:48:09.000Z","updated_at":"2024-07-29T00:20:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"b5078371-8650-4e17-b17b-535f8f33e470","html_url":"https://github.com/CleanCocoa/OpenAny","commit_stats":null,"previous_names":["cleancocoa/openany"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCocoa%2FOpenAny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCocoa%2FOpenAny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCocoa%2FOpenAny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCocoa%2FOpenAny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CleanCocoa","download_url":"https://codeload.github.com/CleanCocoa/OpenAny/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225342828,"owners_count":17459484,"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-08-04T04:03:58.996Z","updated_at":"2024-11-19T11:30:56.657Z","avatar_url":"https://github.com/CleanCocoa.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# OpenAny\u003cbr\u003e_Open File X with App Y_ From Anywhere\n\nmacOS app and file launcher for simple scripting.\n\nLaunches, performs its job, then quits. No long-running processes. No clutter in your menu bar!\n\n## Installation\n\n1. Download binary [from latest release](https://github.com/CleanCocoa/OpenAny/releases/latest)\n2. Move to `/Applications` (before launching, so that macOS clears the app's quarantine flags)\u003cbr\u003e\n   \u003cimg src=\"screenshots/dmg.jpeg\" align=\"center\" width=\"444\"\u003e\n3. (To make sure everything works, open the app once, then quit, to register its URL scheme.)\n\nDone!\n\nNow use `openany://` as explained below 🫶 \n\n## Why?\n\nAny app that renders URLs as clickable links can now become your external app or file launchpad.\n\n- 🎉 Create **open-file-with-app links** anywhere!\n- 🌎 Assemble **dashboards** to your projects in your favorite note-taking app!\n\nFor example, you can use this in almost any Markdown editor with syntax highlighting to get a clickable link that will open TextEdit:\n\n```md\n## My favorite stock macOS apps\n\nTextEdit: \u003copenany://app/TextEdit\u003e\n```\n\nThat's a very silly example. Why would you want to launch TextEdit in such a complicated way?\n\nHere's a more complicated example: open a file _with a specific app_, with a link.\n\nThe default `file://` URLs you get from dragging from Finder are also clickable, but they only _reveal_ the file. Opening the file is an extra step. Boo extra steps!!11\n\nHow about embedding a shortcut to edit a file with [TableFlip](https://tableflipapp.com/) and preview with [Marked](https://marked2app.com)?\n\n```md\nPreview:     \u003copenany://app/com.brettterpstra.marked2/view?path=~/document.md\u003e\nEdit Tables: \u003copenany://app/TableFlip/view?path=~/document.md\u003e\n\n... document goes here ...\n```\n\nOpen any app, or any file, or any file in any app!\n\n## Usage\n\nPowered by the `openany://` URL scheme, you can launch apps and open files.\n\nOpen app:\n\n- `openany://app/com.apple.textedit`\u003cbr\u003e\n  launches TextEdit via its bundle identifier. It's a bit cumbersome, so:\n- `openany://app/TextEdit`\u003cbr\u003e\n  launches TextEdit via its app name (not case-sensitive, actuall). That may not always be unique, though. Pick your poison 🙂\n\nOpen file:\n\n- `openany://file/open?path=/path/to/file.txt`\u003cbr\u003e\n  opens `/path/to/file.txt` in your default editor of text files.\n- `openany://file/open?url=file:///path/to/file.txt`\u003cbr\u003e\n  opens `/path/to/file.txt` in your default editor of text files, but using a `file://` URL instead of a path.\n\nOpen files with app:\n\n- `openany://app/TextEdit/view?path=/path/to/file.txt`\u003cbr\u003e\n  opens `/path/to/file.txt` in TextEdit.\n- `openany://app/TextEdit/view?url=file:///path/to/file.txt`\u003cbr\u003e\n  opens `/path/to/file.txt` in TextEdit, but using a `file://` URL instead of a path.\n- `openany://file/openwith/TextEdit?path=/path/to/file.txt`\u003cbr\u003e\n  opens `/path/to/file.txt` in TextEdit.\n- `openany://file/openwith/TextEdit?url=file:///path/to/file.txt`\u003cbr\u003e\n  opens `/path/to/file.txt` in TextEdit, but using a `file://` URL instead of a path.\n\nReveal file: \n\n- `openany://file/reveal?path=/path/to/file.txt`\u003cbr\u003e\n  reveals `/path/to/file.txt` in Finder.\n- `openany://file/reveal?url=file:///path/to/file.txt`\u003cbr\u003e\n  reveals `/path/to/file.txt` in Finder, but using a `file://` URL instead of a path.\n\n## Bonus: How to get an app's bundle ID\n\nYou can drag and drop any app onto the OpenAny application icon to extract its bundle ID.\n\n1. Launch OpenAny directly;\n2. Drag apps from Finder to the OpenAny application icon in your dock;\n3. Copy the bundle ID out of the dialog,\u003cbr\u003e\n   \u003cimg src=\"screenshots/openany_bundle-id.png\" alt=\"Screenshot of the Bundle ID extractor\" width=\"300\"\u003e\n4. then close it (and quit the app).\n\n## Why `file://`?!\n\n### Easy parsing reason\n\nthe `path=` query parameter works best for files without spaces or any other URL-escaped characters.\n\nFor all others, you're better off with a file URL.\n\n### Drag and drop reason\n\nIf you drag files from Finder into some apps, they will insert the `file://` into text field. Could be a text editor, a comment field on a calendar event, a note-taking app, a chat window -- you name it. That's how dropping files on macOS can behave.\n\nYou can delete the `file://` part to get to the path, of course, but then you have all the URL-escpaed special characters (like `%20` instead of spaces).\n\nIt's less annoying to just use the URL by that point. So we do.\n\n## Taxonomy\n\nThe URL scheme is comprised of components like this:\n\n    openany://HOST/SUBJECT[/VERB[/OBJECT[?key1=value1[\u0026key2=value2[...]]]]]\n\nWhen the `HOST` acts as the subject, the pattern becomes: \n\n    openany://HOST/VERB[/OBJECT[?key1=value1[\u0026key2=value2[...]]]]\n\nThe query parameters are called the URL's _payload._\n\n### List of possible `HOST`s\n\n- `app`: Launch an app, identified by `SUBJECT`. That's the bundle identifier.\n- `file`: Open a file specified by the payload\n\n### List of possible `SUBJECT` patterns\n\n- For the `app` host:\n    - The `SUBJECT` is the app's bundle ID. (Followed by a verb.)\n- For the `file` host:\n    - `reveal` (acting as `VERB` here), see below.\n    - `open` (acting as `VERB` here), see below.\n    - `openwith` (acting as `VERB` here), see below.\n    - `show` (acting as `VERB` here), see below.\n\n### List of possible `VERB`s\n\n- For the `app` host\n    - with `APP_ID` (a bundle identifier or app name) being the `SUBJECT`:\n      - (none): Launches the app. Alias ans shorthand to `launch`.\n      - `launch`: `/app/APP_ID/launch`\n      - `view`: `/app/APP_ID/view` opens a file, specified by the payload, in the app. Alias for `/file/openwith/APP_ID`.\n- For the `file` host:\n    - `reveal`: Reveal a file, specified by the payload, in Finder.\n    - `open`: Open a file, specified by the payload, in the default app.\n    - `openwith`: Open a file, specified by the payload, with the app being the `OBJECT`. Alias for `/app/APP_ID/view`. Example: `openany://file/openwith/com.apple.textedit?path=/path/to/file.txt` opens `/path/to/file.txt` in TextEdit.\n    - `show`: Alias for `reveal`.\n\n### List of possible Payloads\n\nOnly used by file-related actions, the payload keys are:\n\n- `path`: As in `?path=/path/to/file.txt`, using an absolute POSIX path. Expands `~` in the path. Most useful for simple paths without e.g. spaces.\n- `url`: As in `?url=file:///path/to%20a%file/with%20spaces.txt`, using an absolute `file://` URL, e.g. to easil encode special characters.\n\nIf the path or URL point to a directory, Finder will show the directory in a new window. So `/file/open?path=~/Downloads/` is equivalent to /file/reveal?path=~/Downloads/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCleanCocoa%2FOpenAny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCleanCocoa%2FOpenAny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCleanCocoa%2FOpenAny/lists"}