@secr/netlify-plugin
v0.1.1
Published
Secr Netlify Build Plugin — injects secrets into process.env during build
Downloads
185
Maintainers
Readme
@secr/netlify-plugin
Secr build plugin for Netlify — injects secrets into process.env during build.
Install
npm install @secr/netlify-pluginSetup
Add
SECR_TOKENas an environment variable in your Netlify site settings.Add the plugin to your
netlify.toml:
[[plugins]]
package = "@secr/netlify-plugin"
[plugins.inputs]
org = "my-org"
project = "my-project"
environment = "production"Alternatively, set SECR_ORG and SECR_PROJECT as environment variables instead of using plugins.inputs.
Plugin Inputs
| Input | Required | Default | Description |
|-------|----------|---------|-------------|
| org | Yes | SECR_ORG | Organization slug |
| project | Yes | SECR_PROJECT | Project slug |
| environment | No | production | Environment to pull from |
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| SECR_TOKEN | Yes | API token |
| SECR_API_URL | No | API base URL (default: https://api.secr.dev) |
How It Works
The plugin runs during onPreBuild — before your framework builds. It pulls secrets from secr and injects them directly into process.env, so your build process picks them up automatically.
Documentation
Full docs at secr.dev/docs.
License
MIT
