Installation

Get Code Pathfinder running in minutes with your preferred installation method.

Choose Your Installation Method

Code Pathfinder offers multiple installation options to fit your workflow. Choose Homebrew for the easiest setup on macOS/Linux, npm for Node.js environments, Docker for containerized workflows, pre-built binaries for direct execution, or build from source for the latest features.

Using Homebrew 🍺

The recommended way to install on macOS or Linux. Homebrew installation is available from version 0.0.34 onwards.

brew install shivasurya/tap/pathfinder

This automatically taps the repository and installs the latest version.

Includes Python DSL Support: The Homebrew formula automatically installs the codepathfinder Python package for writing custom security rules.

Easy Updates: Run brew upgrade pathfinder to get the latest version.

Install a Specific Version

If you need a specific version (v0.0.34 or later), you can install it directly:

brew install shivasurya/tap/pathfinder@0.0.34

Using npm

Install Code Pathfinder globally via npm. Requires Node.js 14+ installed on your system.

Install Code Pathfinder globally via npm for structural code analysis:

npm install -g codepathfinder
pathfinder --help

Looking for AI-powered security analysis? Check out SecureFlow AI for real-time vulnerability detection with 13+ AI models (Claude, GPT, Gemini, Grok).

Using Docker 🐳

The quickest way to get started. Pull the official Docker image for immediate use:

docker pull shivasurya/code-pathfinder:stable-latest

Run a scan on your project:

docker run --rm -v "./src:/src" \
  shivasurya/code-pathfinder:stable-latest \
  ci --project /src --ruleset cpf/java

Recommended for CI/CD: Docker ensures consistent environments across development, staging, and production pipelines.

Pre-Built Binaries

Download platform-specific binaries from GitHub Releases. Available for Linux, macOS, and Windows.

Download and Run

# Download the latest release for your platform
# Example for Linux/macOS:
chmod u+x pathfinder
./pathfinder --help

Linux

amd64, arm64

macOS

Intel, Apple Silicon

Windows

x64

From Source

Build Code Pathfinder from source for the latest features or to contribute to development. Requires Gradle and Go installed.

# Clone the repository
git clone https://github.com/shivasurya/code-pathfinder
cd code-pathfinder/sourcecode-parser

# Build the binary
gradle buildGo

# Run Code Pathfinder
./build/go/pathfinder --help

For Contributors: Building from source gives you access to unreleased features and lets you contribute bug fixes or new rules.

See the Contributing Guide for development setup and guidelines.

Verify Installation

Confirm Code Pathfinder is installed correctly:

pathfinder --version
# Output:
# Version: 0.0.25
# Git Commit: 40886e7

Check available commands:

pathfinder --help

Next Steps