Installing PMAT
Chapter Status: ✅ 100% Working (1/1 methods)
| Status | Count | Examples |
|---|---|---|
| ✅ Working | 1 | cargo install pmat |
| ⚠️ Not Implemented | 0 | Planned for future versions |
| ❌ Broken | 0 | Known issues, needs fixing |
| 📋 Planned | 0 | Future roadmap features |
Last updated: 2026-06-11
PMAT version: pmat 3.19.2
Installation
PMAT is installed from crates.io with Cargo. This is the single supported install method — one way, no scripts, no hand-managed binaries.
cargo install pmat
Prerequisites: Rust 1.95+ installed via rustup.rs.
This installs the pmat binary to ~/.cargo/bin/pmat (which rustup adds to your
PATH). It always builds the latest published version, optimized for your CPU,
on every platform.
From source (latest unreleased)
To install the in-development version directly from a checkout:
git clone https://github.com/paiml/paiml-mcp-agent-toolkit
cd paiml-mcp-agent-toolkit
cargo install --path .
This uses the same Cargo path — it does not introduce a second install location.
Verification
# Check version
pmat --version
# Output: pmat 3.19.2
# Show help
pmat --help
# Quick test
echo "print('Hello PMAT')" > test.py
pmat analyze test.py
Upgrading
cargo install pmat --force
Pre-flight verification (pmat verify)
Before committing changes to a Rust project, run the CI-faithful pre-flight gate:
pmat verify --format json
It runs format, complexity, satd, clippy, tests fail-fast — the exact set CI enforces — so you get a “green here ⇒ green in CI” signal before pushing. See Pre-commit Hooks Management.
Feature Flags (Optional)
PMAT supports optional features enabled at compile time. They add functionality and dependencies.
| Feature | Description | Dependencies Added |
|---|---|---|
git-lib | Use libgit2 for git operations (faster, more features) | ~67 deps |
github-api | GitHub API integration via octocrab | ~255 deps |
analytics-simd | SIMD-accelerated analytics | platform-specific |
# Default (no optional features)
cargo install pmat
# With a feature
cargo install pmat --features git-lib
# Multiple features
cargo install pmat --features "git-lib,github-api"
# All features
cargo install pmat --all-features
Without git-lib, PMAT shells out to git (works on any system with git).
github-api enables repo-size checks and rate-limit awareness, and reads
GITHUB_TOKEN for authenticated requests.
System Requirements
- OS: Windows, macOS, Linux (any distribution)
- Architecture: x86_64, ARM64, Apple Silicon
- Memory: 512MB minimum, 2GB recommended
- Disk: 100MB for binary, 1GB for build cache
- Runtime: None (statically linked)
Troubleshooting
Command not found
Ensure Cargo’s bin directory is on your PATH:
export PATH="$HOME/.cargo/bin:$PATH"
Old version installed
cargo install pmat --force
Next Steps
With PMAT installed, continue to First Analysis.