{"id":50994303,"url":"https://github.com/dipankar/bunlet","last_synced_at":"2026-06-20T07:01:39.463Z","repository":{"id":358059832,"uuid":"1186673882","full_name":"dipankar/bunlet","owner":"dipankar","description":"Build desktop apps with Bun","archived":false,"fork":false,"pushed_at":"2026-05-20T10:30:20.000Z","size":3496,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-18T17:13:04.486Z","etag":null,"topics":["agentic-ai","bun","bun-runtime","cross-platform-desktop","desktop-app","desktop-framework","dipankar","framework","low-memory","small-installer","typescript","webview"],"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/dipankar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","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-03-19T21:52:27.000Z","updated_at":"2026-06-06T22:26:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dipankar/bunlet","commit_stats":null,"previous_names":["dipankar/bunlet"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dipankar/bunlet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipankar%2Fbunlet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipankar%2Fbunlet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipankar%2Fbunlet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipankar%2Fbunlet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dipankar","download_url":"https://codeload.github.com/dipankar/bunlet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipankar%2Fbunlet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34560266,"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-06-20T02:00:06.407Z","response_time":98,"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":["agentic-ai","bun","bun-runtime","cross-platform-desktop","desktop-app","desktop-framework","dipankar","framework","low-memory","small-installer","typescript","webview"],"created_at":"2026-06-20T07:01:36.851Z","updated_at":"2026-06-20T07:01:39.458Z","avatar_url":"https://github.com/dipankar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bunlet\n\n\u003e Build desktop apps with Bun\n\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)\n[![Platforms](https://img.shields.io/badge/platforms-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](#)\n[![Bun](https://img.shields.io/badge/Bun-%3E%3D1.0-orange.svg)](https://bun.sh/)\n[![npm](https://img.shields.io/npm/v/@bunlet/core)](https://www.npmjs.com/package/@bunlet/core)\n[![crates.io](https://img.shields.io/crates/v/bunlet-native)](https://crates.io/crates/bunlet-native)\n[![GitHub Release](https://img.shields.io/github/v/release/bunlet/bunlet)](https://github.com/dipankar/bunlet/releases)\n\nBunlet is a modern desktop application framework that combines the speed of [Bun](https://bun.sh) with native WebView rendering. Create cross-platform desktop apps with TypeScript while keeping installers small and memory usage low.\n\n## Why Bunlet?\n\n| Feature | Bunlet | Electron | Tauri |\n|---------|--------|----------|-------|\n| **Runtime** | Bun | Node.js | None (Rust) |\n| **WebView** | System WebView | Chromium (bundled) | System WebView |\n| **Installer Size** | ~20-40MB | 80-150MB | 2-10MB |\n| **Language** | TypeScript | JavaScript | Rust + JS |\n| **Memory Usage** | Low | High | Very Low |\n| **Learning Curve** | Easy (Electron-like API) | Easy | Moderate |\n\n### Key Advantages\n\n- **Familiar API** - Electron-compatible API design\n- **TypeScript-First** - Full type safety with Zod validation for IPC\n- **Native Performance** - Rust backend with NAPI bindings\n- **Cross-Platform** - Windows, macOS, and Linux support\n- **Small Footprint** - Uses system WebView (no bundled Chromium)\n\n## Quick Start\n\n### Using the CLI (Recommended)\n\n```bash\nbunx @bunlet/cli create my-app\ncd my-app\nbun run dev\n```\n\n### From Source\n\n```bash\n# Clone and set up everything in one command\ngit clone https://github.com/dipankar/bunlet.git\ncd bunlet\nbun run setup\n\n# Verify your environment\nbun run doctor\n\n# Run an example\ncd examples/hello-world\nbun run main.ts\n```\n\nThe `bun run setup` command installs dependencies, builds the Rust native module, and builds the TypeScript packages. See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed setup instructions.\n\n## Example Application\n\n```typescript\n// main.ts\nimport { app, BrowserWindow, z } from '@bunlet/core';\nimport path from 'path';\n\n// Register IPC handlers before app is ready\napp.handle('greet', z.object({ name: z.string() }), async (params) =\u003e {\n  return { message: `Hello, ${params.name}!` };\n});\n\napp.on('window-all-closed', () =\u003e {\n  app.quit();\n});\n\n// Wait for app to be ready\nawait app.whenReady();\n\n// Create a window\nconst win = new BrowserWindow({\n  width: 800,\n  height: 600,\n  title: 'My Bunlet App',\n});\n\nwin.loadFile(path.join(import.meta.dir, 'index.html'));\n\n// Run the event loop\napp.run();\n```\n\n```html\n\u003c!-- index.html --\u003e\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003cbody\u003e\n  \u003ch1\u003eHello from Bunlet!\u003c/h1\u003e\n  \u003cbutton onclick=\"greet()\"\u003eGreet\u003c/button\u003e\n  \u003cscript\u003e\n    async function greet() {\n      const result = await window.__bunlet.invoke({\n        method: 'greet',\n        params: { name: 'World' }\n      });\n      alert(result.message);\n    }\n  \u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Implemented Features\n\n### Window Management\n- Create and manage multiple windows\n- Window properties: size, position, title, resizable, decorations\n- Window state: minimize, maximize, fullscreen, show/hide\n- Window events: close, resize, move, focus/blur\n- Parent/child window relationships\n\n### IPC System\n- Type-safe IPC with Zod schema validation\n- `app.handle()` for registering handlers\n- `window.__bunlet.invoke()` for renderer-to-main calls\n- `window.__bunlet.on()` for event subscriptions\n\n### Native Dialogs\n- Open file/folder dialogs with filters\n- Save file dialogs\n- Message boxes (info, warning, error, question)\n\n### Menu System\n- Application menus\n- Context menus\n- Menu items with click handlers, accelerators, checkboxes, radio buttons\n\n### System Tray\n- Tray icons with tooltips\n- Tray context menus\n- Click/double-click events\n\n### Notifications\n- Desktop notifications with title and body\n- Notification click events\n- Action buttons (platform-dependent)\n\n### Clipboard\n- Read/write text\n- Read/write HTML\n- Read/write images\n- Clear clipboard\n\n### Global Shortcuts\n- Register system-wide keyboard shortcuts\n- Unregister individual or all shortcuts\n\n### Shell Integration\n- Open files with default application\n- Open URLs in browser\n- Show files in file manager\n- Beep sound\n\n### File System Watching\n- Watch files and directories for changes\n- Recursive watching support\n- Change event types: create, modify, delete, rename\n\n### Power Monitor\n- Battery status and percentage\n- AC/battery power state\n- System idle time detection\n- Suspend/resume events\n- Lock/unlock screen events\n\n### Navigation API\n- WebView navigation: back, forward, reload\n- Can go back/forward state\n\n## Examples\n\nThe `examples/` directory contains working demo applications:\n\n| Example | Description |\n|---------|-------------|\n| **hello-world** | Basic window with HTML |\n| **notes-app** | Full-featured notes application |\n| **multi-window** | Multiple windows with settings |\n| **tray-app** | System tray with notifications |\n| **file-browser** | File dialogs and file watching |\n| **power-monitor** | Battery and power events |\n| **clipboard-manager** | Clipboard history with tray |\n\nRun any example:\n```bash\ncd examples/\u003cexample-name\u003e\nbun run main.ts\n```\n\n## Project Structure\n\n```\nbunlet/\n├── packages/\n│   ├── bunlet/              # TypeScript API layer\n│   │   └── src/\n│   │       ├── app.ts       # Application lifecycle\n│   │       ├── browser-window.ts\n│   │       ├── dialog.ts\n│   │       ├── menu.ts\n│   │       ├── tray.ts\n│   │       ├── notification.ts\n│   │       ├── clipboard.ts\n│   │       ├── global-shortcut.ts\n│   │       ├── shell.ts\n│   │       ├── file-watcher.ts\n│   │       └── power-monitor.ts\n│   │\n│   ├── bunlet-native/       # Rust NAPI bindings\n│   │   └── src/\n│   │       ├── lib.rs       # Core runtime \u0026 window management\n│   │       ├── window.rs    # Window options\n│   │       ├── dialog.rs    # Native dialogs\n│   │       ├── menu.rs      # Menu system\n│   │       ├── tray.rs      # System tray\n│   │       ├── notification.rs\n│   │       ├── clipboard.rs\n│   │       ├── global_shortcut.rs\n│   │       ├── shell.rs\n│   │       ├── file_watcher.rs\n│   │       ├── power_monitor.rs\n│   │       └── screen.rs    # Display info (Linux limited)\n│   │\n│   └── bunlet-cli/          # CLI tool (WIP)\n│\n├── examples/                # Demo applications\n├── docs/                    # Canonical documentation\n└── documentation/           # Deprecated documentation stub\n```\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────┐\n│                   Your Application                   │\n│                    (TypeScript)                      │\n├─────────────────────────────────────────────────────┤\n│                      bunlet                          │\n│              (TypeScript API Layer)                  │\n├─────────────────────────────────────────────────────┤\n│                   bunlet-native                      │\n│                (Rust + NAPI Bindings)                │\n├──────────────────────┬──────────────────────────────┤\n│         TAO          │           WRY                 │\n│  (Window Management) │    (WebView Rendering)       │\n├──────────────────────┴──────────────────────────────┤\n│              Operating System                        │\n│     Windows (WebView2) / macOS (WKWebView) /        │\n│              Linux (WebKitGTK)                       │\n└─────────────────────────────────────────────────────┘\n```\n\n## Known Limitations\n\n### Linux\n- **Screen API**: Display enumeration causes GTK/D-Bus conflicts with TAO's event loop. Window centering is affected.\n- **WebView**: Requires WebKitGTK to be installed (`libwebkit2gtk-4.1-dev` on Ubuntu/Debian)\n\n### General\n- CEF backend parity is incomplete and capability-gated\n- Native-originated window and navigation sync is still being tightened for full parity\n\n## Requirements\n\n- **Bun** 1.0 or later ([install](https://bun.sh))\n- **Rust** stable \u003e= 1.70 ([install via rustup](https://rustup.rs))\n- **macOS**: Xcode Command Line Tools (`xcode-select --install`)\n- **Windows 10/11** (x64): [WebView2 runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)\n- **Linux**: WebKitGTK 4.1 (see below)\n\n### Linux Dependencies\n\n```bash\n# Ubuntu/Debian\nsudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libx11-dev librsvg2-dev\n\n# Fedora\nsudo dnf install webkit2gtk4.1-devel gtk3-devel libappindicator-gtk3-devel libX11-devel librsvg2-devel\n\n# Arch\nsudo pacman -S webkit2gtk-4.1 gtk3 libappindicator-gtk3\n```\n\n## Development\n\n```bash\n# Full setup (install + build native + build TS)\nbun run setup\n\n# Verify environment\nbun run doctor\n\n# Build individual pieces\nbun run build:native      # Rust native module only\nbun run build:packages    # TypeScript packages only\n\n# Run tests\nbun test\n\n# Run the CLI from source\nbun run dev -- \u003ccommand\u003e   # e.g. bun run dev -- create my-app\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for setup, development workflow, and code style guidelines.\n\nRepository docs live in [docs/index.md](docs/index.md). The `documentation/` tree is deprecated.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n---\n\n**Built with [Bun](https://bun.sh) and [Rust](https://www.rust-lang.org/)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipankar%2Fbunlet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdipankar%2Fbunlet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipankar%2Fbunlet/lists"}