Validation happens entirely on your device. Ghostable never sees your plaintext data or schema details, maintaining a true zero-knowledge design.
Configuration
All validation lives in the.ghostable directory:
Example
.ghostable/schema.yaml are for rules applies to all environments of this project.
Any file under .ghostable/schemas/ will override rules for that specific environment. For example, rules placed inside .ghostable/schemas/production.yaml will only be applied to the production environment.
Use global rules for consistency across environments. Add overrides only when environments need stricter rules.
Schema Format
Each key represents an environment variable, followed by an array of rules.schemal.yaml
Keep schemas in version control — they serve as your environment contract.
Supported Rules
Presence & Type| Rule | Description |
|---|---|
required | The variable must be defined. Validation fails if missing. |
nullable | The variable can be empty or null without triggering an error. |
boolean | Accepts values that can be interpreted as boolean (true, false, 1, 0). |
integer | Must be a whole number with no decimals. |
numeric | Must be a number (integer or floating-point). |
string | Must be a string value. |
in:<values> | Restricts value to a specific list, e.g. in:local,staging,production. |
Format / Pattern
| Rule | Description |
|---|---|
url | Must be a valid URL (e.g., https://example.com). |
email | Must be a valid email address. |
regex:<pattern> | Must match a regular expression. Example: regex:^v[0-9]+\\.[0-9]+$. |
starts_with:<text> | Value must begin with the given prefix (e.g., starts_with:sk_). |
ends_with:<text> | Value must end with the given suffix (e.g., ends_with:=). |
Length / Range
| Rule | Description |
|---|---|
min:<n> | Minimum allowed length (for strings) or value (for numbers). |
max:<n> | Maximum allowed length (for strings) or value (for numbers). |
Usage
Validate your local environment before pushing or deploying:- Loads
.ghostable/schema.yaml - Merges any overrides from
.ghostable/schemas/production.yaml - Validates your
.envvalues against all defined rules