Skip to content
πŸ” automatically update ZEIT Now secrets in one command
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.dependabot wip Jan 5, 2020
.github/workflows wip Jan 5, 2020
bin Bump 1.0.0 Jan 6, 2020
docs Update README, Bump 1.0.1 Jan 6, 2020
example Bump 1.0.0 Jan 6, 2020
src
.babelrc.js wip Jan 5, 2020
.editorconfig
.eslintrc.js
.gitignore wip Jan 5, 2020
LICENSE
README.md
package.json Bump @babel/core from 7.8.3 to 7.8.4 (#15) Jan 31, 2020
yarn.lock

README.md

now-secrets

GitHub Workflow Status GitHub code style: Prettier dependabot enabled

English | ζ—₯本θͺž

What's this?

now-secrets is a command to automatically update ZEIT Now 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
ZEIT_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 now.json > name in package.json
  • scope: scope in now.json > personal account

CLI Usage

Update all secrets

now-secrets

Add only

ZEIT Now specifications: Secrets that have already been added return an error.

now-secrets --no-remove

Remove only (clean)

now-secrets --clean

Do not update now.json

now-secrets --no-update-now-json

License

You can’t perform that action at this time.