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/ # login, logout, refresh, status, token, whoami│ │ ├── cli/ # defaults, feedback, fix, setup, upgrade│ │ ├── dashboard/ # list, view, create, add, edit, delete│ │ ├── event/ # view, list│ │ ├── issue/ # list, events, explain, plan, view│ │ ├── log/ # list, view│ │ ├── org/ # list, view│ │ ├── project/ # create, delete, list, view│ │ ├── release/ # list, view, create, finalize, delete, deploy, deploys, set-commits, propose-version│ │ ├── repo/ # list│ │ ├── sourcemap/ # inject, upload│ │ ├── span/ # list, view│ │ ├── team/ # list│ │ ├── trace/ # list, view, logs│ │ ├── trial/ # list, start│ │ ├── api.ts # Make an authenticated API request│ │ ├── help.ts # Help command│ │ ├── init.ts # Initialize Sentry in your project (experimental)│ │ └── schema.ts # Browse the Sentry API schema│ ├── lib/ # Shared utilities│ └── types/ # TypeScript types and Zod schemas├── test/ # Test files (mirrors src/ structure)├── script/ # Build and utility scripts├── plugins/ # Agent skill files└── docs/ # Documentation site (Astro + Starlight)Building
# 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