Skip to content

Development setup

All commands run from the repository root. The repository pins pnpm@11.5.0; if pnpm is not installed globally, replace the leading pnpm with npm exec --yes pnpm@11.5.0 --.

Terminal window
pnpm install
test -f .env || cp .env.example .env # then edit as needed
pnpm docker:up # starts PostgreSQL (pgvector)
pnpm db:generate # generate Prisma client
pnpm db:migrate # run migrations
pnpm build
pnpm --filter mcp-server dev # MCP server on http://localhost:3000

This is the standard profile flow (the default). For the single-user lite profile and the full walkthrough, see Installation.

Run these before opening a pull request:

Terminal window
pnpm build
pnpm lint
pnpm typecheck
pnpm test
pnpm docs:check

Turborepo lets you filter any script to one workspace:

Terminal window
pnpm --filter @engram/memory-ltm test
pnpm --filter mcp-server test:e2e:docker
pnpm --filter @engram/vector-store test # set PGVECTOR_TEST_URL for pgvector integration tests
pnpm --filter docs dev # docs site on http://localhost:3001

pgvector integration tests and the pgvector backend require the pgvector/pgvector:pg16+ Docker image; plain postgres:*-alpine images lack the extension.

Use project and framework generators when they exist instead of hand-creating files:

Task Command
Generate NestJS resource nest g resource <name>
Generate NestJS module nest g module <name>
Generate NestJS service nest g service <name>
Generate NestJS controller nest g controller <name>
Generate Prisma client pnpm db:generate
Create Prisma migration pnpm db:migrate
Open Prisma Studio pnpm db:studio

Manual file creation is fine for documentation, Zod schemas, custom types, small utilities, and configuration files when no generator exists.

Terminal window
pnpm eval # recall quality harness (precision@k, recall@k, MRR, nDCG@k)
pnpm bench:backends # vector-backend latency benchmark
  • Keep setup instructions short and copy-pasteable.
  • Put detailed explanations in focused docs and link to them from the root README.
  • pnpm docs:check validates frontmatter and relative links on every .md file in the repo; the docs site build additionally validates internal links in .mdx content.