Reference
Netlify
Move environment variables to and from one Netlify site.
Move environment variables to and from one Netlify site.
The connection
| What | This provider |
|---|---|
| Vendor | Netlify |
| Key | netlify-env |
| Availability | available. You can connect it today. |
| Credential penv holds | netlify-token |
| Values read back | yes |
| Activation | on-next-deploy |
What it moves
| Direction | What it does |
|---|---|
import | Reads names and values out of the store into penv. |
export | Writes names and values from penv into the store. |
When a written value goes live
on-next-deploy. A new value waits there and arrives with your next deploy.
What happens to a name that exists
| Direction | Policies you can pick |
|---|---|
import | skip_existing, new_version, fail |
export | create_only, overwrite, overwrite_and_prune |
How syncs work says what each one does.
How you connect
You paste a credential you already hold. penv seals it and never shows it again.
| Field | Label | Kind | Required | What it is |
|---|---|---|---|---|
token | Access token | secret, masked here and sealed | yes |
What the connection asks for
Fixed when you connect, and shared by every mapping on it.
| Field | Label | Kind | Required | Advanced | What it is |
|---|---|---|---|---|---|
accountId | Team | text | yes | no | The team slug from your Netlify URL. Verify checks the token actually reaches it. |
What a mapping asks for
Answered once per environment you map.
| Field | Label | Kind | Required | Advanced | What it is |
|---|---|---|---|---|---|
siteId | Site | text | yes | no | Site settings → General → Site ID. Every value stays scoped to this one site. |
context | Deploy context | choice | yes | yes | Other contexts on the same variable are left untouched. One of Production, Deploy previews, Branch deploys, Dev, Dev server. Starts at production. |
scopes | Where it is readable | choice | yes | yes | Narrows where new variables are readable. Netlify sets this once, at creation. One of Everywhere (Netlify's default), Builds only, Functions and runtime. Starts at all. |
Permissions it needs
penv probes for these when it verifies the connection.
| Permission | Directions | Blocking | Without it |
|---|---|---|---|
accounts:read | every direction | yes | We cannot confirm this token reaches the team you named. |
env:read | import | yes | Import cannot read variable values. |
env:write | export | yes | Export cannot write anything. |