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

# Configs

> Typed, per-environment configuration with template references.

## What are configs?

Configs are typed key-value settings for your service - database hosts, API base URLs, timeout values, and anything else that should vary per environment without requiring a code change.

Unlike secrets, configs are:

* **Not encrypted** - suitable for non-sensitive values
* Available to **both** backend and frontend services
* **JSON values** - enter `"text"`, `42`, `true`, or `{"key":"value"}` - the SDK provides typed getters to read them as the correct native type
* Capable of **referencing secrets** and **feature flags** by key

## Key names

Config keys follow the same pattern as secrets: `^[a-zA-Z]([a-zA-Z0-9_.:-]*[a-zA-Z0-9])?$`

Examples: `database.host`, `api.timeout_ms`, `feature.max_retries`

## Template references

Configs can embed the resolved values of secrets and flags using `{{...}}` syntax:

| Syntax           | Resolves to                                         |
| ---------------- | --------------------------------------------------- |
| `{{secret:KEY}}` | Current value of the named secret                   |
| `{{flag:KEY}}`   | `true` or `false` - current state of the named flag |

Example:

```
database.url = postgresql://app:{{secret:DB_PASSWORD}}@{{config:DB_HOST}}:5432/mydb
```

The resolution happens server-side at sync time. SDKs receive the resolved string - the raw secret is never exposed to the client.

## Reading configs

<CodeGroup>
  ```go Go theme={null}
  host, ok := client.GetConfig("database.host")
  port, ok := client.GetConfigAs[int]("database.port")
  cfg,  ok := client.GetConfigJSON("service.options") // any JSON value
  ```

  ```typescript Node.js theme={null}
  const host = client.getConfig('database.host');         // string | undefined
  const port = client.getConfigAs<number>('database.port');
  const cfg  = client.getConfigJSON('service.options');
  ```

  ```python Python theme={null}
  host = client.get_config('database.host')
  port = client.get_config_as('database.port', int)
  cfg  = client.get_config_json('service.options')
  ```

  ```typescript Angular theme={null}
  const nexus = injectNexus();
  const host  = nexus.getConfig('database.host');
  ```
</CodeGroup>

## Umbrella inheritance

If a service is linked to an **umbrella service**, it inherits all configs defined on the umbrella. A service-level key with the same name overrides the umbrella value.

```
Umbrella: database.host = db.internal
  └── Service: database.host = replica.db.internal  ← overrides
               api.timeout_ms = 3000                 ← inherited from umbrella
```

## Live updates

All SDKs support SSE-based push: when a config is updated in the console, connected SDK instances receive the new value within milliseconds - no restart required.

See [Quickstart → Enable live updates](/quickstart#4-enable-live-updates-recommended) for setup.
