{"id":17717882,"url":"https://github.com/kopischke/jxa-infusion","last_synced_at":"2025-07-13T17:36:05.144Z","repository":{"id":66860632,"uuid":"297389895","full_name":"kopischke/JXA-Infusion","owner":"kopischke","description":"Infuse your JXA scripts with new powers.","archived":false,"fork":false,"pushed_at":"2020-10-21T15:57:35.000Z","size":86,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-04-18T05:00:17.064Z","etag":null,"topics":["jxa","osascript","scripting"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kopischke.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2020-09-21T15:58:23.000Z","updated_at":"2022-07-05T16:13:15.000Z","dependencies_parsed_at":"2023-03-11T00:24:23.006Z","dependency_job_id":null,"html_url":"https://github.com/kopischke/JXA-Infusion","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopischke%2FJXA-Infusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopischke%2FJXA-Infusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopischke%2FJXA-Infusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopischke%2FJXA-Infusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kopischke","download_url":"https://codeload.github.com/kopischke/JXA-Infusion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252929816,"owners_count":21826965,"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":["jxa","osascript","scripting"],"created_at":"2024-10-25T14:31:02.617Z","updated_at":"2025-05-07T17:46:56.738Z","avatar_url":"https://github.com/kopischke.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# JXA\n\nLibraries, both native and runtime injectable, for macOS’ JavasScript for Automation ([JXA](https://developer.apple.com/library/archive/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/OSX10-11.html)) system.\n\n## Contents\n\nThis repository contains two different kind of JXA libraries:\n\n1. **Libraries:** these are native OSA libraries used with `Library()`. They are managed as JXA source code but need to  be compiled with `osacompile` before usage  (see below).\n2. **Injections:** these are libraries extending the JXA object space. You will need the _JXA_ native library to inject them into the JXA runtime. These are used as is.\n\n## Installing the libraries\n\nOSA libraries need to go into a folder recognised by the  `Library()` command on your system (basically [here](https://developer.apple.com/library/archive/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/OSX10-10.html#//apple_ref/doc/uid/TP40014508-CH109-SW14) and, starting from macOS 10.11, [here](https://developer.apple.com/library/archive/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/OSX10-11.html#//apple_ref/doc/uid/TP40014508-CH110-SW10)). The recommended location is the _Script Libraries_ folder in you user _Library_.  \n\nNote the script files in the **Libraries** tree need to be compiled to binary OSA script files before usage. You can either download the releases from Github, which contain the native libraries in  compiled format, or compile them yourself using  `osacompile` as follows:\n\n```shell\nosacompile -l JavaScript -o ~/Library/Script Libraries/\u003cname\u003e.scpt \u003cname\u003e.jxa\n```\n\n**Injections** should be copied to a recognised  location “as is”. The injection mechanism of the _JXA_ library expects plain text files, so do not compile these!\n\n## Using the libraries\n\nThe **libraries**, once compiled and installed as described above, are directly available to the  `Library()` command in your scripts, i.e.\n\n```js\nconst parser = Library('TextParser')\nconst addresses = parser.extractAddresses('Apple, One Apple Park Way, Cupertino, CA 95014.')\n```\n\nThe **injection libraries** need a little two-step:\n\n```js\nconst jxa = Library('JXA')\nvar _p = new Function(jxa.source('Path')); _p(); _p = null\n```\nThis will inject the _Path_ extensions into the `Path` object.\n\n### API\n\nFor the API of the individual libraries (either native or injected), see the [Wiki](https://github.com/kopischke/JXA/wiki#api-documentation).\n\n### Compatibility\n\nAll scripts are written in ES6 conforming JavaScript. Because the JavaScript Core used in the first OS releases to support JXA, macOS 10.10 (*Yosemite*) and macOS 10.11 (*El Capitan)*, did not fully support the ES6 feature set, macOS 10.12 (*Sierra*) or better is required to use the libraries.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkopischke%2Fjxa-infusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkopischke%2Fjxa-infusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkopischke%2Fjxa-infusion/lists"}