Warden ships as a single npm package —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DevDonzo/warden/llms.txt
Use this file to discover all available pages before exploring further.
@devdonzo/warden — and exposes a warden binary. You can install it globally to use as a standalone CLI from any directory, or install it locally in a project for pinned version control and CI reproducibility. This page covers both paths, walks through environment variable configuration, and shows how to verify a working installation.
Install Options
warden command is available system-wide. After a local build, use node dist/index.js or npm link to expose the warden binary from your shell.
Environment Variables
Warden reads environment variables from your shell or from a.env file in the project root. Three variables cover the core functionality:
| Variable | Required | Purpose |
|---|---|---|
GITHUB_TOKEN | Required for PR creation | Enables branch push and pull request automation via the GitHub API |
SNYK_TOKEN | Optional but recommended | Authenticates against Snyk for dependency scans; Warden falls back to npm-audit without it |
RESEND_API_KEY | Optional | Enables email notifications when notifications.enabled: true in .wardenrc.json |
Create a .env file
Create a .env file in the root of the repository you want to scan. Warden loads it automatically on startup via dotenv:
.env
GITHUB_OWNER and GITHUB_REPO are optional — if not set, Warden attempts to detect them from the git remote configuration of the target repository. OPENAI_API_KEY and ANTHROPIC_API_KEY are placeholders for future agentic integrations.
Add
.env to your .gitignore before committing. Never commit tokens or API keys to source control. In CI, inject secrets via your provider’s secret management (e.g., GitHub Actions secrets).Post-Install Verification
Quick test
Confirm the binary is reachable and the correct version is installed:Validate your environment
Run the full pre-flight check to confirm all required tools and credentials are present:warden validate checks four areas in sequence: environment variables (GITHUB_TOKEN, SNYK_TOKEN), system dependencies (git, node, npm, snyk, pip-audit, gh), Git repository state (.git directory, configured remotes), and project manifest (package.json or requirements.txt). It exits 0 on success and 1 on failure, printing a clear list of errors and warnings.
Diagnose issues
For a more detailed diagnostic that also checks Node.js version, Git, npm, Snyk CLI, and token status individually:warden doctor reports each check with a pass/fail indicator and prints the total count of issues at the end. Use it when warden validate surfaces an error that needs more context.
Optional Tools
Some Warden capabilities require additional tools installed on the system:| Tool | Install | Required for |
|---|---|---|
| Snyk CLI | npm install -g snyk | --scanner snyk dependency scanning |
| Nmap | OS package manager (e.g., brew install nmap) | warden dast infrastructure scanning |
| Metasploit Framework | metasploit.com/get-started | warden dast exploit-module advisory runs |
npm-audit automatically. DAST scans require both a valid dast section in .wardenrc.json and the corresponding tool installed. Run warden doctor after installing any optional tool to confirm it is detected correctly.