Resources
Contributing
We welcome contributions to the Sentry CLI! This guide will help you get started.
Development Setup
Prerequisites
- Bun runtime (v1.0 or later)
- Git
Getting Started
# Clone the repositorygit clone https://github.com/getsentry/cli.gitcd cli
# Install dependenciesbun install
# Run CLI in development modebun run --env-file=.env.local src/bin.ts --help
# Run testsbun testEnvironment Variables
Create a .env.local file for development:
cp .env.example .env.localEdit .env.local with your development credentials.
Project Structure
cli/├── src/│ ├── bin.ts # Entry point│ ├── app.ts # Stricli application setup│ ├── context.ts # Dependency injection context│ ├── commands/ # CLI commands│ │ ├── auth/ # Authentication commands│ │ ├── org/ # Organization commands│ │ ├── project/ # Project commands│ │ ├── issue/ # Issue commands│ │ └── event/ # Event commands│ ├── lib/ # Shared utilities│ └── types/ # TypeScript types and Zod schemas├── test/ # Test files├── script/ # Build scripts└── docs/ # Documentation siteBuilding
# Build for current platformbun run build
# Build for all platformsbun run build:all
# Create npm bundlebun run bundleTesting
# Run all testsbun test
# Run specific test filebun test test/path/to/test.ts
# Run with watch modebun test --watch
# Run with coveragebun test --coverageCode Style
The project uses Ultracite for linting and formatting:
# Check for issuesbun run lint
# Auto-fix issuesbun run lint:fix
# Type checkingbun run typecheckSubmitting Changes
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Run tests and linting:
bun test && bun run lint - Commit with conventional commits:
git commit -m "feat: add new feature" - Push and create a pull request
Conventional Commits
We use conventional commits for automatic changelog generation:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesrefactor:- Code refactoringtest:- Test changeschore:- Maintenance tasks
Getting Help
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Questions and discussions