Installation
One-Line Install (Recommended)
Linux / macOS
bash
curl -fsSL https://codescan.siiway.org/install.sh | shThe 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 | shTo install to a custom directory:
bash
CODESCAN_INSTALL_DIR=~/.local/bin curl -fsSL https://codescan.siiway.org/install.sh | shWindows (PowerShell)
powershell
iwr https://codescan.siiway.org/install.ps1 | iexThe 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 | iexVia cargo (crates.io)
If you have Rust installed:
bash
cargo install codescanPre-compiled Binaries
Download the latest binary directly from GitHub Releases:
| Platform | Architecture | Download |
|---|---|---|
| Linux | x86_64 | codescan-{version}-x86_64-unknown-linux-musl.tar.gz |
| Linux | ARM64 | codescan-{version}-aarch64-unknown-linux-musl.tar.gz |
| macOS | Apple Silicon | codescan-{version}-aarch64-apple-darwin.tar.gz |
| macOS | Intel | codescan-{version}-x86_64-apple-darwin.tar.gz |
| Windows | x86_64 | codescan-{version}-x86_64-pc-windows-msvc.zip |
| Windows | ARM64 | codescan-{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/codescanVerify Installation
bash
codescan --versionDependencies
codescan is a single self-contained binary with no runtime dependencies. All Rust crate dependencies are statically linked.
| Crate | Purpose |
|---|---|
clap | CLI argument parsing |
regex | Pattern matching (linear-time, safe) |
rayon | Parallel file scanning |
ignore | Gitignore-aware directory traversal |
serde / serde_json | JSON config and custom rules |
toml | TOML configuration file parsing |
globset | Glob pattern matching for suppressions |
colored | Terminal color output |
once_cell | Lazy static regex compilation |
tracing | Structured diagnostic logging |
See THIRD_PARTY_LICENSES for full license text.