Skip to content

Installation

Linux / macOS

bash
curl -fsSL https://codescan.siiway.org/install.sh | sh

The script auto-detects your OS and CPU architecture, downloads the right pre-compiled binary from the latest GitHub Release, and installs it to /usr/local/bin.

To install a specific version:

bash
CODESCAN_VERSION=v0.2.0 curl -fsSL https://codescan.siiway.org/install.sh | sh

To install to a custom directory:

bash
CODESCAN_INSTALL_DIR=~/.local/bin curl -fsSL https://codescan.siiway.org/install.sh | sh

Windows (PowerShell)

powershell
iwr https://codescan.siiway.org/install.ps1 | iex

The script installs to %LOCALAPPDATA%\Programs\codescan and adds it to your user PATH automatically.

To install a specific version:

powershell
$env:CODESCAN_VERSION = "v0.2.0"
iwr https://codescan.siiway.org/install.ps1 | iex

Via cargo (crates.io)

If you have Rust installed:

bash
cargo install codescan

Pre-compiled Binaries

Download the latest binary directly from GitHub Releases:

PlatformArchitectureDownload
Linuxx86_64codescan-{version}-x86_64-unknown-linux-musl.tar.gz
LinuxARM64codescan-{version}-aarch64-unknown-linux-musl.tar.gz
macOSApple Siliconcodescan-{version}-aarch64-apple-darwin.tar.gz
macOSIntelcodescan-{version}-x86_64-apple-darwin.tar.gz
Windowsx86_64codescan-{version}-x86_64-pc-windows-msvc.zip
WindowsARM64codescan-{version}-aarch64-pc-windows-msvc.zip

A SHA256SUMS.txt file is included in each release for checksum verification.

Build from Source

bash
git clone https://github.com/siiway/codescan
cd codescan
cargo build --release
# binary at: target/release/codescan

Verify Installation

bash
codescan --version

Dependencies

codescan is a single self-contained binary with no runtime dependencies. All Rust crate dependencies are statically linked.

CratePurpose
clapCLI argument parsing
regexPattern matching (linear-time, safe)
rayonParallel file scanning
ignoreGitignore-aware directory traversal
serde / serde_jsonJSON config and custom rules
tomlTOML configuration file parsing
globsetGlob pattern matching for suppressions
coloredTerminal color output
once_cellLazy static regex compilation
tracingStructured diagnostic logging

See THIRD_PARTY_LICENSES for full license text.