{"id":19535633,"url":"https://github.com/miyako/4d-plugin-purge","last_synced_at":"2025-04-26T14:36:03.806Z","repository":{"id":23199597,"uuid":"26556209","full_name":"miyako/4d-plugin-purge","owner":"miyako","description":"Privileged HelperTool to execute purge on macOS","archived":false,"fork":false,"pushed_at":"2024-02-28T10:45:12.000Z","size":19431,"stargazers_count":3,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-02-29T07:52:10.109Z","etag":null,"topics":["4d-plugin"],"latest_commit_sha":null,"homepage":"https://miyako.github.io/4d-plugin-purge/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miyako.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-12T21:07:23.000Z","updated_at":"2024-02-29T07:52:10.110Z","dependencies_parsed_at":"2022-08-21T21:31:32.740Z","dependency_job_id":null,"html_url":"https://github.com/miyako/4d-plugin-purge","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-purge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-purge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-purge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-purge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyako","download_url":"https://codeload.github.com/miyako/4d-plugin-purge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224036588,"owners_count":17245101,"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":["4d-plugin"],"created_at":"2024-11-11T02:19:24.407Z","updated_at":"2024-11-11T02:19:26.133Z","avatar_url":"https://github.com/miyako.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"Use privileged HelperTool to execute [``purge``](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/purge.8.html) on macOS.\n\n**Note**: You need to install `purge` with Xocde or manually with ``xcode-select --install``.\n\n# About\n\nWhen you call the plugin for the first time, the system prompt to install a new helper tool\n\n\u003cimg src=\"https://github.com/miyako/4d-plugin-purge/assets/1725068/798e06db-cdd2-419a-9ebc-a44256c680fb\" style=\"height:240px;width:auto;\" /\u003e\n\nIf you accept, a background item is added to the system.\n\nThis means `com.4D.purge.HelperTool` is added to `/Library/PrivilegedHelperTools`.\n\nNow you can start using the plugin command, which internally calls `purge` via the helper tool.\n\n\u003cimg src=\"https://github.com/miyako/4d-plugin-purge/assets/1725068/8ae0124a-046c-4575-a70d-b7616674a3b2\" style=\"height:360px;width:auto;\" /\u003e\n\n* Structure of returned object\n\n|property|type|description|\n|:-|:-:|:-:|\n|helperToolPath|Text||\n|purgePath|Text||\n|proxyPath|Text||\n|isHelperToolInstalled|Boolean||\n|pid|Number||\n\n``purgePath`` is searched by ``/usr/bin/which``\n\n``helperToolPath`` is searched in ``Library/PrivilegedHelperTools``\n\nThe installer is lanched if ``!isHelperToolInstalled``.\n\n# Build Information\n\nBased on [EvenBetterAuthorizationSample](https://developer.apple.com/library/content/samplecode/EvenBetterAuthorizationSample/Introduction/Intro.html).\n\nAs explained [here](https://github.com/atnan/SMJobBlessXPC/issues/7), it is imperative to run ``SMJobBlessUtil.py`` before building the application. Do **not** update the project version, or the python script will fail.\n\npython3 version: https://gist.github.com/mikeyh/89a1e2ecc6849ff6056b7391c5216799\n\nThe syntax is \n\n```\nSMJobBlessUtil.py setreq {app} {App-Info.plist} {HelperTool-Info.plist}\n```\n\nThis updates ``SMPrivilegedExecutables`` in ``App-Info.plist`` and ``SMAuthorizedClients`` in ``HelperTool-Info.plist``.\n\nIt seems ``SMJobBless`` and ``launchd`` reads ``Info.plist`` of the main application, not of the plugin (which makes sense). The plugin uses a small app (hidden, ``LSBackgroundOnly``) to install the helper. The \"installer\" app displays a simple user interface if the argument ``--debug`` is passed.\n\nIt seems like there is no easy way to call ``NSXPCConnection`` or ``NSXPCInterface`` from the plugin, especially if the plugin is reloaded without terminating the main application. As a workaround, a proxy console application is called each time to run ``purge``.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-purge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyako%2F4d-plugin-purge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-purge/lists"}