Hatch Project Management

1.16.5 · active · verified Sun Apr 05

Hatch is a modern, extensible Python project manager that centralizes environment management, packaging with Hatchling, versioning, and publishing behind a single command-line interface. It is known for its ability to seamlessly manage multiple environments, handle dependencies, and dynamically download required Python distributions. Currently at version 1.16.5, Hatch maintains an active development and release cadence.

Warnings

Install

Quickstart

Hatch is primarily a CLI tool. This quickstart demonstrates creating a new project and running a simple command within its managed environment. The `hatch new` command scaffolds a new project with a `pyproject.toml` file, and `hatch run` executes commands within the project's isolated environment.

# Create a new Python project
hatch new "My Awesome Project"

# Navigate into the project directory
cd "my-awesome-project"

# Run a script (e.g., 'python -m my_awesome_project')
# This assumes a default `run` script is defined in pyproject.toml
hatch run python -c "print('Hello from Hatch!')"

# Or enter a shell environment
# hatch shell

view raw JSON →