{"id":30873732,"url":"https://github.com/jonesiscoding/displays-cli","last_synced_at":"2026-05-19T10:02:59.285Z","repository":{"id":283299538,"uuid":"951312235","full_name":"jonesiscoding/displays-cli","owner":"jonesiscoding","description":"Shell script for identifying and logging displays attached to macOS systems.","archived":false,"fork":false,"pushed_at":"2025-04-18T14:15:44.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T02:44:23.155Z","etag":null,"topics":["displays","extension-attributes","jamf","log","macos","mdm","monitors"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/jonesiscoding.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,"zenodo":null}},"created_at":"2025-03-19T13:38:27.000Z","updated_at":"2025-04-18T13:48:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb03788d-8121-4c7b-9498-943bd2eca21b","html_url":"https://github.com/jonesiscoding/displays-cli","commit_stats":null,"previous_names":["jonesiscoding/displays-cli"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jonesiscoding/displays-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonesiscoding%2Fdisplays-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonesiscoding%2Fdisplays-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonesiscoding%2Fdisplays-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonesiscoding%2Fdisplays-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonesiscoding","download_url":"https://codeload.github.com/jonesiscoding/displays-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonesiscoding%2Fdisplays-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274113047,"owners_count":25224334,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["displays","extension-attributes","jamf","log","macos","mdm","monitors"],"created_at":"2025-09-07T23:49:59.211Z","updated_at":"2026-05-19T10:02:59.184Z","avatar_url":"https://github.com/jonesiscoding.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Displays CLI\nShell script for identifying and logging displays attached to macOS systems, designed to be used in a business \nenvironment. The utility must be run by an MDM or by a macOS administrator using sudo, typically over SSH.\n\nAllows filtering of logs by model, serial, and location, as well as configuration via MDM or system plist.\n\n## Purpose\n\nTo allow for easy recording which systems have which kind of display, and to make end-user support easier.\n\nAlso may be handy in environments where users may feel the need to make unauthorized display swaps with another\nworkstation, allowing admins to configure their MDM for notification of changes, and to research the history of changes.\n\n## Installation\n\nInstallation is manual at this time; view the raw content of `displays-cli` and place it in your chosen location in the\npath of system.  The recommended path is `/usr/local/sbin/displays`.\n\n## Dependencies\n\n* The `jq` executable.  This is native on macOS Sequoia or higher, or must be installed via other methods.\n* __One__ of the following:\n    * A hostname that is a Fully Qualified Domain Name\n    * A Jamf Pro instance\n    * Setting a `MDM_BUNDLE_PREFIX` environment variable (`org.yourname`)\n\n## Standard Usage\n\nOutput can be shown as standard text or by using the `--json` flag, a JSON array.  Included in the output are the model,\nserial number, max resolution, current resolution, current refresh rate, year of manufacture, and boolean indicators of\nwhether the display is main, mirrored, and using ambient brightness.\n\n### Sleeping Displays\n\nThe display information is unavailable from the OS if the display is sleeping. If you want to wake the display before\npolling, the `--wake` flag may be used.  This may not work in all environments.\n\n## Logging \u0026 Searching\n\nWhen the utility is run, each attached display is logged with a date, location, model, and serial number.  Location\nmatches are determined via the preferences, as configured by MDM or system/user plist.\n\nUsing the `--model`, `--serial`, and `--location` flags, the log may be filtered and displayed.  The `--last`, `--first`,\n`--head` and `--tail` flags may be used to limit the results. By default, only the last 100 entries are shown.\n\n### MDM Attribute\n\nUsing the `--ea` or `--attr` flags (or run as a Jamf Pro Extension Attribute script) the output is the model of each\ndisplay shown as a pipe separated string.\n\nTo ensure accurate data, if a display is sleeping, the result is based on logged values.  Only a value logged\nwithin the last 7 days with the same location is used.  The result will also add \"Sleeping|\" prior to the model(s).\n\nWhen running as a Jamf Pro Extension Attribute script or using the `--ea` flag, output is enclosed in\n`\u003cresult\u003e\u003c/result\u003e` as required.\n\n## Configuration\n\nConfiguration can be done by setting values in an MDM installed configuration profile, system preferences, or user\npreferences using your preferred tool.\n\n### Configuration Profile Keys\n\n| Key             | Description                                                                                                                                                   |\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| privacy_level   | 0 - Use IP for Non-Matching Locations\u003cbr/\u003e1 - Use NA for Non-Matching Locations\u003cbr/\u003e3 - Do Not Log at Non-Matching Locations                                  |\n| jq_path         | Path to JQ if not in the path, and not in a standard location.                                                                                                |\n| locations       | Array of dictionary objects with 'pattern' and 'name' keys.\u003cbr/\u003ePattern to match the external IP address(es) of your location(s).\u003cbr/\u003eName is used in the log |\n| static_location | The location name to use.  Overrides configured location patterns.\u003cbr/\u003eOnly recommended for single location businesses with desktop systems.                  |\n\n### Jamf Configuration\n\nIf using Jamf, configuration is easy. Install displays-cli on your local Jamf system, and run `displays --schema` to\noutput a JSON schema compatible with the Jamf Pro Configuration Profile -\u003e Application \u0026 Custom Settings payload.\n\nVerify that the schema shows a proper reverse domain at the top.  This is based on one of the following settings, in\norder of precedence:\n\n* The MDM_BUNDLE_PREFIX environment variable\n* The hostname of the machine, if using a FQDN\n* The hostname of your Jamf instance\n\n### Other MDM Configuration\n\nThis utility should work with any MDM that allows for configuration profiles. To see the application domain to use for\nyour configuration profile, look at the output of `displays --schema`.\n\nContributions of knowledge or code are welcome to allow this tool to be used easily on other MDM solutions.  The tool\nshould work in any situation where it can be configured via MDM\n\n### Manual Configuration\n\nUsing a tools such as PlistBuddy, you should be able to add the appropriate keys and values to a plist file.  To see the \nexpected name for your plist look at the output of `displays --bundleid`.  For system-wide settings, the plist file should\nbe:\n\n    /Library/Preferences/\u003corg.yourname\u003e.displays-cli.plist\n\nAutomatic configuration may be added in a later version. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonesiscoding%2Fdisplays-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonesiscoding%2Fdisplays-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonesiscoding%2Fdisplays-cli/lists"}