Skip to main content
Settings.defineWorkspaceSchema() declares the workspace-scoped settings of your app: the setting names and their types. The schema is the source of type safety for every other settings API: Settings.useForm, Settings.useSettings, Settings.getSettings, and Settings.setSettings all take the schema and infer their types from it.

File location

The schema must be the default export of a file in src/app/settings/, conventionally src/app/settings/schema.ts, so the CLI can discover it.
src/app/settings/schema.ts
Note the import from "attio" (not attio/client or attio/server): the schema file is imported by both client and server code, so it must not depend on either runtime.

Setting types

The Settings.Schema namespace provides the following node builders:
SettingsStringNode
A setting holding a string value. Use this for text values like names, URLs, or identifiers.
SettingsNumberNode
A setting holding a number value. Use this for numeric values like intervals, limits, or thresholds.
SettingsBooleanNode
A setting holding a boolean value. Use this for toggles, checkboxes, or on/off configurations.

Values are null until set

Every setting value is null until a user (or your code) has set it. When you read settings, handle the null case: