Appearance
User Configurations Schema Reference
Reference for validating per-user configurations stored at %LOCALAPPDATA%\Turbo\Launcher\user-profiles.json.
What You'll Learn
- How per-user configurations are structured
- Validating configurations against the JSON schema
- Usage of the
userProfilesVersionfield
- Concept: User Configurations (Per-user)
- Enterprise templates: Configuration Templates
Purpose
This schema validates the structure of the per-user configurations file. It does not validate values against enterprise constraints (regex/path allowlists) or cross-reference templateRef to enterprise templates — those validations are enforced by the Launcher at runtime.
Schema file
- JSON Schema (draft 2020-12): user-configurations-schema.json
- Stable URL: https://schemas.turbo.net/launcher-user-configurations.schema.json
Top-level structure
json
{
"userProfilesVersion": 1,
"profiles": [ ... ]
}Fields
- userProfilesVersion (integer) — Version of the user configurations file format.
- profiles (
array<UserProfile>) — User-defined configurations based on enterprise templates.
Versioning and compatibility
The userProfilesVersion field versions the per-user configuration file format independently of the enterprise Launcher policy schema.
Client behavior:
- If
userProfilesVersionis equal to the client’s supported version:- The file is validated against
launcher-user-configurations.schema.jsonand loaded normally.
- The file is validated against
- If
userProfilesVersionis lower than the supported version:- The file is treated as backward-compatible.
- Unknown fields are ignored; defaults apply where newer fields are missing.
- If
userProfilesVersionis greater than the supported version:- The client treats the configuration file as unsupported.
- The file is ignored and the user falls back to built-in defaults or previously known-good configurations.
- An audit or telemetry event should record the mismatch for troubleshooting.
userProfilesVersion does not affect policyVersion or the Launcher policy schema version.
UserProfile
json
{
"id": "user-project-alpha",
"displayName": "Project Alpha Configuration",
"templateRef": "p4-shared-environment",
"configuration": {
"environmentVariables": {
"P4PORT": "ssl:p4.alpha.trusted.com:1666",
"P4USER": "jdoe",
"P4CLIENT": "jdoe_ws_alpha"
},
"mounts": [
{
"name": "RepoA",
"ruleRef": "src-ro",
"source": "D:\\Repos\\RepoA",
"destination": "P:\\src\\RepoA",
"options": ["read-only"]
}
]
}
}Fields
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Stable identifier; unique within this file (kebab-case recommended). |
| displayName | string | Yes | UI label for the configuration. |
| templateRef | string | Yes | References configurationTemplates[].id from the active enterprise policy (validated at runtime). |
| configuration | ProfileConfiguration | Yes | Values that must satisfy enterprise template constraints. |
ProfileConfiguration
json
{
"environmentVariables": { "KEY": "value" },
"mounts": [
{
"name": "optional",
"ruleRef": "template-rule-id",
"source": "D:\\Repos\\RepoA",
"destination": "P:\\src\\RepoA",
"options": ["read-only"],
"os": ["windows"]
}
]
}Fields
| Field | Type | Required | Description |
|---|---|---|---|
| environmentVariables | object<string,string> | Yes* | Key/value pairs. Keys must be allowed by the referenced template; required keys must be present; values must match any validationPattern (runtime validation). |
| mounts | array<UserMount> | Yes* | User-declared mounts validated against template mount rules (allowedSourcePatterns, allowedDestinationPatterns, allowedOptions). At least one of environmentVariables or mounts must be present. |
UserMount
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | No | Optional identity key used for merge/tie-breaks. |
| source | string | Yes | Host path; supports well-known tokens and Windows env vars. |
| destination | string | Yes | Container path inside the runtime. |
| options | ("read-write" | "read-only")[] | No | Mount access options. |
| ruleRef | string | No | Optional reference to template mounts.rules[].id for audit. |
| os | ("windows"|"macos"|"linux")[] | No | Optional OS constraint for the mount. |
Using the JSON Schema
Add $schema to enable editor IntelliSense and basic structure validation.
Minimal file header
json
{
"$schema": "https://schemas.turbo.net/launcher-user-configurations.schema.json",
"userProfilesVersion": 1,
"profiles": []
}Local (when editing inside this repo)
json
{
"$schema": "./reference/user-configurations-schema.json",
"userProfilesVersion": 1,
"profiles": []
}Validate with AJV
Install AJV (if not already):
bash
npm i -g ajv-formats ajv-cliValidate a user-profiles.json file:
bash
npx ajv validate \
-s docs/src/policy/reference/user-configurations-schema.json \
-d "%LOCALAPPDATA%/Turbo/Launcher/user-profiles.json"Notes
- JSON Schema validation ensures structure only. Runtime enforces:
templateRefexists in enterpriseconfigurationTemplates.- Env var keys/required/regex constraints defined by the template.
Related topics
- Per-user file and behavior: User Configurations
- Enterprise constraints source: Configuration Templates
- Authorization & visibility for apps: Authorization & Visibility
- Testing and negative cases: Testing & Validation
