{"id":16863179,"url":"https://github.com/manicmaniac/sips-js-api","last_synced_at":"2025-04-06T20:11:37.110Z","repository":{"id":51103508,"uuid":"370131828","full_name":"manicmaniac/sips-js-api","owner":"manicmaniac","description":"An unofficial documentation of sips's JavaScript API.","archived":false,"fork":false,"pushed_at":"2025-03-15T17:41:33.000Z","size":384,"stargazers_count":96,"open_issues_count":5,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T18:11:12.462Z","etag":null,"topics":["documentation","image-processing","macos","sips"],"latest_commit_sha":null,"homepage":"https://manicmaniac.github.io/sips-js-api/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manicmaniac.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-23T18:44:42.000Z","updated_at":"2025-03-19T19:00:51.000Z","dependencies_parsed_at":"2023-02-16T16:30:54.478Z","dependency_job_id":"6d3fa0ca-7c75-49c2-a4e0-d9c030d38b87","html_url":"https://github.com/manicmaniac/sips-js-api","commit_stats":{"total_commits":105,"total_committers":3,"mean_commits":35.0,"dds":"0.47619047619047616","last_synced_commit":"00ff6879d36be33d9cc28e52dd2c19bf5642edc7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manicmaniac%2Fsips-js-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manicmaniac%2Fsips-js-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manicmaniac%2Fsips-js-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manicmaniac%2Fsips-js-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manicmaniac","download_url":"https://codeload.github.com/manicmaniac/sips-js-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543592,"owners_count":20955865,"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":["documentation","image-processing","macos","sips"],"created_at":"2024-10-13T14:37:57.581Z","updated_at":"2025-04-06T20:11:37.092Z","avatar_url":"https://github.com/manicmaniac.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# sips-js-api\n\nAn unofficial documentation of `sips`'s JavaScript API.\n\nThis documentation is written based on the specification of macOS Monterey.\n\n## What's sips?\n\nIf you are using macOS, you already have it in `/usr/bin/sips`.\n\n`sips` is a command-line image processing tool bundled in macOS.\n\n## What's JavaScript interface of sips?\n\nSince Big Sur, `sips` has been shipped with the new feature *JavaScript interface*, that makes `sips` the most powerful ever.\nLike ImageMagick, `sips` can compose an arbitrary images as you like, with JavaScript.\n\nHowever, as far as I know, there's no announcement from Apple about this upgrade and no detailed documentation is provided.\nSo I investigate the binary of `sips` and expose the hidden APIs I could find.\n\n## Basic usage\n\n#### Hello world\n\nSave the following script as `hello.js`.\n\n```js\nconsole.log('Hello, world!')\n```\n\nThen run:\n\n```sh\n$ sips -j hello.js\nHello, world!\n```\n\n#### Drawing with path\n\nSave the following script as `smile.js`.\n\n```js\nconst canvas = new Canvas(150, 150)\ncanvas.beginPath()\ncanvas.arc(75, 75, 50, 0, Math.PI * 2, true)\ncanvas.moveTo(110, 75)\ncanvas.arc(75, 75, 35, 0, Math.PI, false)\ncanvas.moveTo(65, 65)\ncanvas.arc(60, 65, 5, 0, Math.PI * 2, true)\ncanvas.moveTo(95, 65)\ncanvas.arc(90, 65, 5, 0, Math.PI * 2, true)\ncanvas.stroke()\nconst output = new Output(canvas, sips.outputPath)\noutput.addToQueue()\n```\n\nThen run:\n\n```sh\n$ sips -j smile.js -o smile.png\n```\n\nOutput `smile.png` will be:\n\n![smile.png](https://camo.qiitausercontent.com/7f06af31822043a9220a176c2061ee3e9e374e44/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e61702d6e6f727468656173742d312e616d617a6f6e6177732e636f6d2f302f37333432342f61313635346131332d376335302d323336642d353033382d3230643533623337306634312e706e67)\n\n## License\n\nThis document is licensed under CC0 license.\nSee `LICENSE` for detailed information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanicmaniac%2Fsips-js-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanicmaniac%2Fsips-js-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanicmaniac%2Fsips-js-api/lists"}