{"id":51448324,"url":"https://github.com/llteco/opencode-email-notify","last_synced_at":"2026-07-05T18:30:42.284Z","repository":{"id":360963998,"uuid":"1252492370","full_name":"llteco/opencode-email-notify","owner":"llteco","description":"An OpenCode plugin that listens for the `session.idle` event and sends email notifications.","archived":false,"fork":false,"pushed_at":"2026-05-28T15:18:00.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T17:12:47.693Z","etag":null,"topics":["email","notify","opencode","opencode-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/llteco.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-28T15:16:35.000Z","updated_at":"2026-05-28T15:20:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/llteco/opencode-email-notify","commit_stats":null,"previous_names":["llteco/opencode-email-notify"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/llteco/opencode-email-notify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llteco%2Fopencode-email-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llteco%2Fopencode-email-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llteco%2Fopencode-email-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llteco%2Fopencode-email-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llteco","download_url":"https://codeload.github.com/llteco/opencode-email-notify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llteco%2Fopencode-email-notify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35165553,"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-05T02:00:06.290Z","response_time":100,"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":["email","notify","opencode","opencode-plugin"],"created_at":"2026-07-05T18:30:41.671Z","updated_at":"2026-07-05T18:30:42.267Z","avatar_url":"https://github.com/llteco.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opencode-email-notify\n\nEN | [中文](README_ZH.md)\n\nAn OpenCode plugin that listens for the `session.idle` event and sends email notifications.\n\n## Features\n\n- Supports **SMTP password authentication** and **OAuth2 authentication**\n- Supports **HTTP / HTTPS / SOCKS5 / SOCKS4** proxies\n- Supports multiple recipients\n- Uses OpenCode structured logging\n\n## Installation\n\n### Method 1: Local Development\n\nClone this repository to any directory, install dependencies, and OpenCode will automatically load the plugin from `.opencode/plugins/`:\n\n```bash\ngit clone https://github.com/your-org/opencode-email-notify.git\ncd opencode-email-notify\nbun install   # or npm install, to install nodemailer, socks, etc.\n```\n\n### Method 2: Install via npm\n\nAdd to your `opencode.json`:\n\n```json\n{\n  \"plugin\": [\"opencode-email-notify\"]\n}\n```\n\n## Configuration\n\nSupports both **configuration files** and **environment variables**. **Environment variables take precedence over configuration files.**\n\n### Configuration File\n\nConfiguration files use the JSON with Comments (JSONC) format and support the following locations (project-level overrides global):\n\n- Global: `~/.config/opencode/email-notify.jsonc`\n- Project-level: `.opencode/email-notify.jsonc`\n\nExample:\n\n```jsonc\n{\n  // SMTP settings\n  \"SMTP_HOST\": \"smtp.gmail.com\",\n  \"SMTP_PORT\": \"587\",\n  \"SMTP_USER\": \"your@gmail.com\",\n  \"SMTP_PASS\": \"your-app-password\",\n\n  // OAuth2 authentication (choose one)\n  // \"SMTP_OAUTH2_ACCESS_TOKEN\": \"ya29.xxx\",\n\n  // Proxy (optional)\n  // \"SMTP_PROXY\": \"socks5://127.0.0.1:1080\",\n\n  // Notification settings\n  \"NOTIFY_TO\": \"admin@example.com\",\n  \"NOTIFY_FROM\": \"noreply@example.com\",\n  \"NOTIFY_MIN_INTERVAL_MS\": \"600000\",\n  \"NOTIFY_DRY_RUN\": \"false\"\n}\n```\n\n\u003e **Multiple recipients**: Use commas to separate multiple email addresses in `NOTIFY_TO`, e.g. `\"admin@example.com,ops@example.com\"`.\n\n### Environment Variables\n\nAll configuration items can be set via environment variables, **which will override values in configuration files**:\n\n```bash\nexport SMTP_HOST=smtp.gmail.com\nexport SMTP_PORT=587\nexport SMTP_USER=your@gmail.com\nexport SMTP_PASS=your-app-password\nexport SMTP_OAUTH2_ACCESS_TOKEN=xxx\nexport SMTP_PROXY=socks5://127.0.0.1:1080\nexport NOTIFY_TO=admin@example.com,ops@example.com\nexport NOTIFY_FROM=noreply@example.com\nexport NOTIFY_MIN_INTERVAL_MS=600000\nexport NOTIFY_DRY_RUN=false\n```\n\n## Events\n\nSubscribes to the `session.idle` event and sends an email notification when an OpenCode session becomes idle.\n\nThe email includes:\n- Session title\n- Project name\n- Working directory\n- Trigger time\n\n## Logging\n\nThe plugin uses `client.app.log()` for structured logging. You can view initialization, send success/failure, and other information through the OpenCode logging system.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllteco%2Fopencode-email-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllteco%2Fopencode-email-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllteco%2Fopencode-email-notify/lists"}