Resources
Contributing
We welcome contributions to the Sentry CLI! This guide will help you get started.
Development Setup
Section titled “Development Setup”Prerequisites
Section titled “Prerequisites”- Git
Getting Started
Section titled “Getting Started”# Clone the repositorygit clone https://github.com/getsentry/toolkit.gitcd toolkit
# Install dependenciespnpm installcd packages/cli
# Run CLI in development modepnpm run cli -- --help
# Run testspnpm run testEnvironment Variables
Section titled “Environment Variables”Create a .env.local file for development:
cp .env.example .env.localEdit .env.local with your development credentials.
Project Structure
Section titled “Project Structure”toolkit/├── packages/│ └── cli/│ ├── src/│ │ ├── bin.ts # Entry point│ │ ├── app.ts # Stricli application setup│ │ ├── context.ts # Dependency injection context│ │ ├── commands/ # CLI commands│ │ │ ├── agent-conversation/# list, view│ │ │ ├── alert/ # create, delete, edit, list, view│ │ │ ├── auth/ # login, logout, refresh, status, token, whoami│ │ │ ├── build/ # download, upload│ │ │ ├── cli/ # completion, defaults, feedback, fix, import, setup, uninstall, upgrade│ │ │ ├── code-mappings/# upload│ │ │ ├── dart-symbol-map/# upload│ │ │ ├── dashboard/ # add, create, delete, edit, list, restore, revisions, view│ │ │ ├── debug-files/ # bundle-jvm, bundle-sources, check, find, print-sources, upload│ │ │ ├── docs/ # list, query│ │ │ ├── dsn/ # list│ │ │ ├── event/ # list, send, view│ │ │ ├── feedback/ # list, resolve, spam, unresolve, view│ │ │ ├── issue/ # archive, events, explain, list, merge, plan, resolve, unresolve, view│ │ │ ├── local/ # run, serve│ │ │ ├── log/ # list, view│ │ │ ├── monitor/ # list, run│ │ │ ├── org/ # list, view│ │ │ ├── platform/ # list│ │ │ ├── proguard/ # upload, uuid│ │ │ ├── project/ # create, delete, list, view│ │ │ ├── react-native/# gradle, xcode│ │ │ ├── release/ # archive, create, delete, deploy, deploys, finalize, list, propose-version, restore, set-commits, view│ │ │ ├── replay/ # download, list, view│ │ │ ├── repo/ # list│ │ │ ├── snapshots/ # diff, download, upload│ │ │ ├── sourcemap/ # inject, resolve, upload│ │ │ ├── span/ # list, view│ │ │ ├── status/ # show│ │ │ ├── team/ # list│ │ │ ├── trace/ # list, logs, view│ │ │ ├── trial/ # list, start│ │ │ ├── api.ts # Make an authenticated API request│ │ │ ├── explore.ts # Query aggregate event data (Explore)│ │ │ ├── help.ts # Help command│ │ │ ├── info.ts # Print configuration and verify authentication│ │ │ ├── init.ts # Initialize Sentry in your project (experimental)│ │ │ ├── schema.ts # Browse the Sentry API schema│ │ │ └── wasm-split.ts# Add build ids to WebAssembly modules and split out debug data│ │ ├── lib/ # Shared utilities│ │ └── types/ # TypeScript types and Valibot schemas│ ├── test/ # Test files (mirrors src/ structure)│ ├── script/ # Build and utility scripts│ └── plugins/ # Agent skill files└── apps/ └── cli-docs/ # Documentation site (Astro + Starlight)Building
Section titled “Building”# Build for current platform (uses esbuild + fossilize for Node SEA packaging)pnpm run build
# Build for all platformspnpm run build:all
# Create npm bundlepnpm run bundleTesting
Section titled “Testing”# Run all testspnpm run test
# Run specific test filepnpm run test -- test/path/to/test.ts
# Run with watch modepnpm run test -- --watch
# Run with coveragepnpm run test -- --coverageCode Style
Section titled “Code Style”The project uses Ultracite for linting and formatting:
# Check for issuespnpm run lint
# Auto-fix issuespnpm run lint:fix
# Type checkingpnpm run typecheckSubmitting Changes
Section titled “Submitting Changes”- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Run tests and linting:
pnpm run test && pnpm run lint - Commit with conventional commits:
git commit -m "feat: add new feature" - Push and create a pull request
Conventional Commits
Section titled “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
Section titled “Getting Help”- GitHub Issues - Bug reports and feature requests