Skip to content

Commit 1726210

Browse files
committed
Merge branch 'main' into feat/project-create
# Conflicts: # src/lib/api-client.ts
2 parents 61619e6 + 964c105 commit 1726210

File tree

8 files changed

+615
-1
lines changed

8 files changed

+615
-1
lines changed

docs/src/content/docs/commands/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The Sentry CLI provides commands for interacting with various Sentry resources.
1313
| [`cli`](./cli/) | CLI-related commands (feedback, upgrade) |
1414
| [`org`](./org/) | Organization operations |
1515
| [`project`](./project/) | Project operations |
16+
| [`team`](./team/) | Team operations |
1617
| [`issue`](./issue/) | Issue tracking |
1718
| [`event`](./event/) | Event inspection |
1819
| [`log`](./log/) | Log viewing and streaming |
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: team
3+
description: Team commands for the Sentry CLI
4+
---
5+
6+
Manage Sentry teams.
7+
8+
## Commands
9+
10+
### `sentry team list`
11+
12+
List teams in an organization.
13+
14+
```bash
15+
# Auto-detect organization or list all
16+
sentry team list
17+
18+
# List teams in a specific organization
19+
sentry team list <org-slug>
20+
21+
# Limit results
22+
sentry team list --limit 10
23+
```
24+
25+
**Arguments:**
26+
27+
| Argument | Description |
28+
|----------|-------------|
29+
| `[org-slug]` | Optional organization slug to filter by |
30+
31+
**Options:**
32+
33+
| Option | Description |
34+
|--------|-------------|
35+
| `-n, --limit <number>` | Maximum number of teams to list (default: 30) |
36+
| `--json` | Output as JSON |
37+
38+
**Example output:**
39+
40+
```
41+
ORG SLUG NAME MEMBERS
42+
my-org backend Backend Team 8
43+
my-org frontend Frontend Team 5
44+
my-org mobile Mobile Team 3
45+
```
46+
47+
**JSON output:**
48+
49+
```bash
50+
sentry team list --json
51+
```
52+
53+
```json
54+
[
55+
{
56+
"id": "100",
57+
"slug": "backend",
58+
"name": "Backend Team",
59+
"memberCount": 8
60+
}
61+
]
62+
```

plugins/sentry-cli/skills/sentry-cli/SKILL.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,33 @@ List repositories
448448
- `-n, --limit <value> - Maximum number of repositories to list - (default: "30")`
449449
- `--json - Output JSON`
450450

451+
### Team
452+
453+
Work with Sentry teams
454+
455+
#### `sentry team list <org>`
456+
457+
List teams
458+
459+
**Flags:**
460+
- `-n, --limit <value> - Maximum number of teams to list - (default: "30")`
461+
- `--json - Output JSON`
462+
463+
**Examples:**
464+
465+
```bash
466+
# Auto-detect organization or list all
467+
sentry team list
468+
469+
# List teams in a specific organization
470+
sentry team list <org-slug>
471+
472+
# Limit results
473+
sentry team list --limit 10
474+
475+
sentry team list --json
476+
```
477+
451478
### Log
452479

453480
View Sentry logs
@@ -602,6 +629,18 @@ List repositories
602629
- `-n, --limit <value> - Maximum number of repositories to list - (default: "30")`
603630
- `--json - Output JSON`
604631

632+
### Teams
633+
634+
List teams
635+
636+
#### `sentry teams <org>`
637+
638+
List teams
639+
640+
**Flags:**
641+
- `-n, --limit <value> - Maximum number of teams to list - (default: "30")`
642+
- `--json - Output JSON`
643+
605644
### Logs
606645

607646
List logs from a project

src/app.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import { projectRoute } from "./commands/project/index.js";
2121
import { listCommand as projectListCommand } from "./commands/project/list.js";
2222
import { repoRoute } from "./commands/repo/index.js";
2323
import { listCommand as repoListCommand } from "./commands/repo/list.js";
24+
import { teamRoute } from "./commands/team/index.js";
25+
import { listCommand as teamListCommand } from "./commands/team/list.js";
2426
import { traceRoute } from "./commands/trace/index.js";
2527
import { listCommand as traceListCommand } from "./commands/trace/list.js";
2628
import { CLI_VERSION } from "./lib/constants.js";
@@ -36,6 +38,7 @@ export const routes = buildRouteMap({
3638
org: orgRoute,
3739
project: projectRoute,
3840
repo: repoRoute,
41+
team: teamRoute,
3942
issue: issueRoute,
4043
event: eventRoute,
4144
log: logRoute,
@@ -45,6 +48,7 @@ export const routes = buildRouteMap({
4548
orgs: orgListCommand,
4649
projects: projectListCommand,
4750
repos: repoListCommand,
51+
teams: teamListCommand,
4852
logs: logListCommand,
4953
traces: traceListCommand,
5054
},

src/commands/team/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { buildRouteMap } from "@stricli/core";
2+
import { listCommand } from "./list.js";
3+
4+
export const teamRoute = buildRouteMap({
5+
routes: {
6+
list: listCommand,
7+
},
8+
docs: {
9+
brief: "Work with Sentry teams",
10+
fullDescription: "List and manage teams in your Sentry organizations.",
11+
hideRoute: {},
12+
},
13+
});

0 commit comments

Comments
 (0)