Skip to main content

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

envless sync

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.

StrategyBehavior
last-write(default) Most recently updated value wins, per variable.
prefer-localLocal value always wins on conflict.
prefer-remoteRemote value always wins on conflict.
manualPrompt the user for each conflicting variable.

Examples

Sync the current directory using the default strategy:

envless sync

Sync the staging environment and prefer remote values:

envless sync --env staging --strategy prefer-remote

Preview the reconciliation without writing anything:

envless sync --dry-run

Flags

FlagDescription
--envEnvironment to sync. Defaults to the one in .envless.
--fileLocal env file. Defaults to .env.
--strategyConflict strategy. See table above.
--dry-runShow the reconciliation plan without applying it.
--projectOverride the project from .envless.

Watch mode

Re-sync automatically whenever the local .env changes — useful during local development.

envless sync --watch