> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/getsentry/cli/llms.txt
> Use this file to discover all available pages before exploring further.

# sentry project create

> Create a new Sentry project in an organization

Create a new Sentry project in an organization. Projects must be created under a team.

## Usage

```bash theme={null}
sentry project create <name> <platform> [flags]
```

## Arguments

### Required: `name`

**Required**

Project name. Supports `<org>/<name>` syntax to specify the organization explicitly.

* **Example:** `my-app`
* **Example:** `acme-corp/my-app`

### Required: `platform`

**Required**

Project platform identifier. Must be a valid Sentry platform.

Common platforms:

* `javascript`, `javascript-react`, `javascript-nextjs`, `javascript-vue`, `javascript-angular`, `javascript-svelte`, `javascript-remix`, `javascript-astro`
* `node`, `node-express`
* `python`, `python-django`, `python-flask`, `python-fastapi`
* `go`, `rust`, `elixir`
* `ruby`, `ruby-rails`
* `php`, `php-laravel`
* `java`, `android`
* `dotnet`, `react-native`, `apple-ios`

**Note:** Platform identifiers use hyphens (e.g., `javascript-nextjs`). If you use dots by mistake (e.g., `javascript.nextjs`), the CLI will auto-correct and warn.

## Flags

### `--team`

**Alias:** `-t`

Team slug to create the project under.

* If the organization has exactly one team, it is selected automatically
* If the organization has no teams, one is created automatically using the project slug
* If the organization has multiple teams, you must specify `--team`

**Example:** `sentry project create my-app node --team backend`

### `--json`

Output results as JSON instead of human-readable format.

* **Example:** `sentry project create my-app python --json`

## Organization Resolution

If the name doesn't include an org prefix (e.g., `acme-corp/my-app`), the organization is resolved from:

1. Config defaults (set via DSN detection or explicit configuration)
2. `SENTRY_DSN` environment variable
3. DSN detection in source code

If no organization can be resolved, use the `<org>/<name>` syntax:

```bash theme={null}
sentry project create acme-corp/my-app javascript-react
```

## Output

### Human-Readable Format (Default)

Displays:

* **Project created** - Success message with project name
* **Organization** - Organization slug
* **Project slug** - Generated project slug (if different from name)
* **Team** - Team slug
* **Team source** - How the team was selected (auto-selected, auto-created, or explicit)
* **Platform** - Platform identifier
* **DSN** - Primary DSN (if available)
* **URL** - Web URL to view the project

### JSON Format

With `--json`, outputs an object with:

* Complete project object from the API
* `dsn` - Primary DSN (null if unavailable)
* `teamSlug` - Team the project was created under

## Examples

### Create a Node.js project

```bash theme={null}
sentry project create my-backend node
```

### Create with explicit organization and team

```bash theme={null}
sentry project create acme-corp/frontend javascript-react --team web
```

### Create a Python Django project

```bash theme={null}
sentry project create api-service python-django
```

### Get JSON output for scripting

```bash theme={null}
sentry project create my-app go --json | jq '.dsn'
```

## Error Handling

### Project Already Exists

If a project with the same name already exists:

```
A project named 'my-app' already exists in acme-corp.

View it: sentry project view acme-corp/my-app
```

### Invalid Platform

If the platform is invalid:

```
Invalid platform 'invalid-platform'.

Usage:
  sentry project create acme-corp/my-app <platform>

Available platforms:
  javascript
  javascript-react
  ...
```

### Organization Not Found

If the organization doesn't exist or you don't have access:

```
Failed to create project 'my-app' in acme-corp.

The organization or team may not exist, or you may lack access.

Try:
  sentry project create acme-corp/my-app node --team <team-slug>
```

### Team Not Found

If the specified team doesn't exist:

```
Team 'backend' not found in acme-corp.

Available teams:
  frontend
  mobile

Try:
  sentry project create acme-corp/my-app node --team <team-slug>
```

## Notes

* Project slugs are generated by converting names to lowercase, replacing spaces with hyphens, and removing special characters
* The DSN is fetched after project creation (best-effort)
* If the organization has no teams, a team is automatically created using the project slug
* Platform identifiers are normalized (dots converted to hyphens with a warning)
