Documentation Index
Fetch the complete documentation index at: https://docs.envless.cloud/llms.txt
Use this file to discover all available pages before exploring further.
Usage
sync is the combination of push + pull. It compares the local .env with the remote project, then reconciles the differences in a single operation.
How conflicts are resolved
By default, sync uses a “last writer wins” strategy based on the variable’s updatedAt timestamp. You can change this with the --strategy flag.
| Strategy | Behavior |
|---|---|
last-write | (default) Most recently updated value wins, per variable. |
prefer-local | Local value always wins on conflict. |
prefer-remote | Remote value always wins on conflict. |
manual | Prompt the user for each conflicting variable. |
Examples
Sync the current directory using the default strategy:
Sync the staging environment and prefer remote values:
Preview the reconciliation without writing anything:
Flags
| Flag | Description |
|---|---|
--env | Environment to sync. Defaults to the one in .envless. |
--file | Local env file. Defaults to .env. |
--strategy | Conflict strategy. See table above. |
--dry-run | Show the reconciliation plan without applying it. |
--project | Override the project from .envless. |
Watch mode
Re-sync automatically whenever the local .env changes — useful during local development.