Skip to content

Commit a8a10a4

Browse files
betegonclaude
andcommitted
docs(init): add init command page to cli.sentry.dev
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2dd7f47 commit a8a10a4

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: init
3+
description: AI-powered project setup wizard for the Sentry CLI
4+
---
5+
6+
Set up Sentry in your project with an AI-powered wizard. The `init` command detects your platform and framework, installs the Sentry SDK, and instruments your code for error monitoring, tracing, and more.
7+
8+
**Prerequisites:** You must be authenticated first. Run `sentry auth login` if you haven't already.
9+
10+
## Usage
11+
12+
```bash
13+
sentry init [directory]
14+
```
15+
16+
**Arguments:**
17+
18+
| Argument | Description |
19+
|----------|-------------|
20+
| `[directory]` | Project directory (default: current directory) |
21+
22+
**Options:**
23+
24+
| Option | Description |
25+
|--------|-------------|
26+
| `--force` | Continue even if Sentry is already installed |
27+
| `-y, --yes` | Non-interactive mode (accept defaults) |
28+
| `--dry-run` | Preview changes without applying them |
29+
| `--features <list>` | Comma-separated features: `errors`, `tracing`, `logs`, `replay`, `metrics` |
30+
31+
## Examples
32+
33+
```bash
34+
# Run the wizard in the current directory
35+
sentry init
36+
37+
# Target a subdirectory
38+
sentry init ./my-app
39+
40+
# Preview what changes would be made
41+
sentry init --dry-run
42+
43+
# Select specific features
44+
sentry init --features errors,tracing,logs
45+
46+
# Non-interactive mode (accept all defaults)
47+
sentry init --yes
48+
```
49+
50+
## What the wizard does
51+
52+
1. **Detects your framework** — scans your project files to identify the platform and framework
53+
2. **Installs the SDK** — adds the appropriate Sentry SDK package to your project
54+
3. **Instruments your code** — configures error monitoring, tracing, and any selected features
55+
56+
## Supported platforms
57+
58+
The wizard currently supports:
59+
60+
- **JavaScript / TypeScript** — Next.js, Express, SvelteKit, React
61+
- **Python** — Flask, FastAPI
62+
63+
More platforms and frameworks are coming soon.

docs/src/content/docs/getting-started.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Credentials are stored in `~/.sentry/config.json` with restricted file permissio
8181

8282
Once authenticated, you can start using the CLI:
8383

84+
- [Initialize Sentry](../commands/init/) - Set up Sentry in your project with the guided wizard
8485
- [Organization commands](../commands/org/) - List and view organizations
8586
- [Project commands](../commands/project/) - Manage projects
8687
- [Issue commands](../commands/issue/) - Track and manage issues

0 commit comments

Comments
 (0)