Installation
Install the CLI from npm, then initialize a config. The --ci flag also scaffolds a GitHub Actions workflow.
Install the CLI
terminal
# install the CLI $ npm install @frontguard/cli # initialize config (auto-detects your framework, --ci adds a GitHub Action) $ npx frontguard init --ci # verify your environment is ready $ npx frontguard doctor
Framework detection
frontguard init auto-detects your framework and writes sensible defaults — including a filesystem route source where one exists.
Next.jsRemixSvelteKitNuxtAstro
Environment variables
FRONTGUARD_OPENAI_KEYOpenAI API key for AI analysis (optional).FRONTGUARD_ANTHROPIC_KEYAnthropic API key for AI analysis (alternative).GITHUB_TOKENGitHub token for posting PR comments. Provided automatically in Actions.FRONTGUARD_DEBUGSet to 1 for full stack traces on errors.