hatch
modern Python project manager
TLDR
SYNOPSIS
hatch [options] command [args]
DESCRIPTION
Hatch is a modern, extensible Python project manager. It handles project creation, building, publishing, environment management, and testing in a unified tool. It is the official build backend recommended by the Python Packaging Authority (PyPA).Hatch uses pyproject.toml for configuration and supports current PEP standards. It provides reproducible environments and multi-environment testing via configurable matrices.
PARAMETERS
new name
Create new project.build
Build distributions.publish
Publish to package index.run cmd
Run command in environment.shell
Enter project environment.env subcommand
Manage environments.test
Run tests across environments.fmt
Format code.version
Show/bump version.clean
Remove build artifacts.
PYPROJECT.TOML
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "myproject"
version = "0.1.0"
[tool.hatch.envs.default]
dependencies = ["pytest"]
[tool.hatch.envs.default.scripts]
test = "pytest {args}"
CAVEATS
Relatively new; ecosystem still growing. Different workflow from pip/setuptools. Environment management differs from virtualenv. Some plugins may be needed.
HISTORY
Hatch was created by Ofek Lev as a modern replacement for traditional Python packaging tools. It follows current PEP standards and aims to simplify the Python project lifecycle.
