Skip to main content

Need the shared validation model?

Use Fundamentals for the shared schema model. Use this guide for CLI rule syntax and commands.
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
The global .ghostable/schema.yaml file defines rules applied to every environment in the 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.
schema.yaml
Keep schemas in version control — they serve as your environment contract.

Supported Rules

Presence & Type
Format / Pattern
Length / Range

Usage

Validate your local environment before pushing or deploying:
This command:
  • Loads .ghostable/schema.yaml
  • Merges any overrides from .ghostable/schemas/production.yaml
  • Validates your .env values against all defined rules
You’ll see friendly, human-readable errors, for example:

Running validation in CI

Because validation runs locally with your device keys, it fits naturally into CI pipelines. For example, a GitHub Actions job can block merges when a .env drifts from the schema:
github-actions
When rules fail, the CLI exits non-zero with the same human-readable output shown earlier, so the workflow clearly highlights which variables need to change before deployment.