infisical-env-push
v1.2.1
Published
Push .env secrets to Infisical using local .infisical.json config
Maintainers
Readme
infisical-env-push
A CLI tool that pushes .env secrets to Infisical using the nearest .infisical.json config file — no hardcoded project IDs or environment names.
Installation
# Install globally
npm install -g @infisical/cli infisical-env-pushSetup
# Login to your Infisical instance
infisical login --domain=https://secrets.yunsoft.com
# Link your project folder (creates .infisical.json)
infisical init --domain=https://secrets.yunsoft.comUsage
# Push .env to default environment (from .infisical.json)
infisical-env-push
# Specify a secret path (useful for monorepos)
infisical-env-push --path /backend
infisical-env-push --path /frontend
# Push to multiple environments at once
infisical-env-push --env dev,prod --path /backend
# Use a different .env file
infisical-env-push --env-file .env.production --env prod
# Preview which keys would be pushed (no actual push)
infisical-env-push --dry-run
infisical-env-push --env dev,prod --dry-runOptions
| Option | Default | Description |
|---|---|---|
| --env-file | .env | Path to the .env file to read |
| --env | .infisical.json → dev | Target environment(s), comma-separated |
| --path | / | Secret path in Infisical |
| --project-id | .infisical.json | Override the project ID |
| --dry-run | — | Print key names without pushing |
Requirements
- Infisical CLI installed and authenticated via
infisical login - A
.infisical.jsonfile in the current or any parent directory (created byinfisical init)
