A CLI tool to check for environment variables in a project and verify their existence in GitHub secrets.
You can install the CLI tool globally from npm:
npm install -g gh-check-env-cliAlternatively, you can install it as a dev dependency in your project:
npm install --save-dev gh-check-env-cliOnce installed, you can run the check-env command from your terminal.
gh-check-env [options]You can add it to your package.json scripts:
"scripts": {
"gh-check-env": "gh-check-env --repo your-repo --owner your-owner"
}Then run it with:
npm run gh-check-env--repo,-r: Repository name (required)--owner,-o: Repository owner (required)--dir,-d: Directory to scan (default: ".")--token,-t: GitHub token (can also be set withGHCR_TOKENenvironment variable)
gh-check-env --repo my-repo --owner my-username --token your-github-tokenThis will scan the current directory for environment variables, check them against the secrets in the specified GitHub repository, and log the results to the console.