- Monorepo managed by
turboandlerna; scripts run withbun. - Source lives under
packages/*:core(runtime, shared types),server(Express API),client(React UI),cli(elizaos CLI).- Plugins and starters:
plugin-*,project-*.
- Other roots:
examples/(standalone samples),scripts/(automation),plugin-specification/*(specs).
- Install:
bun install(use Bun only). - Build all:
bun run build(filters exclude app/config). Examples:bun run build:core,bun run build:client. - Dev/watch:
bun run dev(monorepo), package-local:cd packages/core && bun run dev. - Start CLI locally:
bun run startorbun run start:appfor the app. - Tests (top level):
bun run test, or per package:- Core:
bun run test:core - Server:
cd packages/server && bun run test - Client unit:
cd packages/client && bun run test:unit - Client e2e:
cd packages/client && bun run test:e2e(ortest:e2e:with-server).
- Core:
- Language: TypeScript (ESM). Prefer Bun APIs; avoid Node-only modules where Bun equivalents exist.
- Formatting: Prettier (2 spaces, semicolons, single quotes, trailing comma es5, width 100). Run
bun run formatorformat:check. - Linting:
bun run lint(Prettier; ESLint used inclient). - Naming: camelCase (vars/functions), PascalCase (types/components), kebab-case for package folders.
- Unit tests with Bun test runner; name files
*.test.ts(x)near sources. - Use
--coveragewhen changing core/server:bun run test:coreorcd packages/server && bun run test:coverage. - Client: component/unit via Bun/Testing Library; e2e via Cypress (
bun run cypress:open).
- Conventional Commits:
feat:,fix:,chore:, optional scope (e.g.,fix(server): ...). Use[skip ci]for docs-only. - PRs must include: clear description, linked issues, test plan, screenshots for UI changes, and pass build/lint/tests.
- Update docs/examples when behavior changes. Keep changes scoped to one concern.
- Copy
.env.exampleto.env; never commit secrets. Required: Node23.x, Bun1.2.x. - Post-install initializes submodules; if needed, rerun
bash ./scripts/init-submodules.sh.