{"id":23509121,"url":"https://github.com/scriptingosx/prefstool","last_synced_at":"2026-03-10T22:03:37.754Z","repository":{"id":148496014,"uuid":"137664646","full_name":"scriptingosx/PrefsTool","owner":"scriptingosx","description":null,"archived":false,"fork":false,"pushed_at":"2018-06-21T06:29:52.000Z","size":10,"stargazers_count":66,"open_issues_count":0,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-17T03:48:24.186Z","etag":null,"topics":["configuration-profile","mac","macadmin","macos","preference-domain","preferences","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scriptingosx.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":"2018-06-17T15:16:25.000Z","updated_at":"2024-08-16T05:45:28.000Z","dependencies_parsed_at":"2023-05-05T18:16:36.396Z","dependency_job_id":null,"html_url":"https://github.com/scriptingosx/PrefsTool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scriptingosx/PrefsTool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptingosx%2FPrefsTool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptingosx%2FPrefsTool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptingosx%2FPrefsTool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptingosx%2FPrefsTool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scriptingosx","download_url":"https://codeload.github.com/scriptingosx/PrefsTool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptingosx%2FPrefsTool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30357614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["configuration-profile","mac","macadmin","macos","preference-domain","preferences","python"],"created_at":"2024-12-25T11:37:50.177Z","updated_at":"2026-03-10T22:03:37.739Z","avatar_url":"https://github.com/scriptingosx.png","language":"Python","readme":"# `prefs` Tools\n\nThis tool is an extension of [Greg Neagle's `fancy_defaults_read.py`](https://gist.github.com/gregneagle/010b369e86410a2f279ff8e980585c68).\n\nIn the simplest use case you can just pass the app identifier:\n\n```\n$ ./prefs.py com.apple.screensaver\nidleTime \u003cint\u003e: 0L (User/ByHost)\nCleanExit \u003cstring\u003e: u'YES' (User/ByHost)\naskForPassword \u003cbool\u003e: True (Managed)\naskForPasswordDelay \u003cint\u003e: 0L (Managed)\nmoduleDict \u003cdict\u003e: {\n    moduleName = iLifeSlideshows;\n    path = \"/System/Library/Frameworks/ScreenSaver.framework/Resources/iLifeSlideshows.saver\";\n    type = 0;\n} (User/ByHost)\nshowClock \u003cbool\u003e: True (User/ByHost)\nPayloadUUID \u003cstring\u003e: u'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE' (Managed)\ntokenRemovalAction \u003cint\u003e: 0L (User/ByHost)\nPrefsVersion \u003cint\u003e: 100L (User/ByHost)\n```\n\nThe tool will print _all_ composited preferences keys and their type and value, with the preference domain where the value was set. The output format is:\n\n```\nprefKey \u003ctype\u003e: value (domain)\n```\n\nA preference domain of `Managed` means the value is set with a configuration profile.\n\nWhile preference values set in `.GlobalPreferences.plist` in the different domains are composited into the the application defaults, they are _not_ shown by default, since there are many of them and they will make the output fairly unreadable. If you want to see them add the `--globals` (or `-g` option):\n\n```\n$ ./prefs.py --globals com.apple.screensaver\n```\n\nYou can also add one or more keys after the app identifier to get just specific values:\n\n```\n$ ./prefs.py com.apple.screensaver askForPassword askForPasswordDelay AppleLocale\naskForPassword \u003cbool\u003e: True (Managed)\naskForPasswordDelay \u003cint\u003e: 0L (Managed)\nAppleLocale \u003cstring\u003e: u'en_NL' (User/Global)\n```\n\nYou can also add the `--value` (or `-V`) option to show just the value in the output (might be useful when you want to get the composited value for another script.\n\n```\n$ ./prefs.py -V com.apple.screensaver askForPassword\nTrue\n```\n\n## To do:\n\n- determine the configuration profile a setting came from\n- set or delete values in a certain domain\n- read keys or values in nested arrays or dicts\n\n(inherited from `fancy_defaults_read.py`)\n- Instead of '/Library/Preferences/ByHost/com.apple.screensaver.xxxx.plist', print the actual filename.\n- Add support for sandboxed applications that store their preferences in ~/Library/Containers/\u003cidentifier\u003e/Data/Library/Preferences/\u003cidentifier\u003e.plist\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptingosx%2Fprefstool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscriptingosx%2Fprefstool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptingosx%2Fprefstool/lists"}