shuck

Getting Started

An extremely fast shell script linter, written in Rust.

  • ⚡ 20x faster than ShellCheck, with built-in caching for incremental runs
  • 🐚 Multi-dialect support for bash, sh/POSIX, dash, ksh, mksh, and zsh
  • 🤝 ShellCheck suppression compatibility (# shellcheck disable=SC2086 just works)
  • 🔄 ShellCheck CLI compatibility mode for existing editor, CI, and local workflows
  • 🧩 Embedded shell extraction for GitHub Actions workflows and composite actions
  • 🔧 Fix support, for automatic error correction (--fix and --unsafe-fixes)
  • 📏 Rules across correctness, style, performance, and portability categories
  • 💾 Per-file caching to avoid re-analyzing unchanged files
  • 📦 Single binary, zero dependencies

Shuck aims to be orders of magnitude faster than ShellCheck while expanding coverage to dialects that ShellCheck does not support, like zsh.

Installation

From source

cargo install shuck

Pre-built binaries

Pre-built binaries are available for macOS (aarch64) and Linux (x86_64) from the releases page.

Usage

# Check files and directories
shuck check script.sh src/
 
# Check the current directory
shuck check .
 
# Check embedded GitHub Actions `run:` blocks
shuck check .github/workflows/ci.yml
 
# Read from stdin
echo 'echo $foo' | shuck check -
 
# Apply safe fixes automatically
shuck check --fix .

ShellCheck compatibility mode

If you already have tools that invoke shellcheck, Shuck can expose a ShellCheck-shaped CLI without changing your primary workflow all at once.

See the dedicated ShellCheck compatibility guide for activation, supported flags, .shellcheckrc handling, and current caveats.

Use Shuck with rules_lint

If you use rules_lint for shell scripts in Bazel, you can keep the existing ShellCheck-shaped lint hook and swap in Shuck underneath it.

See the dedicated rules_lint replacement example for the Bazel targets and compatibility setup.

Embedded scripts

Shuck also lints shell embedded in supported GitHub Actions workflows and composite actions. See the dedicated Embedded Scripts guide for supported files, shell resolution, diagnostic remapping, and suppression behavior inside run: blocks.