# AGENTS.md

Build your personal knowledge base with Trilium Notes

## Setup

```
pnpm install
```

## Commands

```
pnpm typecheck          # type check without emitting
pnpm client:test
pnpm client:build
pnpm client:coverage
pnpm client:stylelint
pnpm server:test
pnpm server:build
pnpm server:coverage
```

## Layout

- `apps/`     1661 source files
- `packages/` 999 source files
- `scripts/`  24 source files
- `docs/`     5 source files

## Conventions

- Tests live alongside the code they cover, following `apps/client/src/components/entrypoints.spec.ts`.
- TypeScript is not in strict mode. Turning it on catches a whole class of mistakes before they run.
- CI defines what passing means. See `.github/workflows/checks.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- `packages/pdfjs-viewer/viewer/viewer.mjs` is 803KB. It will not fit comfortably in context, so read it in parts.

---

Drafted by agentreadme.com from what is in this repository. Everything marked TODO
needs a human. Check it in as AGENTS.md at the root.
