now-secrets
v1.2.0
Published
**now-secrets** is a command to automatically update [Vercel](https://vercel.com) secrets based on .env.
Downloads
4
Readme
What's this?
now-secrets is a command to automatically update Vercel secrets based on .env.
⚠ This is an unofficial project.
Getting Started
- Install this package to global.
npx add-pkg -g now-secrets # add-pkg: https://add-pkg.dotplants.net
- Move to your project and edit
.env
.
cd /path/to/your-project
vi .env
- Add
VERCEL_TOKEN
to .env.You can create the token from https://vercel.com/account/tokens.
VERCEL_TOKEN=foobar
OTHER_ENV=hogefuga
- Run
now-secrets
.
now-secrets
- If successful,
@{prefix}_{env_key}
has been added.
Config
In package.json
:
{
...
"now_secrets": {
"prefix": "",
"env_file_name": "" // default: .env
}
}
- prefix:
now_secrets.prefix
in package.json >name
in vercel.json >name
in package.json - scope:
scope
in now.json > personal account
CLI Usage
now-secrets v1.2.0
Usage: now-secrets [options]
Update all secrets
Options:
--clean, --no-add, -c: Remove only (clean)
--no-remove: Add only
--no-update-vercel-json, --no-update-now-json: Do not update vercel.json
Usage: now-secrets [command] [options]
Commands:
- update: Update all secrets
- remove: Delete secrets
- help: Show the help of cli
Run "now-secrets help [command]" for detailed usage of the command.
Add only
Vercel specifications: Secrets that have already been added return an error.
License
- code: MIT
- icon: Font Awesome - CC BY 4.0 License