Three modes, one CLI

env-sync gives you explicit control over how secrets are stored, transported, and who gets access. Pick the security model that fits your scenario.

Mode comparison at a glance

Dimensiondev-plaintext-httptrusted-owner-sshsecure-peer
StoragePlaintextPlaintext (optional AGE)AGE encrypted (mandatory)
Transport HTTP SCP / SSH HTTPS + mTLS
OnboardingOpen — any peer on the networkZero-touch if SSH access existsInvitation + explicit approval
AuthorizationNoneImplicit via SSH trustExplicit approved / revoked states
Best forLocal debugging onlyAll your own machinesMultiple owners sharing secrets

Mode A: dev-plaintext-http

Debug-only mode with no encryption at rest or in transit and no authentication. Use this exclusively for isolated local testing — never for real secrets.

env-sync mode set dev-plaintext-http

Mode B: trusted-owner-ssh default

Ideal when every machine belongs to you. SSH provides encrypted transport and authentication automatically. Storage is plaintext by default because trust is already broad in this model; optional AGE encryption can be enabled for defense-in-depth.

How sync works

  1. Discover peers with mDNS, filter by SSH reachability.
  2. Fetch secrets from peers via SCP/SSH.
  3. Compare metadata versions and timestamps.
  4. Merge changes and write locally with automatic backup.
env-sync mode set trusted-owner-ssh

Mode C: secure-peer

Designed for cross-owner collaboration. No shell access is shared between peers — mTLS handles authentication and AGE handles encryption at rest. Access requires an explicit invitation and approval step.

How sync works

  1. Discover peers over mDNS.
  2. Establish mTLS connection and verify authorization.
  3. Fetch encrypted secrets and decrypt locally with your AGE key.
  4. Merge using per-key timestamps for granular conflict resolution.
  5. Re-encrypt to all known recipients and save with backup.
  6. Replay signed membership events for offline catch-up.
env-sync mode set secure-peer

Choosing the right mode

Personal fleet

Use trusted-owner-ssh. Your laptop, desktop, server, NUC — all behind SSH trust you already manage.

Team collaboration

Use secure-peer. Team members get secrets without SSH access to each other's machines.

Quick debugging

Use dev-plaintext-http. Fast setup for throwaway testing — never store real credentials here.

Ready to get started?

Install env-sync and initialize with your preferred security mode.