hatch - Man Page
hatch – Modern, extensible Python project management
Examples (TL;DR)
- Create a new Hatch project:
hatch new project_name
- Initialize Hatch for an existing project:
hatch new --init
- Build a Hatch project:
hatch build
- Remove build artifacts:
hatch clean
- Create a default environment with dependencies defined in the
pyproject.toml
file:hatch env create
- Show environment dependencies as a table:
hatch dep show table
Synopsis
hatch [Options] COMMAND [ARGS]...
Options
- -e, --env TEXT
The name of the environment to use [env var: HATCH_ENV]
- -p, --project TEXT
The name of the project to work on [env var: HATCH_PROJECT]
- -v, --verbose
Increase verbosity (can be used additively) [env var: HATCH_VERBOSE]
- -q, --quiet
Decrease verbosity (can be used additively) [env var: HATCH_QUIET]
- --color / --no-color
Whether or not to display colored output (default is auto-detection) [env vars: FORCE_COLOR/NO_COLOR]
- --interactive / --no-interactive
Whether or not to allow features like prompts and progress bars (default is auto-detection) [env var: HATCH_INTERACTIVE]
- --data-dir TEXT
The path to a custom directory used to persist data [env var: HATCH_DATA_DIR]
- --cache-dir TEXT
The path to a custom directory used to cache data [env var: HATCH_CACHE_DIR]
- --config TEXT
The path to a custom config file to use [env var: HATCH_CONFIG]
- --version
Show the version and exit.
- -h, --help
Show a help message and exit.
Commands
- build
Build a project
See hatch-build(1).
- clean
Remove build artifacts
See hatch-clean(1).
- config
Manage the config file
See hatch-config(1).
- dep
Manage environment dependencies
See hatch-dep(1).
- env
Manage project environments
See hatch-env(1).
- fmt
Lint and format source code
See hatch-fmt(1).
- new
Create or initialize a project
See hatch-new(1).
- project
View project information
See hatch-project(1).
- publish
Publish build artifacts
See hatch-publish(1).
- python
Manage Python installations
See hatch-python(1).
- run
Run commands within project environments
See hatch-run(1).
- self
Manage Hatch
See hatch-self(1).
- shell
Enter a shell within a project’s environment
See hatch-shell(1).
- status
Show information about the current environment
See hatch-status(1).
- test
Run tests
See hatch-test(1).
- version
View or set a project’s version
See hatch-version(1).
Environment
- HATCH_ENV
- HATCH_PROJECT
- HATCH_VERBOSE
- HATCH_QUIET
- FORCE_COLOR
Display colored output (default is auto-detection) [option: --color]
- NO_COLOR
Do not display colored output (default is auto-detection) [option: --no-color]
- HATCH_INTERACTIVE
Whether or not to allow features like prompts and progress bars (default is auto-detection) [options: --interactive/--no-interactive]
- HATCH_DATA_DIR
The path to a custom directory used to persist data [option: --data-dir]
- HATCH_CACHE_DIR
The path to a custom directory used to acahe data [option: --cache-dir]
- HATCH_CONFIG
The path to a custom custom config file to use [option: --config]
See Also
hatch-build(1), hatch-clean(1), hatch-config(1), hatch-dep(1), hatch-env(1), hatch-fmt(1), hatch-new(1), hatch-project(1), hatch-publish(1), hatch-python(1), hatch-run(1), hatch-self(1), hatch-shell(1), hatch-status(1), hatch-test(1), hatch-version(1)
Referenced By
hatch-build(1), hatch-clean(1), hatch-config(1), hatch-config-explore(1), hatch-config-find(1), hatch-config-restore(1), hatch-config-set(1), hatch-config-show(1), hatch-config-update(1), hatch-dep(1), hatch-dep-hash(1), hatch-dep-show(1), hatch-dep-show-requirements(1), hatch-dep-show-table(1), hatch-env(1), hatch-env-create(1), hatch-env-find(1), hatch-env-prune(1), hatch-env-remove(1), hatch-env-run(1), hatch-env-show(1), hatch-fmt(1), hatchling(1), hatch-new(1), hatch-project(1), hatch-project-metadata(1), hatch-publish(1), hatch-python(1), hatch-python-find(1), hatch-python-install(1), hatch-python-remove(1), hatch-python-show(1), hatch-python-update(1), hatch-run(1), hatch-shell(1), hatch-status(1), hatch-version(1).