Contributions are what makes the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Before submitting a new issue or PR, check if it already exists in issues or PRs.
- GitHub issues: take note of the
🚨 needs approvallabel.- For Contributors:
- Feature Requests: Wait for a core member to approve and remove the
🚨 needs approvallabel before you start coding or submit a PR. - Bugs, Security, Performance, Documentation, etc.: You can start coding immediately, even if the
🚨 needs approvallabel is present. This label mainly concerns feature requests.
- Feature Requests: Wait for a core member to approve and remove the
- Our Process:
- Issues from non-core members automatically receive the
🚨 needs approvallabel. - We greatly value new feature ideas. To ensure consistency in the product's direction, they undergo review and approval.
- Issues from non-core members automatically receive the
- For Contributors:
The development branch is dev. This is the branch that all pull
requests should be made against. We will merge into main every week.
To develop locally:
-
Fork this repository to your own GitHub account and then clone it to your local device.
-
Create a new branch:
git checkout -b MY_BRANCH_NAME
-
Install bun:
-
Install the dependencies with:
bun i
-
Set up your
.envfile:- Duplicate
.env.exampleto.env. - Use
openssl rand -base64 32to generate a key and add it underSECRET_KEYin the.envfile. - Setup Trigger.dev
- CD into apps/app and run
bunx trigger.dev@latest login, thenbunx trigger.dev@latest dev - Use
openssl rand -base64 32to generate a key and add it underTRIGGER_SECRET_KEYin the.envfile.
- CD into apps/app and run
- Duplicate
-
Start developing and watch for code changes:
bun run dev
You can build the project with:
bun run buildPlease be sure that you can make a full production build before pushing code.
Coming soon.
Coming soon.
To check the formatting of your code:
bun run lintIf you get errors, be sure to fix them before committing.
Every endpoint in apps/api/src/ ships to three places: the public OpenAPI spec (packages/docs/openapi.json), the customer-facing MCP server published as @trycompai/mcp-server on npm, and the runtime ValidationPipe. Endpoints that break the contract either silently fail for AI agents (Claude Desktop, Cursor, Codex, etc.) or reject requests at runtime.
Read the full contract before adding a body-accepting endpoint:
- AI tool users:
.claude/skills/api-endpoint-contract/SKILL.md(Claude auto-loads) or.cursor/rules/api-endpoint-contract.mdc(Cursor auto-loads). - For Codex/ChatGPT and human reading: see the "API Endpoint Contract" section in
AGENTS.md.
Short checklist for every body endpoint:
- DTO is a class (not interface, not inline type).
- Every field has both
@ApiProperty/@ApiPropertyOptionaland a class-validator decorator (@IsString,@IsOptional,@IsObject,@IsArray, etc.). @ApiBody({ type: DtoClass })on the endpoint.@ApiOperation.description≤ 240 chars (truncator inseo-text.ts).- Long-running ops return a run handle and document the poll target — don't make agents wait synchronously.
- File uploads accept an
s3Keyfield (presigned upload path) — never base64 inline from agents. - After your change:
bun run --filter '@trycompai/api' devregeneratespackages/docs/openapi.jsonon boot — commit it with your PR. The daily Speakeasy CI reads from that file.
- Be sure to check the "Allow edits from maintainers" option while creating your PR.
- If your PR refers to or fixes an issue, be sure to add
refs #XXXorfixes #XXXto the PR description. ReplacingXXXwith the respective issue number. See more about Linking a pull request to an issue. - Be sure to fill the PR Template accordingly.
Lastly, make sure to keep the branches updated (e.g. click the Update branch button on GitHub PR).