Skip to content

feat: environment updater plugin for .env, Doppler, Railway, GitHub Secrets (#710)#758

Open
zdfgu113 wants to merge 1 commit into
profullstack:masterfrom
zdfgu113:feat/environment-updater-plugin
Open

feat: environment updater plugin for .env, Doppler, Railway, GitHub Secrets (#710)#758
zdfgu113 wants to merge 1 commit into
profullstack:masterfrom
zdfgu113:feat/environment-updater-plugin

Conversation

@zdfgu113

Copy link
Copy Markdown

Summary

Implements the environment updater plugin requested in issue #710. Integrates with .env files, Doppler, Railway, and GitHub Secrets to sync environment variables across providers.

What is included

New package: packages/secrets/env-updater

  • SecretProvider adapter that fans out pull/push across configured providers
  • Standalone helpers: pullFrom, pushTo, syncEnv, diffEnv
  • Built-in .env file I/O with comment/formatting preservation
  • Key filtering via includeKeys/excludeKeys glob patterns
  • Delegates provider-specific logic to registered SecretProvider instances

CLI commands added to packages/cli/src/commands/secrets.ts

  • sh1pt secret env-update - sync env vars from source provider to one or more targets
  • sh1pt secret env-diff - compare secrets between two providers
  • Both commands lazy-install required adapter packages on first use

Supported providers

  1. .env files - read/write/update with comment preservation
  2. Doppler - via doppler adapter
  3. Railway - via railway adapter
  4. GitHub Secrets - via github adapter

Testing

  • 19 new tests added (all passing)
  • All 42 existing tests across 6 secrets packages still pass
  • Tests cover: env file I/O, key filtering, multi-provider sync, diff output

Closes #710

Add a new secrets/env-updater package that orchestrates environment
variable synchronization across multiple secret management providers.

- New package: @profullstack/sh1pt-secrets-env-updater
  - SecretProvider adapter wrapping existing providers (dotenvx, doppler,
    railway, github, onepassword)
  - Standalone helpers: pullFrom, pushTo, syncEnv, diffEnv, readEnvFile,
    writeEnvFile
  - Key filtering via include/exclude glob patterns
  - Built-in .env file read/write with comment preservation

- CLI commands:
  - `sh1pt secret env-update` — sync secrets from one provider to many
  - `sh1pt secret env-diff` — compare secrets between two providers

- Registered env-updater in adapter-registry under secrets category
- 19 tests covering orchestrator, file I/O, filtering, sync, and diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add support for an environment updater plugin

1 participant