hatch_build_scripts
Dependency injection without the boilerplate.
Decision gist · record as of 2026-08-14
Yes, if you need to run build-time scripts and include their artifacts in your distribution. The plugin is straightforward to configure and has no security issues. The aging maintenance status (442 days since last release) is a minor concern for a build tool, but the repository is not archived and remains functional. Install friction is low. Suitable for projects that genuinely need build-time artifact generation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Must be configured in pyproject.toml as a build-system requirement, not installed as a runtime dependency.
- Low friction installation as a pure-Python wheel.
License · maintenance · safety
permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with no warranty. Safe for commercial and private projects.
last release 2025-05-29 (442 days) · last repo commit 2025-05-29 · 26 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 221,415 downloads/mo, #9,279 on PyPI
Alternatives
Verify before relying
# In pyproject.toml:
[build-system]
requires = ["hatchling", "hatch-build-scripts"]
build-backend = "hatchling.build"
[[tool.hatch.build.hooks.build-scripts.scripts]]
commands = ["echo 'Hello' > hello.txt"]
artifacts = ["hello.txt"]
out_dir = "out"- Whether the plugin handles complex shell syntax or only simple commands reliably.
- Performance impact when running many build scripts or large artifact collections.
- Compatibility with non-POSIX shells or Windows batch commands.
What it is and what it does
hatch-build-scripts is a build-time plugin for Hatch that extends the hatchling build backend to run arbitrary shell commands and capture their artifacts during package creation. You configure it in your project's pyproject.toml with arrays of commands, output directories, and artifact patterns (using .gitignore-style syntax), and the plugin executes those commands at build time, then includes the matched artifacts in your final distribution.
It's useful when your package needs to generate code, compile resources, or produce other files as part of the build process—things that can't be checked into version control or that depend on build-time decisions. The plugin depends on hatchling and pathspec, and requires Python 3.10 or later. It is classified as Beta and has not seen a release in over a year, though the repository remains maintained.
Use it for
- Generate source code or configuration files at build time based on templates or external data.
- Compile or transpile assets (e.g., TypeScript to JavaScript, SCSS to CSS) and include them in the wheel.
- Run code generation tools (e.g., protobuf, GraphQL schema generators) and package the output.
- Build native extensions or run build scripts that produce binary artifacts for inclusion.
- Automate documentation generation or changelog processing as part of the package build.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to run build-time scripts and include their artifacts in your distribution.
The plugin is straightforward to configure and has no security issues. The aging maintenance status (442 days since last release) is a minor concern for a build tool, but the repository is not archived and remains functional. Install friction is low. Suitable for projects that genuinely need build-time artifact generation.
Install
hatch-build-scripts on PyPI
Before you install
Low friction installation as a pure-Python wheel. Maintenance status is aging—last release was 442 days ago—but the repository remains active and unarchived with recent commits.
Requires Python 3.10 or later. Must be configured in pyproject.toml as a build-system requirement, not installed as a runtime dependency.
License in practice
MIT License permits unrestricted use, modification, and distribution with no warranty. Safe for commercial and private projects.
Quickstart
# In pyproject.toml:
[build-system]
requires = ["hatchling", "hatch-build-scripts"]
build-backend = "hatchling.build"
[[tool.hatch.build.hooks.build-scripts.scripts]]
commands = ["echo 'Hello' > hello.txt"]
artifacts = ["hello.txt"]
out_dir = "out"
Verify before relying
- Whether the plugin handles complex shell syntax or only simple commands reliably.
- Performance impact when running many build scripts or large artifact collections.
- Compatibility with non-POSIX shells or Windows batch commands.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release <4,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packageshatchlingpathspec |
| Maintenance | Aging 442 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 221,415 / month, #9,279 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaProgramming Language :: Python |
Evidence: hatch_build_scripts-1.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “run scripts during package build”
- hatch_build_scriptsA Hatch build plugin that runs arbitrary shell commands during…
- pytest-console-scriptsA pytest plugin that runs Python console scripts within tests,…
- pulumi-commandExecutes commands and scripts locally or remotely as Pulumi…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also hatchling-autoextras-hook · hatch-polylith-bricks · hatch-cython · hatch-requirements-txt · hatch-vcs · runtime-builder · hatch-fancy-pypi-readme · checkmk-dev-tools · uv-dynamic-versioning