Env
Push and pull keys between your local .env and the cloud, or run commands with secrets injected.
Env
Pull keys from cloud to .env
storemyapi pullFetches all keys from the linked cloud project and merges them into your local .env file. Keys already in .env that are not in the cloud are left untouched. This is a merge, not a replace.
Pull a single key:
storemyapi pull STRIPE_SECRET_KEYOnly fetches and writes that one key, leaving the rest of .env unchanged.
Push keys from .env to cloud
storemyapi pushReads your local .env and uploads all key/value pairs to the linked cloud project.
Push a single key:
storemyapi push DATABASE_URLOnly pushes that one key from .env to the cloud.
Run a command with cloud keys injected
storemyapi env run -- <command>Fetches all keys from the linked cloud project, injects them into the child process's environment, and runs the command. Nothing is written to disk.
The -- separator is required to distinguish your command from CLI flags.
Examples:
# Start your dev server with cloud keys
storemyapi env run -- npm run dev
# Run a database migration
storemyapi env run -- npx prisma migrate deploy
# Run tests with cloud keys
storemyapi env run -- npx jest
# Run any arbitrary command
storemyapi env run -- node scripts/seed.jsThe injected variables are only available to the child process and its children. Your current shell session is not modified.
Audit local vs cloud drift
storemyapi auditCompares your local .env against the cloud and reports:
- Keys missing locally (in cloud but not in
.env) - Keys not pushed (in
.envbut not in cloud) - Keys with value mismatches between local and cloud