# @natui/core/config

> Load and validate the NatUI application configuration.

Canonical: https://natui.dev/docs/api/config

The `@natui/core/config` entrypoint exposes the same static
`natui.app.json` loader used by `natui dev` and the repository packager.

```ts
import {
  DEFAULT_CONFIG_FILE,
  loadAppConfig,
} from '@natui/core/config';

const config = await loadAppConfig();

if (config) {
  console.log(config.entryPath);
  console.log(config.icons.macos);
}
```

`loadAppConfig()` resolves entry, output, and icon paths relative to the
config file. Pass `{ allowMissing: true }` when a missing config should return
`undefined` instead of throwing.

`validateAppConfig()` validates an already parsed value. Unknown properties,
absolute paths, and paths that escape the application directory are rejected.

### NatuiAppConfig


| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `$schema` | `string \| undefined` | No |  |
| `schemaVersion` | `1` | Yes |  |
| `id` | `string` | Yes |  |
| `name` | `string` | Yes |  |
| `version` | `string` | Yes |  |
| `buildNumber` | `string` | Yes |  |
| `entry` | `string` | Yes |  |
| `executable` | `string` | Yes |  |
| `output` | `string \| undefined` | No |  |
| `icons` | `NatuiAppIconConfig \| undefined` | No |  |

### ResolvedNatuiAppConfig


| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `schemaVersion` | `1` | Yes |  |
| `id` | `string` | Yes |  |
| `name` | `string` | Yes |  |
| `version` | `string` | Yes |  |
| `buildNumber` | `string` | Yes |  |
| `entry` | `string` | Yes |  |
| `executable` | `string` | Yes |  |
| `output` | `string` | Yes |  |
| `root` | `string` | Yes |  |
| `entryPath` | `string` | Yes |  |
| `outputPath` | `string` | Yes |  |
| `icons` | `NatuiAppIconConfig` | Yes |  |