Problem
sentry auth login stores credentials globally in ~/.sentry/cli.db. There's no way to scope authentication to a specific repository or directory.
For users who work across multiple Sentry organizations (e.g., different orgs for different clients or projects), this means constantly re-authenticating when switching between repos, or manually managing SENTRY_AUTH_TOKEN env vars per project.
Expected behavior
Support project-local or directory-scoped authentication, similar to how git supports per-repo user config or how aws supports named profiles. For example:
- A
.sentry/ directory in the repo root that stores auth for that project
- Named profiles (
sentry auth login --profile myorg) that can be selected per directory
- A
.sentryrc or config file that maps directories to orgs/tokens
Workaround
Setting SENTRY_AUTH_TOKEN per-repo via .env or direnv, but this requires manually creating and managing API tokens outside the CLI's OAuth flow.
Problem
sentry auth loginstores credentials globally in~/.sentry/cli.db. There's no way to scope authentication to a specific repository or directory.For users who work across multiple Sentry organizations (e.g., different orgs for different clients or projects), this means constantly re-authenticating when switching between repos, or manually managing
SENTRY_AUTH_TOKENenv vars per project.Expected behavior
Support project-local or directory-scoped authentication, similar to how
gitsupports per-repo user config or howawssupports named profiles. For example:.sentry/directory in the repo root that stores auth for that projectsentry auth login --profile myorg) that can be selected per directory.sentryrcor config file that maps directories to orgs/tokensWorkaround
Setting
SENTRY_AUTH_TOKENper-repo via.envordirenv, but this requires manually creating and managing API tokens outside the CLI's OAuth flow.