skillfed

sphinxcontrib-shellcheck

Sphinx extension to lint shell code blocks

sphinxcontrib-shellcheck v1.1.2 76.7K downloads/30d#14,597 on PyPI2
Permissive license MIT Abandoned released

What it is and what it does

sphinxcontrib-shellcheck is a Sphinx documentation builder extension that integrates the shellcheck linter into your documentation build process. It scans bash, sh, dash, and ksh code blocks embedded in reStructuredText files and reports shell script errors, style violations, and potential bugs with line and column references.

The extension runs as a custom Sphinx builder (invoked with `sphinx-build -b shellcheck`) and processes code blocks marked with shell language directives. It relies on the external shellcheck utility to perform the actual linting and outputs violations to both the console and a log file. Configuration options allow you to specify shell dialects, the shellcheck executable path, terminal prompt character, and debug verbosity.

Use it for:

  • Validate shell scripts embedded in installation guides or deployment documentation before publishing.
  • Catch common shell scripting mistakes in code examples during CI/CD documentation builds.
  • Enforce consistent shell style across multiple documentation files in a large project.
  • Document shell commands with automatic verification that they follow best practices.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Sphinx extension that automatically lints shell code blocks in documentation using the shellcheck utility, reporting shell script errors and style issues during the documentation build.

No. The package is abandoned (last release March 2020) and has not been updated for modern Python or Sphinx versions. While it has low install friction and a permissive MIT license, the lack of maintenance means it will not receive bug fixes, security updates, or compatibility patches. If you need shell linting in Sphinx documentation, consider maintaining a fork or evaluating active alternatives.

Install

sphinxcontrib-shellcheck on PyPI

pip

pip install sphinxcontrib-shellcheck

uv

uv add sphinxcontrib-shellcheck

poetry

poetry add sphinxcontrib-shellcheck

Installing sphinxcontrib-shellcheck

Before you install

Low install friction with pure Python wheels for Python 3.5, 3.6, 3.7, and 3.8. However, the package is abandoned as of March 2020, and depends on the external shellcheck utility which must be installed separately on the system.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it safe to adopt in most projects.

Quickstart

pip install sphinxcontrib-shellcheck

Add to conf.py:
extensions = ["sphinxcontrib.shellcheck"]

Run: sphinx-build -b shellcheck . _build example.rst

The shellcheck command-line utility must be installed on the system; the package is a Sphinx extension wrapper around it.

Verify before relying

  • Whether shellcheck utility is automatically installed or must be provisioned separately by the user.
  • Compatibility with Python versions beyond 3.8 or modern Sphinx versions.
  • Current state of the shellcheck executable dependency and any version constraints.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 4 — decorator, docutils, sphinx, six
Maintenance abandoned — 2,328 days since the last release
Last repo commit
First released
Downloads 76,715/month — #14,597 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sphinxcontrib_shellcheck-1.1.2-py35-none-any.whl; sphinxcontrib_shellcheck-1.1.2-py36-none-any.whl; sphinxcontrib_shellcheck-1.1.2-py37-none-any.whl; sphinxcontrib_shellcheck-1.1.2-py38-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: Sphinx :: ExtensionIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Documentation

Tags

sphinx shell lintingshellcheck sphinx extensionlint bash in documentationshell code validation sphinxdocumentation shell script checker
sphinx-extensionshell-lintingabandoned

More Documentation packages

docutils

Docutils converts plaintext documentation in…

unclear · top 1,000 on PyPI

Markdown

Converts Markdown text to HTML using a Python…

permissive · top 1,000 on PyPI

Sphinx

Sphinx generates professional documentation…

permissive · top 1,000 on PyPI

griffe

Griffe extracts the complete structure and…

permissive · top 1,000 on PyPI

alabaster

Alabaster is a clean, responsive Sphinx theme…

permissive · top 1,000 on PyPI

mkdocs-material

Material for MkDocs is a professional theme and…

permissive · top 5,000 on PyPI

sphinx-markdown-builder

A Sphinx extension that generates Markdown…

permissive · top 15,000 on PyPI

sphinx-lint

Sphinx Lint checks reStructuredText and Python…

permissive · top 15,000 on PyPI

linuxdoc

Sphinx-doc extensions and command-line tools…

agpl · top 15,000 on PyPI

sphinxcontrib-spelling

A Sphinx extension that checks documentation…

permissive · top 5,000 on PyPI

shellcheck-py

Provides a pip-installable shellcheck binary…

permissive · top 5,000 on PyPI

sphinx-substitution-extensions

Adds substitution support to Sphinx directives,…

permissive · top 15,000 on PyPI

rstcheck

Validates reStructuredText syntax and checks…

permissive · top 5,000 on PyPI

sphinx-jinja

A Sphinx extension that lets you embed Jinja2…

permissive · top 5,000 on PyPI

sphinxcontrib-confluencebuilder

Sphinx extension that converts reStructuredText…

permissive · top 15,000 on PyPI

sphinx-llm

Sphinx extensions that generate LLM-consumable…

permissive · top 15,000 on PyPI