Skip to content

Development

Terminal window
pnpm install # install dependencies
pnpm run build # compile TypeScript
pnpm run typecheck # type-check without emitting
pnpm run lint # ESLint
pnpm test # run tests (vitest)
pnpm run test:watch # run tests in watch mode
pnpm run dev # build + run
pnpm run mcp # run MCP server
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 types
  • ESM modules"type": "module" in package.json, imports use .js extensions
  • 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 by config.ts

Tests use Vitest and are located alongside source files or in src/__tests__/.

Terminal window
pnpm test # run once
pnpm run test:watch # watch mode

Cryyer has six distinct entry points, each compiled from src/ to dist/:

Entry pointPurposeTypical usage
index.tsFull pipeline (gather → draft → send)Local dev, manual runs
draft.tsGenerate drafts, create GitHub issuesweekly-draft.yml workflow
send-on-close.tsSend emails when issue is closedsend-update.yml workflow
draft-file.tsGather activity → LLM draft → write filedraft-email.yml workflow, CLI
send-file.tsRead draft file → send emailssend-email.yml workflow, CLI
mcp.tsMCP server for Claude DesktopInteractive review