Hatch
A modern, extensible Python project manager.
Installation
Section titled “Installation”# using pipx (recommended)pipx install hatch
# using pippip install hatchFeatures
Section titled “Features”Python versions
Section titled “Python versions”Installing and managing Python itself.
# install Python versionshatch python install
# install a specific versionhatch python install 3.10
# view available Python versionshatch python show
# find an installed Python versionhatch python find
# remove a Python versionhatch python remove
# update Python versionshatch python updateProjects
Section titled “Projects”Creating and working on Python projects.
# create a new projecthatch new my-project
# initialize an existing projecthatch new --init
# build the projecthatch build
# publish the projecthatch publish
# view or set the project versionhatch version
# manage configurationhatch configEnvironments
Section titled “Environments”Managing project environments.
# create environmentshatch env create
# show available environmentshatch env show
# find environment locationhatch env find
# remove environmentshatch env remove
# prune all environmentshatch env prune
# run a command in an environmenthatch env run python --version
# enter an environment shellhatch shellScripts & Commands
Section titled “Scripts & Commands”Executing commands and scripts.
# run a command in the default environmenthatch run python script.py
# run a command in a specific environmenthatch run test:pytest
# run a script with specific dependencies (inline metadata)hatch run script.pyTesting & Quality
Section titled “Testing & Quality”Built-in support for testing and formatting.
# run testshatch test
# run tests with coveragehatch test --cover
# format and lint codehatch fmt
# check formatting onlyhatch fmt --check