Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions apps/cli-docs/src/fragments/commands/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ Most of the time you don't need to switch: commands pick the stored account
that fits what they target, without changing the active account:

- **Organization** — when the target organization isn't in the active
account's organization list (cached at login and by `sentry org list`) but
another stored account has used it, that account is used. This includes
`oNNNN` IDs from DSNs.
account's organization list (cached at login and by `sentry org list`,
which lists every stored account's organizations) but another stored
account has used it, that account is used. This includes `oNNNN` IDs from
DSNs.
- **Server** — `SENTRY_HOST`/`SENTRY_URL`, `.sentryclirc`, or a pasted Sentry
URL for another account's server (for example a self-hosted issue link) uses
the account stored for that server.
Expand Down
20 changes: 20 additions & 0 deletions apps/cli-docs/src/fragments/commands/org.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ my-org My Organization owner
another-org Another Org member
```

With several stored accounts (see `sentry auth list`), `sentry org list` lists
the organizations of every logged-in account together, each fetched with that
account's own credentials on its own server, plus an `ACCOUNT` column. An
organization reachable from several accounts on the same server is listed once,
under the active account if it is one of them, else the most recently used.
Accounts whose login fails are skipped with a warning. `SENTRY_HOST`/`SENTRY_URL` limits the list to accounts on that server,
and `--account` to a single account. The stored active account never changes.

```
$ sentry org list
SLUG NAME ACCOUNT
my-org My Organization jane@example.com on sentry.io
acme-internal Acme Internal jane@acme.com on sentry.acme.com
```

```bash
# Only one account's organizations
sentry org list --account jane@acme.com
```

```bash
# View organization details
sentry org view my-org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ List organizations
**Flags:**
- `-n, --limit <value> - Maximum number of organizations to list - (default: "25")`
- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data`
- `--account <value> - Only list organizations of this stored account (email, username, or account id)`

### `sentry org view [<org>]`

Expand All @@ -33,6 +34,9 @@ View details of an organization
# List organizations
sentry org list

# Only one account's organizations
sentry org list --account jane@acme.com

# View organization details
sentry org view my-org

Expand Down
Loading
Loading