
100% Free & Open Source • Privacy-First Security Scanning and AI Code Review CLI
100% Free & Open Source • Privacy-First Security Scanning and AI Code Review CLI
____ _ _ _ ____ ____ ____ ____ _ _ _ ____ _ ___
/ ___| | | | / \ | _ \| _ \ / ___| / ___| / \ | \ | | / ___| | |_ _|
| | _| | | |/ _ \ | |_) | | | | \___ \| | / _ \ | \| | _____ | | | | | |
| |_| | |_| / ___ \| _ <| |_| | ___) | |___ / ___ \| |\ | |_____| | |___| |___ | |
\____|\___/_/ \_\_| \_\____/ |____/ \____/_/ \_\_| \_| \____|_____|___|
Privacy-First AI Code Review & Security Scanning
GuardScan is 100% free and open source! No credit system, no paywalls, no subscriptions.
# Install globally via npm
npm install -g guardscan
# Initialize GuardScan
guardscan init
# Run comprehensive security scan (100% FREE, offline)
guardscan security
# Configure AI provider for enhanced review (optional, BYOK)
guardscan config
# Run AI-enhanced code review
guardscan run
# Check status
guardscan status
For Docker environments, especially Alpine Linux:
# Install dependencies first
apk add --no-cache python3 make g++ pkgconfig cairo-dev pango-dev \
libjpeg-turbo-dev giflib-dev pixman-dev freetype-dev build-base git
# Install GuardScan
npm install -g guardscan
# Set home directory (important for Docker)
export GUARDSCAN_HOME=/app/.guardscan
# Initialize
guardscan init
Documentation:
GuardScan includes comprehensive security scanners:
Note: Performance and mutation testing require optional external tools.
9 Advanced AI-Powered Features:
guardscan explain) - Understand complex codeguardscan review) - Comprehensive AI code reviewguardscan commit) - Generate commit messagesguardscan docs) - Auto-generate documentationguardscan test-gen) - Generate unit testsguardscan refactor) - Improve code qualityguardscan threat-model) - Security architecture analysisguardscan migrate) - Framework/language migrationsguardscan chat) - RAG-powered codebase Q&AAST Parsers for 7+ Languages:
Configure any AI provider you prefer:
You pay the AI provider directly - GuardScan charges nothing!
All commands are 100% FREE with no limits!
| Command | Description |
|---|---|
guardscan init | Initialize config, generate client_id |
guardscan config |
| Command | Description |
|---|---|
guardscan security | Run comprehensive security scan (offline) |
guardscan scan | Quick security scan |
guardscan run | AI-enhanced full code review (BYOK) |
| Command | Description |
|---|---|
guardscan test | Run tests & code quality analysis |
guardscan perf | Performance testing & load testing (requires k6 - optional) |
guardscan mutation | Mutation testing for test quality (requires Stryker - optional) |
Note: perf and mutation commands require optional external tools. See Testing Tools Guide for installation and usage details.
| Command | Description |
|---|---|
guardscan sbom | Generate Software Bill of Materials |
guardscan rules | Custom YAML-based rule engine |
We take privacy seriously:
Telemetry is:
guardscan config --telemetry=false)guardscan security
Runs 9 security scanners locally:
# Step 1: Configure your AI provider (one-time)
guardscan config
# Choose provider: OpenAI, Claude, Gemini, Ollama
# Enter your API key
# Step 2: Run AI review
guardscan run
How it works:
You pay your AI provider directly - GuardScan is free!
No credit system. No subscriptions. No paywalls.
You pay them directly (not GuardScan):
Example costs for 10K LOC codebase:
GuardScan follows a privacy-first, client-side architecture where all code analysis happens locally.
┌─────────────────────────────────────────────────────────────┐
│ USER'S MACHINE │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ GuardScan CLI (Node.js/TypeScript) │ │
│ │ │ │
│ │ • 21 Commands (security, run, test, explain...) │ │
│ │ • 30 Core Modules (scanners, parsers, metrics) │ │
│ │ • 9 AI Features (explain, review, test-gen, etc.) │ │
│ │ • 7 Language Parsers (Python, Java, Go, Rust...) │ │
│ │ • 6 AI Provider Integrations │ │
│ │ │ │
│ │ Config: ~/.guardscan/config.yml │ │
│ │ Cache: ~/.guardscan/cache/ │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ │ Optional telemetry only │
│ ▼ │
└───────────────────────────────────────────────────────────────┘
│
┌───────────┴──────────┐
│ │
▼ ▼
┌──────────────────────────┐ ┌──────────────────────────┐
│ User's AI Provider │ │ GuardScan Backend │
│ (User pays directly) │ │ (Optional telemetry) │
│ │ │ │
│ • OpenAI (GPT-4) │ │ Cloudflare Workers │
│ • Anthropic (Claude) │ │ + Supabase │
│ • Google (Gemini) │ │ │
│ • Ollama (Local) │ │ • Health checks │
│ │ │ • Anonymous telemetry │
│ User's API Key → │ │ • NO source code │
│ User's billing → │ │ • NO credit validation │
└──────────────────────────┘ └──────────────────────────┘
CLI (34,213 LOC):
Monitoring service (separate repo, optional):
GUARDSCAN_API_URLnpm install -g guardscan
# Clone repository
git clone https://github.com/ntanwir10/GuardScan.git
cd GuardScan/cli
# Install dependencies
npm install
# Build
npm run build
# Link globally
npm link
# Verify
guardscan --help
GuardScan is open source and we welcome contributions!
Q: Is GuardScan really free? A: Yes! 100% free, no credit system, no subscriptions, no limits.
Q: Do I need to create an account?
A: No! Just npm install -g guardscan and run guardscan init.
Q: Do I need an AI API key? A: Only if you want AI-enhanced review. Static analysis (9 security scanners) works without any API key.
Q: Which AI provider should I use? A: Your choice! OpenAI (powerful), Claude (balanced), Gemini (affordable), Ollama (free, local).
Q: Does GuardScan upload my code? A: Never. GuardScan only uploads anonymized metadata for optional telemetry.
Q: Can I disable telemetry?
A: Yes! Run guardscan config --telemetry=false or set telemetryEnabled: false in ~/.guardscan/config.yml.
Q: How do I support this project? A: Star the repo on GitHub, contribute code, report bugs, or sponsor the project!
MIT License - see LICENSE
GuardScan is built with these amazing open-source tools:
Made with ❤️ by developers, for developers
| Configure AI provider & settings |
guardscan status | Show configuration and repo info |
guardscan reset | Clear local cache & config |
| Command | Description |
|---|
guardscan explain <file> | Explain how code works |
guardscan review <file> | Comprehensive AI code review |
guardscan commit | Generate commit messages |
guardscan docs <file> | Auto-generate documentation |
guardscan test-gen <file> | Generate unit tests |
guardscan refactor <file> | Get refactoring suggestions |
guardscan threat-model | Security architecture analysis |
guardscan migrate | Framework/language migration help |
guardscan chat | Interactive Q&A about codebase (RAG) |