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

# UgCore.Config

> Read resolved configuration values.

<Badge color="purple">Shared</Badge> Server reads every value. Clients read `client` and `shared` values only.

## Get

```lua theme={null}
UgCore.Config.Get(name, key?) -> value
```

<ResponseField name="name" type="string" required>Config name, such as `'core'` or `'accounts'`. Unknown names raise.</ResponseField>

<ResponseField name="key" type="string">
  Option key. Without it, returns the whole config. Unknown setting keys raise with a suggestion. For data configs such as `jobs`, `key` is an entry id and MAY be missing.
</ResponseField>

<ResponseField name="value" type="any">A deep copy of the resolved value.</ResponseField>

```lua theme={null}
local debug = UgCore.Config.Get('core', 'debug')
local accounts = UgCore.Config.Get('accounts', 'accounts')
local police = UgCore.Config.Get('jobs', 'police')
```

<Note>
  Values resolve from the default in code, then the owner file, then the convar. See [Configuration](/owners/configuration).
</Note>

## Errors

```text theme={null}
[ug-core] Config.Get: unknown config "acounts"
[ug-core] Config.Get: unknown option "core.debgu". Did you mean "debug"?
[ug-core] Config.Get: unknown or server-only config "guard"     -- on a client
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.