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

# init

> Crea fhiron.config.json en tu proyecto.

## Uso

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

Crea `fhiron.config.json` en el directorio actual con valores por defecto sensatos:

```json theme={null}
{
  "tenant": "",
  "profile": "hl7.fhir.cl.clcore@1.9.4",
  "validate": {
    "include": ["**/*.fhir.json", "**/fhir/**/*.json"],
    "exclude": ["**/node_modules/**", "**/.git/**"]
  },
  "lint": {
    "include": ["**/*.fhir.json", "**/fhir/**/*.json"]
  }
}
```

## Qué hace cada campo

| Campo              | Significado                                                                                |
| ------------------ | ------------------------------------------------------------------------------------------ |
| `tenant`           | Slug del tenant. Se autocompleta si ya estás logueado (`fhiron login`).                    |
| `profile`          | Versión de CL Core contra la que `validate` resuelve. Default: `hl7.fhir.cl.clcore@1.9.4`. |
| `validate.include` | Globs que `fhiron validate` procesa cuando no se le pasa un path explícito.                |
| `validate.exclude` | Globs que se ignoran en `validate` y `lint`.                                               |
| `lint.include`     | Globs que `fhiron lint` procesa cuando no se le pasa un path explícito.                    |

## Flags

* `--force`: sobreescribe `fhiron.config.json` sin preguntar.

```bash theme={null}
fhiron init --force
```

## Comportamiento si el archivo ya existe

`fhiron init` detecta `fhiron.config.json` y pregunta antes de sobreescribir:

```
[warn] fhiron.config.json ya existe en fhiron.config.json
¿Sobreescribir? [s/N]
```

En entornos no-interactivos (CI), no sobreescribe sin `--force` y devuelve exit code 1.

## Próximo paso

Sigue con [Lint](/cli/lint) (offline) o [Validate](/cli/validate) (contra el servidor).
