Installation
import { Tabs, TabItem } from ‘@astrojs/starlight/components’;
AnkerCode ships a single installer that handles everything: the CLI, all scanner dependencies (Syft, Trivy, Gitleaks, Pandoc), and the global ankercode symlink.
Requirements
Section titled “Requirements”- Linux (x86_64 or arm64) or macOS
- Node.js v22+ — install via nvm if needed
- pnpm — installed automatically if missing
curl,tar,unzip— standard on most systems- wkhtmltopdf — for PDF generation (see below)
One-command install
Section titled “One-command install”curl -fsSL https://raw.githubusercontent.com/your-org/ankercode/main/install.sh | bashOr clone first and run locally:
git clone https://github.com/your-org/ankercode.git ~/ankercodecd ~/ankercodebash install.shThe installer:
- Detects your OS and architecture
- Downloads and installs Syft (SBOM), Trivy (CVE + licenses), Gitleaks (secrets), Pandoc (report rendering) to
~/.local/bin - Installs Node dependencies via pnpm
- Builds all packages
- Creates a symlink
~/.local/bin/ankercode → packages/cli/dist/index.js
wkhtmltopdf (PDF support)
Section titled “wkhtmltopdf (PDF support)”wkhtmltopdf is required for PDF output. Install it separately:
Verify installation
Section titled “Verify installation”ankercode --version# AnkerCode v0.1.0
ankercode --helpKeep everything in PATH
Section titled “Keep everything in PATH”The installer places binaries in ~/.local/bin. Make sure it’s in your PATH:
# Add to ~/.zshrc or ~/.bashrcexport PATH="$HOME/.local/bin:$PATH"Updating
Section titled “Updating”ankercode upgrade # update AnkerCode onlyankercode upgrade --scanners # also update Syft, Trivy, Gitleaks, Pandoc