Development
Commands
Section titled “Commands”pnpm install # install dependenciespnpm run build # compile TypeScriptpnpm run typecheck # type-check without emittingpnpm run lint # ESLintpnpm test # run tests (vitest)pnpm run test:watch # run tests in watch modepnpm run dev # build + runpnpm run mcp # run MCP serverProject structure
Section titled “Project structure”src/├── index.ts # Full pipeline entry point├── draft.ts # Draft generation entry point├── send-on-close.ts # Send on issue close entry point├── draft-file.ts # CLI: cryyer draft-file (file-based drafts)├── send-file.ts # CLI: cryyer send-file (file-based sends)├── mcp.ts # MCP server entry point├── config.ts # Env vars + product YAML loading├── gather.ts # GitHub activity fetching├── llm-provider.ts # LLM adapter pattern├── summarize.ts # Prompt building + LLM calls├── subscriber-store.ts # Subscriber store adapter pattern├── email-provider.ts # Email provider adapter pattern (Resend, Gmail)├── send.ts # Email sending via configured email provider├── auth.ts # cryyer auth gmail — OAuth 2.0 flow└── types.ts # Shared TypeScript typesKey conventions
Section titled “Key conventions”- ESM modules —
"type": "module"in package.json, imports use.jsextensions - TypeScript strict mode — target ES2022, module Node16
- Adapter pattern — LLM providers and subscriber stores use a factory + interface pattern
- Bot filtering — dependabot, renovate, and github-actions activity is filtered out in
gather.ts - Product config — products are YAML files in
products/, loaded at startup byconfig.ts
Testing
Section titled “Testing”Tests use Vitest and are located alongside source files or in src/__tests__/.
pnpm test # run oncepnpm run test:watch # watch modeEntry points
Section titled “Entry points”Cryyer has six distinct entry points, each compiled from src/ to dist/:
| Entry point | Purpose | Typical usage |
|---|---|---|
index.ts | Full pipeline (gather → draft → send) | Local dev, manual runs |
draft.ts | Generate drafts, create GitHub issues | weekly-draft.yml workflow |
send-on-close.ts | Send emails when issue is closed | send-update.yml workflow |
draft-file.ts | Gather activity → LLM draft → write file | draft-email.yml workflow, CLI |
send-file.ts | Read draft file → send emails | send-email.yml workflow, CLI |
mcp.ts | MCP server for Claude Desktop | Interactive review |