Skip to content

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.

  • 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)
Terminal window
curl -fsSL https://raw.githubusercontent.com/your-org/ankercode/main/install.sh | bash

Or clone first and run locally:

Terminal window
git clone https://github.com/your-org/ankercode.git ~/ankercode
cd ~/ankercode
bash install.sh

The installer:

  1. Detects your OS and architecture
  2. Downloads and installs Syft (SBOM), Trivy (CVE + licenses), Gitleaks (secrets), Pandoc (report rendering) to ~/.local/bin
  3. Installs Node dependencies via pnpm
  4. Builds all packages
  5. Creates a symlink ~/.local/bin/ankercode → packages/cli/dist/index.js

wkhtmltopdf is required for PDF output. Install it separately:

```bash sudo apt-get install -y wkhtmltopdf ``` ```bash sudo pacman -S wkhtmltopdf ``` ```bash brew install wkhtmltopdf ```
Terminal window
ankercode --version
# AnkerCode v0.1.0
ankercode --help

The installer places binaries in ~/.local/bin. Make sure it’s in your PATH:

Terminal window
# Add to ~/.zshrc or ~/.bashrc
export PATH="$HOME/.local/bin:$PATH"
Terminal window
ankercode upgrade # update AnkerCode only
ankercode upgrade --scanners # also update Syft, Trivy, Gitleaks, Pandoc