@secr/vercel
v0.1.1
Published
Secr integration for Vercel — pulls secrets into .env.local before build
Maintainers
Readme
@secr/vercel
Secr integration for Vercel — pulls secrets into .env.local before your framework build.
Install
npm install @secr/vercelSetup
Add a
SECR_TOKENenvironment variable in your Vercel project settings.Set
SECR_ORGandSECR_PROJECTenvironment variables, or pass them at build time.Add
secr-vercelto your build command invercel.json:
{
"buildCommand": "secr-vercel && next build"
}Or in your package.json:
{
"scripts": {
"build": "secr-vercel && next build"
}
}Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| SECR_TOKEN | Yes | — | API token |
| SECR_ORG | Yes | — | Organization slug |
| SECR_PROJECT | Yes | — | Project slug |
| SECR_ENVIRONMENT | No | VERCEL_ENV or production | Environment to pull from |
| SECR_API_URL | No | https://api.secr.dev | API base URL |
Options
secr-vercel --output .env.production.local| Flag | Default | Description |
|------|---------|-------------|
| --output | .env.local | Output file path |
Documentation
Full docs at secr.dev/docs.
License
MIT
