Secretz is a CLI tool that simplifies GitHub repository secret management. It streamlines working with GitHub secrets by letting you:
- Create new secrets
- Update existing ones
- Delete unwanted secrets
- Most importantly, upload entire .env files at once
No more manually setting secrets one by one. Secretz handles bulk operations so you can manage your repository secrets efficiently.
- Bulk upload from .env files - Upload dozens of secrets in one command
- Full CRUD operations - Create, read, update, and delete secrets
- Clean, intuitive CLI - Simple subcommand structure
- Direct GitHub API integration - Works with GitHub's REST API
- Multi-repository support - Manage secrets across different repos
# List all secrets for a repo
secretz list -o username -r repository
# Upload secrets from .env file
secretz create -f .env -o username -r myproject
# Create a single secret
secretz create -s SECRET_NAME -v value -o username -r myproject
# Delete a secret
secretz delete -s SECRET_NAME -o username -r myprojectcurl -sSfL https://raw.githubusercontent.com/anthonyb8/secretz/main/scripts/install.sh | bashAll commands require the owner (-o) and repository (-r) flags to identify the target repository.
List the secrets on a repository
secretz list -o <OWNER> -r <REPO_NAME>Get secret by name, best way to check if exists
secretz list -s <SECRET_NAME> -o <OWNER> -r <REPO_NAME>Get secret by name, best way to check if exists
secretz get -s <SECRET_NAME> -o <OWNER> -r <REPO_NAME>Create or update secret
secretz create -s <SECRET_NAME> -v <SECRET_VALUE> -o <OWNER> -r <REPO_NAME>Uploads secrets from a .env file. If no path checks current directory for .env
secretz create -f <OPTIONAL_FILE_PATH> -o <OWNER> -r <REPO_NAME>Delete secret
secretz delete -s <SECRET_NAME> -o <OWNER> -r <REPO_NAME>The .env file should contain key=value pairs, comments will be ignored:
# comment
API_KEY=abc123
DATABASE_URL="postgres://localhost/mydb"
SECRET_TOKEN=xyz789Secretz requires a GitHub personal access token with repo permissions. Set it as:
export GITHUB_PAT=your_token_hereThis project is licensed under the Apache 2.0 License. See the LICENSE file for details.