{"id":51636158,"url":"https://github.com/artemy/semaphore","last_synced_at":"2026-07-13T14:32:56.057Z","repository":{"id":370772503,"uuid":"1266302107","full_name":"artemy/semaphore","owner":"artemy","description":"AI Agent status indicator for your desk","archived":false,"fork":false,"pushed_at":"2026-07-10T20:52:22.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-10T22:15:03.685Z","etag":null,"topics":["ai-agent","antigravity","antigravity-hooks","antigravity-plugin","claude-code","claude-code-hooks","claude-code-plugin","claude-code-skills","codex","codex-plugin","copilot","copilot-hooks","copilot-plugin","cursor","cursor-hooks","cursor-plugin","hooks","opencode","opencode-plugin","status-indicator"],"latest_commit_sha":null,"homepage":"https://github.com/artemy/semaphore","language":"JavaScript","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/artemy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"artemy","buy_me_a_coffee":"artemy"}},"created_at":"2026-06-11T13:48:16.000Z","updated_at":"2026-07-10T20:52:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/artemy/semaphore","commit_stats":null,"previous_names":["artemy/semaphore"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/artemy/semaphore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemy%2Fsemaphore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemy%2Fsemaphore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemy%2Fsemaphore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemy%2Fsemaphore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artemy","download_url":"https://codeload.github.com/artemy/semaphore/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemy%2Fsemaphore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35426085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"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":["ai-agent","antigravity","antigravity-hooks","antigravity-plugin","claude-code","claude-code-hooks","claude-code-plugin","claude-code-skills","codex","codex-plugin","copilot","copilot-hooks","copilot-plugin","cursor","cursor-hooks","cursor-plugin","hooks","opencode","opencode-plugin","status-indicator"],"created_at":"2026-07-13T14:32:55.888Z","updated_at":"2026-07-13T14:32:56.044Z","avatar_url":"https://github.com/artemy.png","language":"JavaScript","funding_links":["https://github.com/sponsors/artemy","https://buymeacoffee.com/artemy"],"categories":[],"sub_categories":[],"readme":"# Semaphore CLI\n\n![MIT License](https://img.shields.io/github/license/artemy/semaphore)\n\n🚦 CLI for a USB-HID traffic-light device that turns your desk light into a live session indicator for [Claude Code](https://claude.ai/code), [Codex](https://github.com/openai/codex), and [Opencode](https://opencode.ai).\n\n## Features\n\n- Control red, yellow, and green LEDs individually or all at once\n- Three modes per LED: `off`, `on`, and `blink` with configurable speed\n- `solo` command lights one LED and clears the other two\n- `status` query reads current device state\n- `boot` plays a startup animation\n- Claude Code, Codex, and Opencode hook integration — the light follows session events automatically where supported\n\n## Getting started\n\n### Prerequisites\n\n- Node.js 18+\n- The semaphore device (VID `0x1209`, PID `0x0001`) connected via USB\n\n### Installing\n\n```shell\nnpm install -g semaphore-cli\n```\n\nOr from source:\n\n```shell\ngit clone https://github.com/artemy/semaphore\ncd semaphore/software\nnpm install\nnpm install -g .\n```\n\n## Usage\n\n```\nsemaphore \u003cled\u003e off\nsemaphore \u003cled\u003e on\nsemaphore \u003cled\u003e blink [half_period_ms]\nsemaphore solo \u003ccolor\u003e on\nsemaphore solo \u003ccolor\u003e blink [half_period_ms]\nsemaphore status\nsemaphore boot\n```\n\n- `\u003cled\u003e`: `red` | `yellow` | `green` | `all`\n- `\u003ccolor\u003e`: `red` | `yellow` | `green` (solo turns off the other two)\n- blink half-period: 20–5000 ms (default 500)\n- `--soft` / `-s`: silently exit 0 on device-connectivity errors (for hooks)\n\n### Examples\n\n```shell\nsemaphore red on             # turn red LED on\nsemaphore green blink 250    # fast-blink green (250 ms half-period)\nsemaphore solo yellow on     # yellow on, red and green off\nsemaphore all off            # turn everything off\nsemaphore status             # read and print current device state\n```\n\n\n## Hooks installation\n\n\u003e ⚠️ Every hook command uses `--soft`. This keeps the LED best-effort when the device is unplugged, and suppresses stdout so hook output is not injected into the model's context.\n\n### Claude Code\n\n\u003cdetails\u003e\n\u003csummary\u003eClaude Code hooks lifecycle\u003c/summary\u003e\n\nClaude Code support uses the documented lifecycle hooks in [`hooks/hooks.json`](hooks/hooks.json):\n\n| LED state      | Meaning                     | Hook events                         |\n|----------------|-----------------------------|-------------------------------------|\n| green solid    | Idle / waiting for input    | `SessionStart`, `Stop`              |\n| red solid      | Claude is busy              | `UserPromptSubmit`, `PostToolUse`   |\n| yellow blink   | Needs human attention       | `PermissionRequest`, `Notification` |\n| all off        | No active session           | `SessionEnd`                        |\n\n\u003c/details\u003e\n\n#### Plugin (recommended)\n\nMake sure the package is installed globally first, then run from inside Claude Code:\n\n```\n/plugin marketplace add artemy/semaphore\n/plugin install semaphore-hooks@semaphore\n```\n\n#### Manual\n\nMerge the `hooks` key from [`hooks/hooks.json`](hooks/hooks.json) into your `.claude/settings.json`.\n\n## OpenAI Codex\n\n\u003cdetails\u003e\n\u003csummary\u003eCodex hooks lifecycle\u003c/summary\u003e\n\nCodex support uses the documented Codex lifecycle hooks in [`hooks/codex-hooks.json`](hooks/codex-hooks.json):\n\n| LED state      | Meaning                  | Hook events                            |\n|----------------|--------------------------|----------------------------------------|\n| green solid    | Idle / waiting for input | `Stop`                                 |\n| red solid      | Codex is busy            | `UserPromptSubmit`, `PostToolUse`      |\n| yellow blink   | Needs human attention    | `PreToolUse` (on `request_user_input`) |\n| yellow blink   | Needs human approval     | `PermissionRequest`                    |\n\n\u003c/details\u003e\n\n#### Plugin (recommended)\n\nMake sure the package is installed globally first, then run from your terminal:\n\n\n```shell\ncodex plugin marketplace add artemy/semaphore\ncodex plugin add semaphore-hooks@semaphore\n```\n\n\u003e ⚠️ Codex will prompt you to review the newly installed hooks after you run it next time.\n\n### Manual\n\nCopy the contents of [`hooks/codex-hooks.json`](hooks/codex-hooks.json) into your `.codex/hooks.json`.\n\n## Opencode\n\n\u003cdetails\u003e\n\u003csummary\u003eOpencode hooks lifecycle\u003c/summary\u003e\n\nOpencode support uses the native plugin system — the plugin at\n[`.opencode/plugins/semaphore-hooks.js`](.opencode/plugins/semaphore-hooks.js) is auto-discovered and maps Opencode lifecycle events to the semaphore device:\n\n| LED state    | Meaning                  | Opencode events                                           |\n|--------------|--------------------------|-----------------------------------------------------------|\n| green solid  | Idle / waiting for input | `session.created`, `session.idle`                         |\n| red solid    | Opencode is busy         | `message.updated` (`role=user`), `tool.execute.after`     |\n| yellow blink | Needs human attention    | `permission.asked`, `tool.execute.before` (on `question`) |\n| all off      | No active session        | `session.deleted`, `dispose`                              |\n\n\u003c/details\u003e\n\n#### Plugin\n\nTODO: Installation\n\n## Built With\n\n- [Node.js](https://nodejs.org/)\n- [node-hid](https://github.com/node-hid/node-hid) — USB HID device access\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nThis project is licensed under the MIT License — see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartemy%2Fsemaphore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartemy%2Fsemaphore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartemy%2Fsemaphore/lists"}