{"id":13583084,"url":"https://github.com/phuctm97/jxax","last_synced_at":"2025-04-06T18:31:53.129Z","repository":{"id":103597475,"uuid":"249951296","full_name":"phuctm97/jxax","owner":"phuctm97","description":"💻 JavaScript for Automation (JXA) Extensions Kit \u0026 CLI automate macOS setup, configuring preferences, personalization, etc.","archived":true,"fork":false,"pushed_at":"2020-10-18T04:22:54.000Z","size":3280,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-05T23:41:27.672Z","etag":null,"topics":["cli","javascript","javascript-for-automation","jxa","macos","macos-setup","osascript","osx","osx-setup"],"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/phuctm97.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-03-25T10:41:32.000Z","updated_at":"2024-07-05T00:50:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"11d883d9-ee82-4dfc-afc5-d9ec1d92e137","html_url":"https://github.com/phuctm97/jxax","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phuctm97%2Fjxax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phuctm97%2Fjxax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phuctm97%2Fjxax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phuctm97%2Fjxax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phuctm97","download_url":"https://codeload.github.com/phuctm97/jxax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247531045,"owners_count":20953884,"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":["cli","javascript","javascript-for-automation","jxa","macos","macos-setup","osascript","osx","osx-setup"],"created_at":"2024-08-01T15:03:14.823Z","updated_at":"2025-04-06T18:31:51.533Z","avatar_url":"https://github.com/phuctm97.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003c!-- Title, summary and bagges --\u003e\n\u003ch1 align='center'\u003e\n  \u003cbr/\u003e\n  \u003cimg src='docs/assets/logo.svg' alt='Logo'/\u003e\n  \u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n  JXA Extensions Kit \u0026 CLI\n  \u003cbr/\u003e\n\u003c/h1\u003e\n\u003cp align='center'\u003e\n  JavaScript for Automation (JXA) Extensions Kit \u0026 CLI automate macOS setup, configuring preferences,\n  personalization, etc.\n  \u003cbr/\u003e\u003cbr/\u003e\n  \u003cimg src='https://img.shields.io/github/workflow/status/deskp/jxax/CI' alt='build'/\u003e\n  \u003cimg src='https://img.shields.io/github/v/release/deskp/jxax?label=latest%20release' alt='latest release'/\u003e\n  \u003cimg src='https://img.shields.io/github/license/deskp/jxax' alt='license'/\u003e\n  \u003cimg src='https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb' alt='code-style-airbnb'/\u003e\n  \u003cimg src='https://badgen.net/badge/code%20style/prettier/ff69b4?icon=https%3A%2F%2Fico.now.sh%2Fprettier%2Ffff' alt='code-style-prettier'/\u003e\n\u003c/p\u003e\n\n---\n\n![Demo][demo-gif]\n\n---\n\n## Installation\n\nThe easiest way to use JXAX is to install it using our `install.sh`. Running the following command\ndownloads the `jxax` CLI and `JXAX` scripting library into your `usr/local/bin` and\n`~/Library/Script Libraries` respectively:\n\n```bash\n$ /bin/zsh -c \"$(curl -fsSL https://raw.githubusercontent.com/deskp/jxax/master/scripts/install.sh)\"\n```\n\n## Usage\n\n### Option 1: Configure in YAML and run with `jxax` CLI\n\n`jxax` CLI allows you to write, store and run your workflows as YAML files, enables writing\nworkflows once and running them many times at many places, which automation is all about.\n\n\u003e JXAX's workflows are relatively similar to but simpler than CI/CD workflows.\n\n#### Configure your workflow in YAML\n\nHere is the configuration used in the GIF demo you see above:\n\n```yaml\njobs:\n  - uses: sysprefs.configureGeneral\n    args:\n      appearance: dark\n      accentColor: blue\n      highlightColor: blue\n      sidebarIconSize: small\n      autoHideMenuBar: false\n      showScrollBars: auto\n      clickScrollBar: jumpToNextPage\n      defaultWebBrowser: Google Chrome.app\n      askWhenClosingDocuments: true\n      closeWindowsWhenQuittingApp: true\n      recentItems: 0\n      allowHandoff: true\n      useFontSmoothing: true\n  - uses: sysprefs.configureDock\n    args:\n      size: 0.25\n      magnification: false\n      magnificationSize: 0\n      location: left\n      minimizeEffect: genie\n      preferTabsWhenOpeningDocuments: inFullScreenOnly\n      doubleClickTitleBar: zoom\n      minimizeToAppIcon: false\n      animate: true\n      autohide: true\n      showOpenIndicators: true\n      showRecentApps: false\n  - uses: sysprefs.configureMissionControl\n    args:\n      autoRearrangeSpaces: false\n      switchSpaceWhenSwithToApp: true\n      groupWindowsByApp: false\n      displaysHaveSeparateSpaces: true\n      missionControlKeyShortcut: \"[control][up]\"\n      appWindowsKeyShortcut: \"[control][down]\"\n      showDesktopKeyShortcut: F12\n  - uses: sysprefs.configureSpotlight\n    args:\n      searchResults:\n        - Applications\n        - System Preferences\n        - Calculator\n        - Conversion\n        - Definition\n        - Contacts\n        - Movies\n        - Music\n        - PDF Documents\n        - Presentations\n        - Spreadsheets\n        - Spotlight Suggestions\n      allowSpotlightInLookup: true\n  - uses: desktops.changePicture\n    args:\n      picture: ~/Pictures/Wallpaper.jpg\n  - uses: desktops.configureScreenSaver\n    args:\n      screenSaver: Brooklyn\n      delayInterval: 5\n      mainScreenOnly: false\n      showClock: true\n```\n\nA workflow has `jobs`, each job `uses` a command with a set of `args` to construct an automation.\nCheck out [Features] to see full list of supported commands.\n\n#### Run your workflow\n\nSimply run the `jxax` CLI with your configured workflow YAML file, either absolute or relative or\nhome (`~`) paths are applicable:\n\n```\n$ jxax your-workflow.yml\n```\n\n### Option 2: Use `JXAX` scripting library in your own script\n\nInstalling JXAX using `install.sh` also installs `JXAX.scpt` scripting library, which enables easy\nintegration your existing applications or scripts:\n\n```js\n// Use in JXA script then run with Script Editor.app or Automator.app or osascript.\nvar jxax = Library(\"JXAX\");\njxax.runCommand(\"desktops.changePicture\", { picture: \"Catalina Rock\" });\n```\n\n```bash\n# Run inline command in shell script.\nosascript -l JavaScript -e '''\nLibrary(\"JXAX\").runCommand(\"desktops.changePicture\", {picture: \"Catalina Rock\"});\n'''\n```\n\n## Features\n\nCurrently, JXAX supports following commands:\n\n| Command                            | Description                                  |\n| ---------------------------------- | -------------------------------------------- |\n| `desktops.changePicture`           | Change current Desktop picture               |\n| `desktops.configureScreenSaver`    | Configure screen saver preferences           |\n| `sysprefs.configureGeneral`        | Configure System Preferences/General         |\n| `sysprefs.configureDock`           | Configure System Preferences/Dock            |\n| `sysprefs.configureMissionControl` | Configure System Preferences/Mission Control |\n| `sysprefs.configureSpotlight`      | Configure System Preferences/Spotlight       |\n\nSee [Commands][commands-file] for the commands' details (arguments and types).\n\n😬We're adding more features constantly. However, the features to be added are dependent on our\nmaintainers' interests. If you'd love to add a feature, feel free to create an issue and submit\na PR! Check out [Contributing][contributing-file] to see how to.\n\n## Contributing\n\nJXAX is designed to be extended by its users and community. Adding an automation to JXAX is easy.\nSo if you've ever used it and wanted to add or added an automation, why don't you create an issue\nor submit a PR, there may be many people out there share interests with you, your contribution is\nvery likely to be highly appreciated! 💚\n\nSee [Contributing][contributing-file].\n\n## License\n\nThis project is licensed under the [MIT License][license-file].\n\nCopyright © 2020 - present, Phuc (Minh) Tran. All rights reserved.\n\n\u003c!-- Badges --\u003e\n\n[version-badge]: https://img.shields.io/github/package-json/v/deskp/jxax\n[build-badge]: https://img.shields.io/github/workflow/status/deskp/jxax/ci\n[license-badge]: https://img.shields.io/github/license/deskp/jxax\n\n\u003c!-- Images --\u003e\n\n[demo-gif]: /docs/assets/demo.gif\n\n\u003c!-- Links --\u003e\n\n[features]: #features\n[commands-file]: /docs/COMMANDS.md\n[license-file]: /LICENSE\n[contributing-file]: /CONTRIBUTING.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphuctm97%2Fjxax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphuctm97%2Fjxax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphuctm97%2Fjxax/lists"}