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

# Preset

> Gestisci configurazioni di rendering riutilizzabili

Un preset è una configurazione di rendering riutilizzabile — sfondo, stile dei sottotitoli, layout e altre impostazioni visive — che puoi applicare a qualsiasi progetto o esportazione. I preset sono ideali quando desideri un aspetto coerente su molte tracce.

Vedi [Render settings reference](/en/render-settings-reference) per la definizione completa di
`preset` e tutte le opzioni supportate da enum.

## `preset schema`

Restituisce lo Schema JSON per le impostazioni dei preset. Usalo per scoprire i campi validi prima di creare o aggiornare un preset.

```bash theme={null}
youka preset schema --json
```

<Tip>
  Gli agenti dovrebbero chiamare `preset schema` prima di modificare i preset, così da conoscere i
  nomi esatti dei campi e i tipi di valore.
</Tip>

## `preset list`

Elenca tutti i preset di proprietà dell’account autenticato.

```bash theme={null}
youka preset list --json
```

## `preset show`

Recupera un singolo preset tramite ID.

```bash theme={null}
youka preset show <presetId> --json
```

## `preset create`

Crea un nuovo preset.

```bash theme={null}
youka preset create [options]
```

### Opzioni

| Opzione            | Descrizione                                                   |
| ------------------ | ------------------------------------------------------------- |
| `--name <name>`    | Nome del preset                                               |
| `--default`        | Imposta il nuovo preset come predefinito                      |
| `--body <file\|->` | Legge il corpo completo della richiesta da un file o da stdin |

<Note>
  Il corpo della richiesta dovrebbe contenere l’oggetto `preset` completo. Per payload di grandi dimensioni,
  preferisci `--body` invece del JSON inline.
</Note>

### Esempi

<CodeGroup>
  ```bash from-file theme={null}
  youka preset create \
    --name "Neon Night" \
    --body ./neon-preset.json \
    --json
  ```

  ```bash make-default theme={null}
  youka preset create \
    --name "Red Cinema" \
    --body ./red-cinema.json \
    --default \
    --json
  ```

  ```bash from-stdin theme={null}
  cat ./preset.json | youka preset create --name "From stdin" --body - --json
  ```
</CodeGroup>

I flag della CLI sovrascrivono i campi corrispondenti provenienti da `--body`.

## `preset update`

Aggiorna un preset esistente.

```bash theme={null}
youka preset update <presetId> [options]
```

| Opzione            | Descrizione                                    |
| ------------------ | ---------------------------------------------- |
| `--name <name>`    | Nuovo nome                                     |
| `--body <file\|->` | Corpo completo della richiesta da file o stdin |

Esempio:

```bash theme={null}
youka preset update $PRESET_ID \
  --name "Neon Night v2" \
  --body ./neon-v2.json \
  --json
```

## `preset delete`

Elimina un preset tramite ID.

```bash theme={null}
youka preset delete <presetId> --json
```

<Warning>
  L’eliminazione di un preset non elimina i progetti o le esportazioni che sono stati in precedenza
  renderizzati con esso. Le esportazioni future che fanno riferimento al preset eliminato falliranno.
</Warning>

## `preset default`

Ottiene o imposta il preset predefinito.

```bash theme={null}
youka preset default --json
youka preset default <presetId> --json
```

Senza argomenti, il comando restituisce il preset predefinito corrente oppure `null`. Con un ID preset, imposta quel preset come predefinito.

## Applicare un preset

Applica un preset a un progetto o a un’esportazione con `--preset`:

<CodeGroup>
  ```bash on-create theme={null}
  youka project create ./song.mp3 --preset $PRESET_ID --wait
  ```

  ```bash on-settings-update theme={null}
  youka project settings $PROJECT_ID --preset $PRESET_ID
  ```

  ```bash on-export theme={null}
  youka export create $PROJECT_ID --preset $PRESET_ID --wait
  ```
</CodeGroup>

## Cosa c’è dopo

* [Render settings reference](/en/render-settings-reference) - tutti i campi del preset condivisi
* [Projects](/it/cli/projects) - applica i preset alle impostazioni del progetto
* [Exports](/it/cli/exports) - applica i preset al momento del rendering
* [Media](/it/cli/media) - media riutilizzabili a cui fanno riferimento i preset
