{"_id":"@agent-orcha/trayconsolejs","_rev":"2-9cb4beb30545e513ac62a87661b7abf3","name":"@agent-orcha/trayconsolejs","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@agent-orcha/trayconsolejs","version":"0.1.0","license":"Apache-2.0","_id":"@agent-orcha/trayconsolejs@0.1.0","maintainers":[{"name":"ddalcu","email":"david.dalcu@gmail.com"}],"homepage":"https://github.com/ddalcu/trayconsolejs#readme","bugs":{"url":"https://github.com/ddalcu/trayconsolejs/issues"},"dist":{"shasum":"676a08e7513699166923c3369c78a710a3510afe","tarball":"https://registry.npmjs.org/@agent-orcha/trayconsolejs/-/trayconsolejs-0.1.0.tgz","fileCount":5,"integrity":"sha512-YmbfaI1u6qCCnwry9a33cqju8IbCdXWfIPeb0u7k7JKI1nf8D7Unk3D08sC/DknMB4lVkpyKHuTrFb8K58GAPg==","signatures":[{"sig":"MEUCIHlnBEeInX96U9MMT7nNeVqU0Ya9z9ez4WQ9HpaIqcweAiEA6OlsQJ53bDoWZacR48/CRUX7IGdnbxjYJbltR/3VK84=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agent-orcha%2ftrayconsolejs@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20491},"type":"module","types":"./dist/index.d.ts","exports":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"gitHead":"793d3a5986427d30f81471ab48a282a954e5ff6b","scripts":{"build":"tsc","watch":"tsc --watch"},"_npmUser":{"name":"ddalcu","email":"david.dalcu@gmail.com"},"repository":{"url":"git+https://github.com/ddalcu/trayconsolejs.git","type":"git"},"_npmVersion":"11.9.0","description":"Cross-platform system tray + log console window for Node.js","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7","@types/node":"^22"},"optionalDependencies":{"@agent-orcha/trayconsole-linux-x64":"0.1.0","@agent-orcha/trayconsole-win32-x64":"0.1.0","@agent-orcha/trayconsole-darwin-x64":"0.1.0","@agent-orcha/trayconsole-linux-arm64":"0.1.0","@agent-orcha/trayconsole-win32-arm64":"0.1.0","@agent-orcha/trayconsole-darwin-arm64":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/trayconsolejs_0.1.0_1774624245545_0.7354263131972825","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agent-orcha/trayconsolejs","version":"0.1.1","description":"Cross-platform system tray + log console window for Node.js","license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/ddalcu/trayconsolejs.git"},"type":"module","exports":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"types":"./dist/index.d.ts","scripts":{"build":"tsc","watch":"tsc --watch"},"devDependencies":{"@types/node":"^22","typescript":"^5.7"},"optionalDependencies":{"@agent-orcha/trayconsole-linux-x64":"0.1.1","@agent-orcha/trayconsole-linux-arm64":"0.1.1","@agent-orcha/trayconsole-darwin-x64":"0.1.1","@agent-orcha/trayconsole-darwin-arm64":"0.1.1","@agent-orcha/trayconsole-win32-x64":"0.1.1","@agent-orcha/trayconsole-win32-arm64":"0.1.1"},"gitHead":"6ae5e298a95f51280337b5a093cd614a19687fbd","_id":"@agent-orcha/trayconsolejs@0.1.1","bugs":{"url":"https://github.com/ddalcu/trayconsolejs/issues"},"homepage":"https://github.com/ddalcu/trayconsolejs#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-lk85/HOxHuuD1V4HaapqtqT+73PpYLaLRyysLBojG2ooEfsjN1jpUOWqRNa+++IxqMyTnX50N07h3ryVMHhsow==","shasum":"df24d724987f76e0646f0058ffa155df2f614641","tarball":"https://registry.npmjs.org/@agent-orcha/trayconsolejs/-/trayconsolejs-0.1.1.tgz","fileCount":5,"unpackedSize":20665,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agent-orcha%2ftrayconsolejs@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCKorXhgr6im0/QA+HAtx8xG2sjlh5WXqFSIPTt4T7cygIhAJOfykD+A35fWMRDAQEPORQDbH4jS/lfcml4ccjiPpTk"}]},"_npmUser":{"name":"ddalcu","email":"david.dalcu@gmail.com"},"directories":{},"maintainers":[{"name":"ddalcu","email":"david.dalcu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trayconsolejs_0.1.1_1774625334427_0.4079206826670607"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-27T15:10:45.424Z","modified":"2026-03-27T15:28:54.851Z","0.1.0":"2026-03-27T15:10:45.704Z","0.1.1":"2026-03-27T15:28:54.559Z"},"bugs":{"url":"https://github.com/ddalcu/trayconsolejs/issues"},"license":"Apache-2.0","homepage":"https://github.com/ddalcu/trayconsolejs#readme","repository":{"type":"git","url":"git+https://github.com/ddalcu/trayconsolejs.git"},"description":"Cross-platform system tray + log console window for Node.js","maintainers":[{"name":"ddalcu","email":"david.dalcu@gmail.com"}],"readme":"# trayjs\n\nCross-platform system tray for Node.js. Works on Linux, macOS and Windows.\n\n## Packages\n\n| Package | Description |\n|---------|-------------|\n| @trayjs/trayjs | Node.js API |\n| @trayjs/linux-x64 | Native binary for Linux x64 |\n| @trayjs/linux-arm64 | Native binary for Linux arm64 |\n| @trayjs/darwin-x64 | Native binary for macOS x64 |\n| @trayjs/darwin-arm64 | Native binary for macOS arm64 |\n| @trayjs/win32-x64 | Native binary for Windows x64 |\n| @trayjs/win32-arm64 | Native binary for Windows arm64 |\n\n## Quick start\n\n```\nnpm install @trayjs/trayjs\n```\n\n```js\nimport { Tray } from '@trayjs/trayjs';\n\nconst tray = new Tray({\n  tooltip: 'My App',\n  icon: { png: 'icon.png', ico: 'icon.ico' },\n  onMenuRequested: () => [\n    { id: 'open', title: 'Open' },\n    { id: 'recent', title: 'Recent', items: [\n      { id: 'file1', title: '~/notes.md' },\n      { id: 'file2', title: '~/todo.txt' },\n    ]},\n    { separator: true },\n    { id: 'quit', title: 'Quit' },\n  ],\n  onClicked: (id) => {\n    if (id === 'quit') tray.quit();\n  },\n});\n\ntray.on('close', () => process.exit(0));\n```\n\n## API\n\n### `new Tray(options)`\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `icon` | `Icon` | Icon file paths (see `Icon` below) |\n| `tooltip` | `string` | Tray tooltip text |\n| `onMenuRequested` | `() => MenuItem[] \\| Promise<MenuItem[]>` | Called every time the tray menu is opened |\n| `onClicked` | `(id: string) => void` | Called when a menu item is clicked |\n\n### `Icon`\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `png` | `string` | Path to PNG icon file (used on macOS and Linux) |\n| `ico` | `string` | Path to ICO icon file (used on Windows) |\n\n### `MenuItem`\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `id` | `string` | Unique identifier |\n| `title` | `string` | Display text |\n| `tooltip` | `string` | Hover tooltip |\n| `enabled` | `boolean` | Clickable (default `true`) |\n| `checked` | `boolean` | Show check mark |\n| `separator` | `boolean` | Render as separator line |\n| `items` | `MenuItem[]` | Submenu items |\n\n### Methods\n\n- `tray.setIcon(icon)` — update the icon at runtime (takes an `Icon` object)\n- `tray.setMenu(items)` — set menu items directly\n- `tray.setTooltip(text)` — update the tooltip at runtime\n- `tray.quit()` — close the tray\n\n### Events\n\n- `'ready'` — tray is visible and accepting commands\n- `'close'` — tray process exited\n\n## Architecture\n\nEach platform has a native tray binary (Objective-C on macOS, Win32 C on Windows, GTK/AppIndicator C on Linux).\nThe Node.js wrapper communicates with it over stdin/stdout using JSON-lines.\n\nThe correct platform-specific binary is installed automatically via npm optional dependencies.\n\n## Development\n\n```\ngit clone <repo>\ncd trayjs\nnpm install\n```\n\nNative binaries are built by CI. Each GitHub Actions run produces downloadable artifacts\nfor all platforms, ready to publish to npm.\n","readmeFilename":"README.md"}