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

# App configuration

> Define safe defaults and expose fields through get_schema().

The runtime passes saved installation values to `main(config)`. Always supply a default or handle a missing value so the app can render before setup is complete.

```starlark theme={null}
def main(config):
    label = config.get("label") or "Niblet"
    enabled = config.bool("show_label")
```

## Define a schema

Use `get_schema()` to describe the fields shown by Niblet clients:

```starlark theme={null}
load("schema.star", "schema")

def get_schema():
    return schema.Schema(
        version = "1",
        fields = [
            schema.Text(
                id = "label",
                name = "Label",
                desc = "Short text shown on the display.",
                default = "Niblet",
            ),
            schema.Toggle(
                id = "show_label",
                name = "Show label",
                desc = "Display the configured label.",
                default = True,
            ),
        ],
    )
```

Supported field families include text, toggle, dropdown, color, date and time, location, typeahead, generated options, exact-size photo selection, credential, and OAuth-backed connections. Availability can depend on the client and hosted provider configuration.

## Treat sensitive values differently

Never add passwords or API tokens to ordinary source or defaults. Credential fields are stored separately and are not returned through MCP. Provider OAuth is configured by Niblet Cloud and exposed to apps only at render time.

<Warning>
  Do not log configuration objects. Even when a field is not secret, it may hold location or user-provided content that does not belong in logs or review notes.
</Warning>
