{"id":13587676,"url":"https://github.com/maddox/mac-api","last_synced_at":"2025-03-23T15:31:20.298Z","repository":{"id":66282556,"uuid":"83589040","full_name":"maddox/mac-api","owner":"maddox","description":"Command your Mac from afar","archived":false,"fork":false,"pushed_at":"2019-02-18T14:46:15.000Z","size":67,"stargazers_count":33,"open_issues_count":0,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-14T22:35:47.689Z","etag":null,"topics":["api","automation","home-assistant","home-automation","macos"],"latest_commit_sha":null,"homepage":null,"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/maddox.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}},"created_at":"2017-03-01T18:48:06.000Z","updated_at":"2024-02-29T18:17:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"0dd16cc4-679e-4689-8961-93a46753003d","html_url":"https://github.com/maddox/mac-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddox%2Fmac-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddox%2Fmac-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddox%2Fmac-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddox%2Fmac-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maddox","download_url":"https://codeload.github.com/maddox/mac-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245122758,"owners_count":20564366,"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":["api","automation","home-assistant","home-automation","macos"],"created_at":"2024-08-01T15:06:18.841Z","updated_at":"2025-03-23T15:31:19.677Z","avatar_url":"https://github.com/maddox.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Mac API!!\n\nMac API is a simple server allowing you to remotely command certain things on\nyour Mac. This is mostly useful for a desktop computer that is always on.\n\n\n\n## Features\n\n* Wake your display.\n* Sleep your display.\n* Set your display's brightness.\n* Set your volume.\n* Toggle Do Not Disturb mode on or off.\n* Set the audio device used for input or output.\n\n## Setup\n\n    script/bootstrap\n\n## Running It\nGet up and running immediately with `script/server`.\n\nMac API will run on port `8686` by default. Use the `PORT` environment\nvariable to use your own port.\n\n### Forever\nMac API has support for [Forever](https://github.com/foreverjs/forever). It uses\n`launchd` on macOS to kick it off so that it starts on boot.\n\n### Development\nYou can simply run it by calling `script/server`. This will run it in development\nmode with logging to standard out.\n\n### Install as Service on macOS\n\n    script/install\n\n## Logging\n\nMac API logs all of its requests. In `production`, it logs to a file at `log/logs.log`.\nIn `development` mode, it just logs to stdout.\n\n## Development\n\nLaunch the app via `script/server` to run it in the development environment.\n\n## HTTP API\n\nThis is a quick overview of the HTTP service. Read [app.js](app.js) if you need more\ninfo. It doesn't do a lot yet.\n\n### Methods\n\nThese are the endpoints you can hit to do things.\n\n#### Endpoints\n\n    POST /sleep_display\n    POST /wake\n    POST /brightness/:level - Level: 0-32\n    POST /volume/:level - Level: 0-100\n    POST /dnd/:state - State: on or off\n    POST /audiodevice/:port/:device - Port: input or output, Device: name of device\n    GET /camera - Returns true if built-in camera in is in use, false otherwise.\n    GET /hid_idle_time - returns the time in seconds since the last keyboard/mouse interaction\n\n## Contributions\n\n* fork\n* create a feature branch\n* open a Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaddox%2Fmac-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaddox%2Fmac-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaddox%2Fmac-api/lists"}