TypeScript Monorepo Template
This template gives you a Bun-only monorepo with:
- Moonrepo at the workspace root
- strict shared TypeScript configs
- Varlock with a committed
.env.schema - a Nix flake shell built through
repo-lib
First Run
- Enter the shell with
direnv allowornix develop. - Install workspace dependencies with
bun install. - Review and customize
.env.schemafor your repo. - Run
bun run env:check. - Run
moon run :typecheck.
Layout
apps/for applicationspackages/for shared librariestsconfig/for shared TypeScript profilesmoon.ymlfor root Moonrepo tasks
Varlock
bunfig.toml preloads varlock/auto-load, and the root scripts expose:
bun run env:checkbun run env:scan
If you use OpenBao locally, set OPENBAO_ADDR, OPENBAO_NAMESPACE, and OPENBAO_CACERT in your shell or an ignored .env.sh file before running those commands.