# Clone the repo
git clone https://github.com/codercops/chatcops.git
cd chatcops
# Install dependencies
pnpm install
# Build all packages
pnpm -r build
# Run tests
pnpm test
# Typecheck
pnpm -r typecheckpackages/
core/ - @chatcops/core (AI providers, tools, knowledge base)
widget/ - @chatcops/widget (embeddable chat UI)
server/ - @chatcops/server (server handler + adapters)
website/ - Marketing site + Starlight docs (Astro)
- Create a branch:
git checkout -b feature/my-feature - Make changes
- Run tests:
pnpm test - Run typecheck:
pnpm -r typecheck - Add a changeset:
pnpm changeset - Open a PR
# Build widget in watch mode
cd packages/widget
pnpm dev
# Open dev.html in a browser for live testingTo test with a real backend, run the Express example:
cd packages/server
ANTHROPIC_API_KEY=sk-... npx tsx src/examples/express-server.ts- Create
packages/core/src/providers/{name}.ts - Implement the
AIProviderinterface - Add a format converter in
base.ts - Register in the
createProviderfactory - Export from
index.ts - Add tests
- Create
packages/core/src/i18n/{code}.ts - Export all
LocaleStringsfields - Register in
packages/core/src/i18n/index.ts - Add to the test in
tests/i18n/locales.test.ts
cd website
pnpm devThe website requires a .env.local file with:
# Required — powers the live chat demo on the landing page
OPENAI_API_KEY=sk-...
# Optional — visitor counter (Upstash Redis)
UPSTASH_REDIS_REST_URL=https://your-endpoint.upstash.io
UPSTASH_REDIS_REST_TOKEN=your-token-hereThe visitor counter gracefully degrades without Upstash credentials (displays -). Google Analytics (G-GLYL9J6QYX) is hardcoded in the layout and Starlight config.
Use conventional commits: feat:, fix:, chore:, docs:, test:, refactor: