Skip to content
Merged
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
1 change: 1 addition & 0 deletions docs/src/content/docs/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The Sentry CLI provides commands for interacting with various Sentry resources.
| [`cli`](./cli/) | CLI-related commands (feedback, upgrade) |
| [`org`](./org/) | Organization operations |
| [`project`](./project/) | Project operations |
| [`team`](./team/) | Team operations |
| [`issue`](./issue/) | Issue tracking |
| [`event`](./event/) | Event inspection |
| [`log`](./log/) | Log viewing and streaming |
Expand Down
62 changes: 62 additions & 0 deletions docs/src/content/docs/commands/team.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: team
description: Team commands for the Sentry CLI
---

Manage Sentry teams.

## Commands

### `sentry team list`

List teams in an organization.

```bash
# Auto-detect organization or list all
sentry team list

# List teams in a specific organization
sentry team list <org-slug>

# Limit results
sentry team list --limit 10
```

**Arguments:**

| Argument | Description |
|----------|-------------|
| `[org-slug]` | Optional organization slug to filter by |

**Options:**

| Option | Description |
|--------|-------------|
| `-n, --limit <number>` | Maximum number of teams to list (default: 30) |
| `--json` | Output as JSON |

**Example output:**

```
ORG SLUG NAME MEMBERS
my-org backend Backend Team 8
my-org frontend Frontend Team 5
my-org mobile Mobile Team 3
```

**JSON output:**

```bash
sentry team list --json
```

```json
[
{
"id": "100",
"slug": "backend",
"name": "Backend Team",
"memberCount": 8
}
]
```
39 changes: 39 additions & 0 deletions plugins/sentry-cli/skills/sentry-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,33 @@ List repositories
- `-n, --limit <value> - Maximum number of repositories to list - (default: "30")`
- `--json - Output JSON`

### Team

Work with Sentry teams

#### `sentry team list <org>`

List teams

**Flags:**
- `-n, --limit <value> - Maximum number of teams to list - (default: "30")`
- `--json - Output JSON`

**Examples:**

```bash
# Auto-detect organization or list all
sentry team list

# List teams in a specific organization
sentry team list <org-slug>

# Limit results
sentry team list --limit 10

sentry team list --json
```

### Log

View Sentry logs
Expand Down Expand Up @@ -594,6 +621,18 @@ List repositories
- `-n, --limit <value> - Maximum number of repositories to list - (default: "30")`
- `--json - Output JSON`

### Teams

List teams

#### `sentry teams <org>`

List teams

**Flags:**
- `-n, --limit <value> - Maximum number of teams to list - (default: "30")`
- `--json - Output JSON`

### Logs

List logs from a project
Expand Down
4 changes: 4 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import { projectRoute } from "./commands/project/index.js";
import { listCommand as projectListCommand } from "./commands/project/list.js";
import { repoRoute } from "./commands/repo/index.js";
import { listCommand as repoListCommand } from "./commands/repo/list.js";
import { teamRoute } from "./commands/team/index.js";
import { listCommand as teamListCommand } from "./commands/team/list.js";
import { traceRoute } from "./commands/trace/index.js";
import { listCommand as traceListCommand } from "./commands/trace/list.js";
import { CLI_VERSION } from "./lib/constants.js";
Expand All @@ -36,6 +38,7 @@ export const routes = buildRouteMap({
org: orgRoute,
project: projectRoute,
repo: repoRoute,
team: teamRoute,
issue: issueRoute,
event: eventRoute,
log: logRoute,
Expand All @@ -45,6 +48,7 @@ export const routes = buildRouteMap({
orgs: orgListCommand,
projects: projectListCommand,
repos: repoListCommand,
teams: teamListCommand,
logs: logListCommand,
traces: traceListCommand,
},
Expand Down
13 changes: 13 additions & 0 deletions src/commands/team/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { buildRouteMap } from "@stricli/core";
import { listCommand } from "./list.js";

export const teamRoute = buildRouteMap({
routes: {
list: listCommand,
},
docs: {
brief: "Work with Sentry teams",
fullDescription: "List and manage teams in your Sentry organizations.",
hideRoute: {},
},
});
Loading
Loading