[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82316":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":13,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":15,"starSnapshotCount":15,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},82316,"baby-menu","kunchenguid\u002Fbaby-menu","kunchenguid","A menu bar app that can become anything you ask it to be.","",null,"TypeScript",54,1,25,0,24,26,11,57.5,"MIT License",false,"main",[24,25,26],"agents","agi","ai","2026-06-12 04:01:37","\u003Ch1 align=\"center\">baby-menu\u003C\u002Fh1>\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fkunchenguid\u002Fbaby-menu\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg alt=\"CI\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fkunchenguid\u002Fbaby-menu\u002Fci.yml?style=flat-square&label=ci\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-macOS-blue?style=flat-square\">\u003Cimg alt=\"Platform\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-macOS-blue?style=flat-square\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Felectron-42-9feaf9?style=flat-square\">\u003Cimg alt=\"Electron\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Felectron-42-9feaf9?style=flat-square\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fx.com\u002Fkunchenguid\">\u003Cimg alt=\"X\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FX-@kunchenguid-black?style=flat-square\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FWsy2NpnZDu\">\u003Cimg alt=\"Discord\" src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1439901831038763092?style=flat-square&label=discord\" \u002F>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Ch3 align=\"center\">Adopt a baby menu and help it grow.\u003C\u002Fh3>\n\n\u003Cp align=\"center\">\n  \u003Cimg\n    alt=\"Ask baby-menu to build a cpu and a claude usage widget and watch them appear in your menu bar\"\n    src=\"marketing-video\u002Fbaby-menu-marketing-square.gif\"\n    width=\"960\"\n  \u002F>\n\u003C\u002Fp>\n\nEvery menu-bar app ships a fixed set of widgets.\nWant your CPU usage next to your Claude usage next to your next calendar event?\nGood luck waiting for someone to build exactly that.\n\nbaby-menu flips it.\nThe popover menu can run your coding agent to edit the menu on the fly.\nYou ask for a feature in plain English, the agent writes an extension and it hot reloads into the menu in real time.\n\n- **Personal self-evolving software** - jump into the future where every piece of software is personal and self-evolving towards your exact needs.\n- **Ask, don't configure** - tweak the menu using natural language, not configuration.\n- **Worry-free** - every agent turn can be kept or undone.\n\n## Quick Start\n\nRequires macOS 13 Ventura or newer, Homebrew, and a supported, already-authenticated agent CLI such as `claude` or `codex` on `PATH`.\n\n```sh\nbrew install --cask kunchenguid\u002Ftap\u002Fbaby-menu\nopen -a \"Baby Menu\"\n```\n\nClick the tray icon, then ask for a widget in the composer such as:\n\n```text\nadd a CPU usage widget that shows current load in %\n```\n\nBaby Menu writes the extension under `~\u002F.baby-menu\u002Fextensions`, mounts the widget live, and shows Keep \u002F Undo controls for the turn.\nUse Keep to keep it, or Undo to throw it away.\nExtensions can keep local state in Baby Menu's shared SQLite store, contribute settings sections, and register background tasks for work that must continue while the popover is closed.\nThe packaged app opens at login by default.\nUse the popover header to open settings, fully quit the app, or install an available update.\nSettings opens as an overlay so the menu, widgets, and composer keep their state while you configure the app.\nIt lets you turn `launch at system start` off or back on, choose the embedded agent, add\u002Fedit\u002Fremove custom ACP agents, and see unavailable built-in agents with install hints.\nSwitching agents resets the current conversation after confirmation.\n\n## Install Details\n\nThe packaged app stores mutable extensions, the local extension database, caches, agent sessions, custom agent catalog, and preferences under `~\u002F.baby-menu`, so upgrades preserve generated widgets and extension state.\nOn launch, packaged Baby Menu refreshes bundled default extension files such as `AGENTS.md`, `babymenu-env.d.ts`, recipes, and starter extensions from the app template while preserving user-created extension directories.\nPackaged release builds send anonymous, best-effort usage telemetry to a self-hosted Umami instance.\nTelemetry records app startup, popover opens as `\u002Fpopover` page views plus named events, agent turn outcomes, and agent switches; it does not include a user or device id, prompts, file contents, generated code, extension data, or local paths, and network failures are ignored.\nSet `BABY_MENU_TELEMETRY=0` in the launch environment to opt out.\nIf an agent send fails, the composer notice surfaces the underlying failure message instead of only showing a generic unavailable hint.\nBaby Menu detects supported agents from the catalog in order: Claude Code (`claude`), then Codex (`codex`).\nThose built-ins run through bundled clean-room ACP adapters that drive the authenticated local CLIs without inheriting user-level agent settings, skills, MCP servers, or extra rules.\nUse Settings to persist an agent choice across launches.\nSet `BABY_MENU_AGENT=\u003Cname>` in the launch environment to override auto-detection before a preference is saved.\nAdd `~\u002F.baby-menu\u002Fagents.json` to override or append catalog entries manually; source mode reads `agents.json` from the repo root.\nEach entry is an object with `name`, optional `label`, optional `command`, optional `installHint`, and optional `launchCommand`.\nAgents with `launchCommand` are registered as custom [`acpx`](https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Facpx) overrides and are shown as available.\n\n`launchCommand` is any Agent Client Protocol (ACP) server command - `acpx` (the ACP client Baby Menu runs agents through) supports a wide range of coding agents, so you can point an entry at the same command `acpx` uses for one of them.\nFor example: `npx pi-acp` (Pi), `cursor-agent acp` (Cursor), `copilot --acp --stdio` (GitHub Copilot), `qwen --acp` (Qwen Code), or `npx -y opencode-ai acp` (OpenCode).\nThe underlying CLI must be installed and authenticated.\n\n```json\n[\n  {\n    \"name\": \"pi\",\n    \"label\": \"Pi\",\n    \"launchCommand\": \"npx pi-acp\"\n  }\n]\n```\n\nYou can also add, edit, and remove custom agents directly from Settings by entering an id, optional label, and ACP launch command.\nSettings-added agents are saved to the same `agents.json`, apply immediately, and are editable\u002Fremovable; built-in Claude Code and Codex entries remain read-only.\n\nUpdate with Homebrew:\n\n```sh\nbrew update\nbrew upgrade --cask baby-menu\n```\n\nWhen a newer GitHub Release is available, Baby Menu shows an update indicator in the popover header.\nThe indicator opens a small dialog with the same Homebrew upgrade command and a link to the release notes.\nIf Baby Menu is running during a Homebrew Cask upgrade, the cask quits the old app and relaunches the newly installed app after replacement.\nFresh installs and upgrades while Baby Menu is closed do not launch the app automatically.\n\n## From Source\n\nUse source mode when developing Baby Menu itself.\nEnd users should install the Homebrew Cask above.\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fkunchenguid\u002Fbaby-menu.git\ncd baby-menu\npnpm install\npnpm dev\n```\n\nRequires Node `>=22.12` and `pnpm@11.1.1` (declared in `packageManager`).\n\n## How It Works\n\n```\n   ┌─────────────────────┐\n   │  macOS tray popover │   (React renderer, adaptive size)\n   │ + Menu \u002F Settings   │\n   │ + Update indicator  │\n   │ + Quit              │\n   └──────────┬──────────┘\n              │  send()\n              ▼\n   ┌───────────────────────┐       ┌──────────────────────┐\n   │  BabyMenuAgentRuntime ├──────►│    Change Session    │\n   │   wraps acpx\u002Fruntime  │       │   git or snapshot    │\n   └──────────┬────────────┘       │   by runtime mode    │\n              │                    └──────────┬───────────┘\n              │ edits files                   │ save \u002F rollback\n              ▼                               ▼\n   ┌─────────────────────┐       ┌──────────────────────┐\n   │ active extensions\u002F  │       │   save snapshot or   │\n   │  layout.tsx         │◄──────┤   rollback files     │\n   │  \u003Cid>\u002Fwidget.tsx    │       │   safely             │\n   │  \u003Cid>\u002Fserver.ts     │       │                      │\n   └──────────┬──────────┘       │                      │\n              │ hot-reload       └──────────────────────┘\n              ▼\n   ┌─────────────────────┐\n   │     WidgetHost      │\n   │ mounts layout\u002Fwidget│\n   └─────────────────────┘\n```\n\n- **Three processes, one bridge** - the renderer never touches git, the agent, or the filesystem.\n  Everything goes through `window.babyMenu` exposed in `src\u002Fpreload\u002Findex.ts`.\n- **Recipes are specs, not prompts** - HTML files under `extensions\u002Frecipes\u002F` describe a widget's capability, data sources, fallback behavior, and acceptance criteria.\n  The agent reads the matching recipe before implementing.\n- **Bundled ACP adapters** - the built-in Claude Code and Codex entries launch `out\u002Fadapters\u002F\u003Cname>\u002Findex.mjs`, which wraps the local authenticated CLI and keeps Baby Menu's embedded agent isolated from user-level agent configuration.\n  If a restart leaves behind a persisted ACP session that an adapter cannot resume, Baby Menu records the failed attempt, deletes that stale session record, and retries once with a fresh session.\n- **Live custom agent catalog** - Settings-owned custom ACP agents are persisted to `agents.json`, registered as `acpx` overrides immediately, and kept separate from read-only built-ins.\n- **Settings overlay** - Settings covers the default menu without unmounting it, so chat composer, widget, and run state survive opening and closing Settings.\n- **Release update indicator** - the main process checks the latest GitHub Release at most every four hours, keeps failures silent, and shows a header indicator with `brew update && brew upgrade --cask baby-menu` only when a newer packaged release exists.\n  Source\u002Fdev mode simulates an available update so the UI can be exercised locally.\n  The released Homebrew Cask relaunches Baby Menu after an upgrade only when the old app was running before uninstall started.\n- **Custom popover layouts** - an extension workspace may include a root `layout.tsx` default export that receives active widgets and `renderWidget(id)`, arranges the popover canvas, and lets the window adapt to both width and height.\n  Workspaces without `layout.tsx` keep the built-in stacked column.\n- **Extension settings sections** - extensions may export `BabyMenuSettingsSection` from `widget.tsx`; the Settings page discovers those renderer-only sections through the same module pipeline as widgets and renders the host-owned frame around each body.\n- **Extension server actions** - privileged work (shell, network, credentials) lives in `\u003Cextension-id>\u002Fserver.ts` and is invoked from widgets and settings sections via `window.babyMenu.capabilities.invoke(extensionId, action, input)`.\n  No per-widget IPC channels.\n  Baby Menu keeps an unchanged `server.ts` module instance alive across invokes and background ticks, so module-scope values are only an ephemeral cache and reset after code edits or app restarts.\n- **Local extension storage** - extensions share a local SQLite store exposed as `context.db` in server actions and background tasks, and as `window.babyMenu.db` in widgets and settings sections.\n  Use this store for settings, history, rate baselines, and anything else that must survive reloads.\n- **Background tasks vs view refresh** - `refreshView` \u002F `viewRefreshIntervalMs` keeps a visible widget current and pauses while the popover is hidden; `export const background` in `server.ts` runs on a host-owned timer, clamped to a 60-second minimum, for work that must continue while the popover is closed.\n- **Runtime-specific extension roots** - `pnpm dev` edits gitignored `extensions-dev\u002F`; packaged builds seed and edit `~\u002F.baby-menu\u002Fextensions` with internal snapshot save\u002Frollback.\n  Tracked `extensions\u002F` remain the source templates for dev and packaged extension workspaces, including the generated `@babymenu\u002Fcontracts` declaration in `extensions\u002Fbabymenu-env.d.ts`.\n- **Stable extension contracts** - extension code imports public host types with type-only `import ... from \"@babymenu\u002Fcontracts\"`; the generated declaration is shipped into each extension workspace so extensions never need to reach back into `src\u002Fshared\u002Fcontracts.ts`.\n- **Anonymous telemetry** - packaged release builds fire best-effort Umami events for app start, popover open, agent turn status (`success`, `error`, `timeout`, or `blocked_dirty`), and agent switching, and also record each popover open as the `\u002Fpopover` page view.\n  Built-in agent names are reported as `claude` or `codex`; custom agent names are reported only as `custom`.\n\n## Layout\n\n| Path                        | What lives here                                                                        |\n| --------------------------- | -------------------------------------------------------------------------------------- |\n| `src\u002Fadapters\u002F`             | Bundled clean-room ACP adapters for built-in Claude Code and Codex agents              |\n| `src\u002Fmain\u002F`                 | Electron lifecycle, tray, popover, IPC, git, agent runtime, update checks              |\n| `src\u002Fpreload\u002Findex.ts`      | The stable `window.babyMenu` bridge                                                    |\n| `src\u002Frenderer\u002F`             | React UI: `AgentChat`, `WidgetHost`, custom layouts, settings, updates, app controls   |\n| `src\u002Fui\u002F`                   | Shared `@babymenu\u002Fui` design system for shell and extension renderer surfaces          |\n| `src\u002Fshared\u002Fcontracts.ts`   | `BabyMenuApi`, `BabyMenuWidget`, `BabyMenuSettingsSection`, `GitSessionSnapshot`, etc. |\n| `src\u002Fshared\u002Fextension-contract-names.ts` | Public type names exported through `@babymenu\u002Fcontracts`                  |\n| `extensions\u002Fbabymenu-env.d.ts` | Generated `@babymenu\u002Fcontracts` declarations copied into extension workspaces       |\n| `extensions\u002Flayout.tsx`     | Optional root popover layout component for arranging active widgets                     |\n| `extensions\u002F\u003Cid>\u002F`          | Tracked extensions (`widget.tsx` descriptors, `components.tsx` views, `server.ts`)      |\n| `extensions\u002Frecipes\u002F*.html` | Self-contained widget specs the agent reads                                            |\n| `extensions-dev\u002F`           | Gitignored dev workspace prepared by `scripts\u002Fdev.mjs`                                 |\n| `marketing-video\u002F`          | HyperFrames source plus committed MP4\u002FGIF assets for the README hero video             |\n| `~\u002F.baby-menu\u002Fextensions\u002F`  | Packaged app extension workspace                                                       |\n| `~\u002F.baby-menu\u002Fbaby-menu.db` | Packaged app's shared local SQLite store for extensions                                |\n| `~\u002F.baby-menu\u002Fcache\u002F`       | Packaged widget, server-action, snapshot, and agent caches                             |\n| `tests\u002F`                    | Vitest tests (e2e specs are `tests\u002Fe2e-*.test.ts`)                                     |\n\n## Environment Flags\n\n| Var                               | Effect                                                                                                                                                                                                            |\n| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `BABY_MENU_KEEP_POPOVER_OPEN=1`   | Disables blur-to-hide so devtools \u002F external windows stay up                                                                                                                                                      |\n| `BABY_MENU_AGENT=\u003Cname>`          | Overrides agent auto-detection when no saved Settings choice exists                                                                                                                                               |\n| `BABY_MENU_AGENT_TIMEOUT_MS=\u003Cms>` | Overrides the embedded-agent request timeout                                                                                                                                                                      |\n| `BABY_MENU_EXTENSIONS_DIR=\u003Cdir>`  | Overrides the active extension workspace in source\u002Fdev runs. Dev Tailwind scans only `extensions\u002F` and `extensions-dev\u002F`, so overrides outside those paths need matching `@source` coverage for widget utilities. |\n| `BABY_MENU_TELEMETRY=0`           | Disables packaged-release telemetry; `false` and `off` are also accepted                                                                                                                                          |\n| `BABY_MENU_UMAMI_HOST=\u003Curl>`      | Overrides the self-hosted Umami endpoint used by telemetry. Source\u002Fdev\u002Ftest builds are no-op unless a website id is also configured.                                                                               |\n| `BABY_MENU_UMAMI_WEBSITE_ID=\u003Cid>` | Overrides or supplies the Umami website id used by telemetry. The release workflow reads this from the GitHub Actions `vars.*` context, not a secret.                                                             |\n\n## Development\n\n```sh\npnpm dev          # run Electron + renderer dev server with a gitignored extensions-dev\u002F sandbox\npnpm dev:reset    # wipe extensions-dev\u002F and agent session cache, then start fresh\npnpm build        # build main + preload + renderer + bundled adapters into out\u002F\npnpm generate:contracts # regenerate extensions\u002Fbabymenu-env.d.ts from src\u002Fshared\u002Fcontracts.ts\npnpm package:mac  # clean release\u002F and create an ad-hoc-signed Baby Menu Dev.app\npnpm dist:mac     # build Baby Menu Dev.app and create a universal DMG in release\u002F\npnpm test         # run all Vitest tests\npnpm test:e2e     # only e2e tests (including acpx\u002Fruntime plus bundled adapter coverage)\npnpm typecheck    # tsc --noEmit\npnpm lint         # tsc --noEmit (same as typecheck)\n```\n\nUse `pnpm dev` for source iteration in a throwaway sandbox - the agent edits the gitignored `extensions-dev\u002F` copy and your tracked tree stays clean.\nUse `pnpm dev:reset` when recipe or extension guidance changes; it also clears `.cache\u002Fbaby-menu\u002Facp-sessions` so the embedded agent re-reads the fresh copied specs instead of continuing from prior conversation state.\nRun `pnpm generate:contracts` after changing extension-facing types in `src\u002Fshared\u002Fcontracts.ts` or the public name list in `src\u002Fshared\u002Fextension-contract-names.ts`; CI fails if the committed `extensions\u002Fbabymenu-env.d.ts` is stale.\nSource\u002Fdev mode never touches macOS login items, including Electron's `setLoginItemSettings` API.\nUse `pnpm package:mac` when you want to test the actual packaged app from `release\u002Fmac-universal\u002FBaby Menu Dev.app`.\nLocal packaging uses the `Baby Menu Dev` product name and `com.kunchenguid.baby-menu.dev` bundle id so local builds do not shadow the released `\u002FApplications\u002FBaby Menu.app` in macOS LaunchServices.\nThe universal package is expected to run on both Intel and Apple Silicon Macs, so macOS native prebuilt dependencies must stay installed for `x64` and `arm64` and must stay covered by `electron-builder.yml` `x64ArchFiles` when new native packages are added.\nKeep `electron-builder` at `26.8.2` or newer so pnpm-deduped dependencies are included correctly in packaged builds.\n\nThe README hero animation is committed from `marketing-video\u002Fbaby-menu-marketing-square.gif`.\nUse the HyperFrames project in `marketing-video\u002F` when revising that asset: `pnpm --dir marketing-video check` validates the composition, and `pnpm --dir marketing-video render` renders the MP4 before regenerating the 960x960 GIF.\n\nSingle test: `pnpm vitest run tests\u002F\u003Cname>.test.ts` or `pnpm vitest run -t \"\u003Cpattern>\"`.\n\nTDD is required for bug fixes and new features.\nTests live in `tests\u002F` at the repo root, not co-located.\n\n## License\n\nBaby Menu is released under the MIT License.\nSee [LICENSE](LICENSE) for details.\n","baby-menu 是一款可以自定义功能的菜单栏应用。其核心功能是通过用户自然语言指令，利用内置的编码代理实时生成和更新菜单项或小工具，无需手动配置即可满足个性化需求。基于Electron框架开发，采用TypeScript编写，支持macOS平台，并允许扩展保存本地状态、贡献设置部分以及注册后台任务。适用于需要高度定制化菜单栏工具且偏好使用自然语言而非传统配置方法来调整软件功能的场景。",2,"2026-06-11 04:08:21","CREATED_QUERY"]