src/contains the TypeScript source. Entry points aresrc/index.ts(CLI) andsrc/client.ts(SDK-style exports).src/commands/holds individual CLI command implementations.src/utils/provides shared helpers.tests/includes Bun tests (e.g.,tests/cli.test.ts).dist/is the build output (dist/index.js), generated bybun run build.
bun run dev: run the CLI in watch mode for local development.bun run start: executesrc/index.tswithout watching.bun test: run the Bun test suite.bun run lint: lintsrc/andtests/with Biome.bun run format: auto-format code with Biome.bun run typecheck: runtsc --noEmit.bun run build: bundle the CLI todist/and make it executable.bun run release:patch|minor|major: bump version, run lint/tests/build, tag, and push.
- Use Bun for local tooling (
bun run,bun test,bun run build) instead of npm/yarn. - Prefer Node.js built-in modules (
node:fs,node:path, etc.) over Bun-specific runtime APIs unless there is a clear need.
- Keep
AGENTS.mdupdated whenever code changes affect tooling, runtime APIs, workflows, or conventions. - Always run lint and tests to verify code changes.
- Use Conventional Commits style for git commit messages (e.g.,
feat:,fix:,chore:).
- Use 2-space indentation, double quotes, and a 120-character line width (Biome).
- Keep file and test names in
kebab-caseorcamelCaseas already used (e.g.,client.ts,cli.test.ts). - Prefer TypeScript types over
any; follow existing module boundaries insrc/commands/andsrc/utils/.
- Framework: Bun’s built-in test runner (
bun test). - Tests live in
tests/and follow*.test.tsnaming. - Add or update tests for new commands or client behavior; keep unit tests fast and isolated from real Intercom API calls.
- Commit messages follow a lightweight Conventional Commit style (e.g.,
feat(commands): add ticket close). - PRs should include a clear description, any relevant screenshots or CLI output, and the commands you ran (e.g.,
bun test). - Link related issues when applicable.
- Use
INTERCOM_ACCESS_TOKENor~/.config/intercom-cli/config.jsonfor auth; never commit real tokens. - Avoid logging sensitive data in tests or CLI examples.