> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nexusproject.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# nexus init

> Inicializar un nuevo proyecto con configuración interactiva.

```bash theme={null}
nexus init
```

Genera un archivo de plantilla `nexus.yaml` preconfigurado en el directorio actual para que lo edites con los detalles de tu proyecto.

Si ya existe un archivo `nexus.yaml`, el comando fallará para evitar sobreescribir tus datos. Puedes forzar la sobreescritura usando el flag `--force`.

## Parámetros

| Parámetro       | Tipo | Requerido | Descripción                                        |
| --------------- | ---- | --------- | -------------------------------------------------- |
| `--force`, `-f` | flag | No        | Sobreescribir el archivo `nexus.yaml` si ya existe |

## Ejemplo de salida (`nexus.yaml` generado)

```yaml theme={null}
version: "1"

project:
  name: "my-project"
  slug: "my-project"
  repo: "https://github.com/your-user/my-project"

environments:
  development:
    branch: "develop"
    env:
      NODE_ENV: "development"
      DATABASE_URL: "postgresql://localhost:5432/myapp_dev"
    cli_profiles:
      - tool: "gh"
        account: "your-github-username"
      - tool: "aws"
        account: "dev-profile"
        region: "us-east-1"
      - tool: "supabase"
        account: "your-project-ref"
      - tool: "vercel"
        account: "my-project-dev"
        org: "your-team"

  staging:
    branch: "staging"
    env:
      NODE_ENV: "staging"
      DATABASE_URL: "postgresql://staging-host:5432/myapp_stg"
    cli_profiles:
      - tool: "gh"
        account: "your-github-username"
      - tool: "aws"
        account: "staging-profile"
        region: "us-east-1"
      - tool: "supabase"
        account: "your-staging-project-ref"

  production:
    branch: "main"
    env:
      NODE_ENV: "production"
      DATABASE_URL: "postgresql://prod-host:5432/myapp"
    cli_profiles:
      - tool: "aws"
        account: "production-profile"
        region: "us-east-1"
      - tool: "supabase"
        account: "your-production-project-ref"
      - tool: "vercel"
        account: "my-project-prod"
        org: "your-team"

skills:
  - name: "context-injection"
    category: "context-injection"
    enabled: true
    priority: 1

  - name: "git-state"
    category: "git-state"
    enabled: true
    priority: 2

  - name: "cli-switching"
    category: "cli-switching"
    enabled: true
    priority: 3
```
