@alook/app

中文文档
0.1.64发布于 2026/11/05Apache-2.0ES Module构建来源已验证近 30 天下载 3486

Run Alook locally — one command, no clone needed

原始使用文档
文档目录13 节
  1. Quick Start
  2. Commands
  3. Embedded daemon
  4. Options
  5. Architecture
  6. Services
  7. Directory Layout
  8. Database Migrations
  9. Secrets Management
  10. Dev Mode
  11. Requirements
  12. Limitations
  13. License

@alook/app

Run Alook locally — one command, no clone needed.

Quick Start

npx @alook/app onboard

This will:

  1. Check your environment (Node.js >= 20, AI runtime)
  2. Install Alook to ~/.alook/self-hosted/
  3. Generate secrets (BETTER_AUTH_SECRET, ENCRYPTION_KEY)
  4. Run database migrations (SQLite via Cloudflare D1 local)
  5. Start all services (web, email worker, WebSocket, wake worker)
  6. Create your local account
  7. Pair this machine and start @alook/daemon
  8. Open the dashboard in your browser

Commands

CommandDescription
npx @alook/app onboardFull setup: install, migrate, start, and pair
npx @alook/app startStart services from an existing installation
npx @alook/app stopStop all services
npx @alook/app updateUpdate services and re-run migrations

Embedded daemon

@alook/app bundles the current @alook/daemon CLI. Pairing happens automatically during onboard; saved machine credentials remain private in the app-owned data directory.

npx @alook/app daemon list                   # List paired/running daemons
npx @alook/app daemon status [machine-id]    # Check agent status
npx @alook/app daemon stop <machine-id>      # Stop one daemon
npx @alook/app daemon start --id <machine-id> # Restart without exposing its credential

Options

--port-web <port>    Web server port (default: 15210)
--port-email <port>  Email worker port (default: 15211)
--port-ws <port>     WebSocket worker port (default: 15212)
--port-wake <port>   Wake worker port (default: 15213)
--skip-register      Skip account creation (onboard only)

Architecture

Services

Alook runs four local services, each in its own Wrangler dev process:

ServiceDefault PortDescription
Web15210Main web app (Next.js on Wrangler) — dashboard, API, auth
Email Worker15211Email processing worker
WebSocket (WS-DO)15212Real-time communication via Durable Objects
Wake Worker15213Dispatches unread-message wake events to local daemons

All services share a single SQLite database (Cloudflare D1 local mode) with state persisted at ~/.alook/self-hosted/web/.wrangler/state/.

Directory Layout

~/.alook/self-hosted/
├── web/                  # Web app (wrangler.toml, migrations, .dev.vars)
│   ├── .wrangler/state/  # D1 database & KV persistence
│   └── migrations/       # SQL migration files
├── email-worker/         # Email worker (wrangler.toml, .dev.vars)
├── ws-do/                # WebSocket Durable Object worker
├── queue-worker/         # Queue task consumer (agent wake + mobile push)
├── daemon/               # Private machine credentials, daemon state, and logs
├── logs/                 # Service logs (web, email, WS, and wake workers)
└── .pids.json            # PID tracking for running services

Database Migrations

Migrations are SQL files applied via wrangler d1 migrations apply --local. They run automatically during:

  • onboard — applies all migrations on fresh install
  • update — applies any new migrations after installing the latest version

Wrangler tracks which migrations have been applied; only pending ones are executed.

Secrets Management

On first onboard, secrets are auto-generated and written to .dev.vars files:

  • Web: BETTER_AUTH_SECRET, BETTER_AUTH_URL, ENCRYPTION_KEY, OAuth client ID/secret placeholders
  • Email Worker: ENCRYPTION_KEY (synced from web)

Secrets are never overwritten on subsequent runs — only missing files are created.

Dev Mode

When the ALOOK_PROJECT_ROOT environment variable is set, @alook/app runs in dev mode against the monorepo:

  • Runs pnpm predev to set up environment files
  • Runs pnpm db:migrate for migrations (instead of Wrangler CLI)
  • Starts web via next dev (instead of Wrangler)
  • Services run in foreground with prefixed log output ([web], [email-worker], [ws-do])
  • Ctrl+C cleanly stops all services
ALOOK_PROJECT_ROOT=/path/to/alook npx @alook/app onboard

Requirements

  • Node.js >= 20.9
  • A supported agent runtime such as Claude Code, Codex, OpenCode, Pi, or Cursor

Limitations

  • Email send/receive is not available in local mode
  • OAuth login (GitHub, Google) is disabled; use email/password

License

Apache-2.0 — see LICENSE.

版本与发布记录

@alook/app 共发布 186 个版本,首次发布于 2026/05/13;过去 12 个月发布了 186 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.64latest2026/11/051 天前
0.1.632026/11/024 天前
0.1.622026/10/316 天前
0.1.612026/10/307 天前
0.1.602026/10/2710 天前
0.1.592026/10/2512 天前

关于 @alook/app 的常见问题

@alook/app 是什么?

Run Alook locally — one command, no clone needed

如何安装 @alook/app?

在项目目录运行 npm install @alook/app,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 alook-app,可以用 npx alook-app 直接运行。

@alook/app 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/alook__app 是否存在。

@alook/app 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@alook/app 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.9。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@alook/app 可以商用吗?

@alook/app 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@alook/app 的下载量有多少?

根据 npm 官方下载统计,@alook/app 在 2026/10/06 – 2026/11/04 这 30 天内被下载 3,486 次,日均约 116 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@alook/app 还在维护吗?

最新版本 0.1.64 发布于 2026/11/05(1 天前);至今共发布 186 个版本,其中过去 12 个月发布了 186 个;首次发布于 2026/05/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。