# shellcheck

> ShellCheck, a static analysis tool for shell scripts

- Type: agent or tool
- Field: Code Review & Testing
- Repository: https://github.com/koalaman/shellcheck
- GitHub stars: 40378
- Licence: GPL-3.0
- Language: Haskell
- Last push: 2026-11-23
- Page: https://imutechz.in/agents/shellcheck

## What it is
ShellCheck is a GPLv3 static analysis tool for bash and sh shell scripts that identifies syntax issues, semantic problems, and subtle pitfalls. It provides warnings and suggestions through a web interface, terminal command, editor integrations, and CI/CD pipelines. The tool outputs multiple formats including JSON, CheckStyle XML, and GCC-compatible warnings for integration into build systems.

## Features
- Static analysis for bash/sh scripts
- Web interface at shellcheck.net
- Terminal command-line usage
- Editor integrations (Vim, Emacs, VSCode, etc.)
- Multiple output formats (JSON, CheckStyle, GCC)
- CI/CD integration with exit codes

## Best for
- Finding shell script bugs before runtime
- Integrating into CI/CD pipelines
- Editor-based linting while writing scripts
- Learning shell script best practices

## Pros
- Catches beginner syntax errors and advanced pitfalls
- Works in terminal, editors, and CI systems
- Multiple output formats for tooling integration
- Pre-installed on major CI platforms

## Cons
- Requires installation via package manager or binary
- New versions may add warnings that break builds
- Limited to bash/sh shell scripts

## Install
```
sudo apt install shellcheck
```

## Usage
```
shellcheck yourscript
```

Tags: shell-script, static-analysis, linter, bash, ci-cd, editor-integration, gplv3
