Skip to content

hatchhatch

Usage:使用法:

hatch [OPTIONS] COMMAND [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--env, -e--env, -e textテキスト The name of the environment to use [env var: HATCH_ENV]使用する環境の名前 [環境変数: HATCH_ENV] defaultdefault
--project, -p--project, -p textテキスト The name of the project to work on [env var: HATCH_PROJECT]作業するプロジェクトの名前 [環境変数: HATCH_PROJECT] Sentinel.UNSETSentinel.UNSET
--verbose, -v--verbose, -v integer range (0 and above)整数範囲 (0 以上) Increase verbosity (can be used additively) [env var: HATCH_VERBOSE]冗長性を増加させる(加算的に使用可能) [環境変数: HATCH_VERBOSE] 0
--quiet, -q--quiet, -q integer range (0 and above)整数範囲 (0 以上) Decrease verbosity (can be used additively) [env var: HATCH_QUIET]冗長性を減少させる(加算的に使用可能) [環境変数: HATCH_QUIET] 0
--color / --no-color--color / --no-color booleanブール値 Whether or not to display colored output (default is auto-detection) [env vars: FORCE_COLOR/NO_COLOR]カラー出力を表示するかどうか(デフォルトは自動検出) [環境変数: FORCE_COLOR/NO_COLOR] Noneなし
--interactive / --no-interactive--interactive / --no-interactive booleanブール値 Whether or not to allow features like prompts and progress bars (default is auto-detection) [env var: HATCH_INTERACTIVE]プロンプトやプログレスバーのような機能を許可するかどうか(デフォルトは自動検出) [env var: HATCH_INTERACTIVE] Noneなし
--data-dir--data-dir textテキスト The path to a custom directory used to persist data [env var: HATCH_DATA_DIR]データを永続化するために使用されるカスタムディレクトリへのパス [env var: HATCH_DATA_DIR] Sentinel.UNSETSentinel.UNSET
--cache-dir--cache-dir textテキスト The path to a custom directory used to cache data [env var: HATCH_CACHE_DIR]データをキャッシュするために使用されるカスタムディレクトリへのパス [env var: HATCH_CACHE_DIR] Sentinel.UNSETSentinel.UNSET
--config--config textテキスト The path to a custom config file to use [env var: HATCH_CONFIG]使用するカスタム設定ファイルへのパス [環境変数: HATCH_CONFIG] Sentinel.UNSETSentinel.UNSET
--version--version booleanブール値 Show the version and exit.バージョンを表示して終了します。 FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch buildhatch build

Build a project.プロジェクトをビルドします。

Usage:使用法:

hatch build [OPTIONS] [LOCATION]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--target, -t--target, -t textテキスト The target to build, overriding project defaults. This may be selected multiple times e.g. -t sdist -t wheelビルドするターゲットで、プロジェクトのデフォルトを上書きします。これは複数回選択できます。例: -t sdist -t wheel Sentinel.UNSETSentinel.UNSET
--hooks-only--hooks-only booleanブール値 Whether or not to only execute build hooks [env var: HATCH_BUILD_HOOKS_ONLY]ビルドフックのみを実行するかどうか [環境変数: HATCH_BUILD_HOOKS_ONLY] FalseFalse
--no-hooks--no-hooks booleanブール値 Whether or not to disable build hooks [env var: HATCH_BUILD_NO_HOOKS]ビルドフックを無効にするかどうか [env var: HATCH_BUILD_NO_HOOKS] FalseFalse
--ext--ext booleanブール値 Whether or not to only execute build hooks for distributing binary Python packages, such as compiling extensions. Equivalent to --hooks-only -t wheelバイナリPythonパッケージを配布するためのビルドフックのみを実行するかどうか、例えば拡張機能のコンパイル。--hooks-only -t wheelと同等。 FalseFalse
--clean, -c--clean, -c booleanブール値 Whether or not existing artifacts should first be removed [env var: HATCH_BUILD_CLEAN]既存のアーティファクトを最初に削除するかどうか [env var: HATCH_BUILD_CLEAN] FalseFalse
--clean-hooks-after--clean-hooks-after booleanブール値 Whether or not build hook artifacts should be removed after each build [env var: HATCH_BUILD_CLEAN_HOOKS_AFTER]ビルドフックアーティファクトを各ビルド後に削除するかどうか [env var: HATCH_BUILD_CLEAN_HOOKS_AFTER] FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch cleanhatch clean

Remove build artifacts.ビルドアーティファクトを削除します。

Usage:使用法:

hatch clean [OPTIONS] [LOCATION]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--target, -t--target, -t textテキスト The target with which to remove artifacts, overriding project defaults. This may be selected multiple times e.g. -t sdist -t wheelアーティファクトを削除する対象で、プロジェクトのデフォルトを上書きします。例えば、-t sdist -t wheelのように複数回選択できます。 Sentinel.UNSETSentinel.UNSET
--hooks-only--hooks-only booleanブール値 Whether or not to only remove artifacts from build hooks [env var: HATCH_BUILD_HOOKS_ONLY]ビルドフックからのみアーティファクトを削除するかどうか [環境変数: HATCH_BUILD_HOOKS_ONLY] FalseFalse
--no-hooks--no-hooks booleanブール値 Whether or not to ignore artifacts from build hooks [env var: HATCH_BUILD_NO_HOOKS]ビルドフックからのアーティファクトを無視するかどうか [環境変数: HATCH_BUILD_NO_HOOKS] FalseFalse
--ext--ext booleanブール値 Whether or not to only remove artifacts from build hooks for distributing binary Python packages, such as compiled extensions. Equivalent to --hooks-only -t wheelバイナリPythonパッケージ(コンパイルされた拡張機能など)を配布するために、ビルドフックからアーティファクトをのみ削除するかどうか。--hooks-only -t wheelに相当します。 FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch confighatch config

Manage the config file設定ファイルを管理します

Usage:使用法:

hatch config [OPTIONS] COMMAND [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch config explorehatch config explore

Open the config location in your file manager.ファイルマネージャーで設定場所を開きます。

Usage:使用法:

hatch config explore [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch config findhatch config find

Show the location of the config file.設定ファイルの場所を表示します。

Usage:使用法:

hatch config find [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch config restorehatch config restore

Restore the config file to default settings.設定ファイルをデフォルト設定に復元します。

Usage:使用法:

hatch config restore [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch config sethatch config set

Assign values to config file entries. If the value is omitted, you will be prompted, with the input hidden if it is sensitive.設定ファイルのエントリに値を割り当てます。値が省略されると、入力が機密情報である場合は隠されてプロンプトが表示されます。

Usage:使用法:

hatch config set [OPTIONS] KEY [VALUE]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch config showhatch config show

Show the contents of the config file.設定ファイルの内容を表示します。

Usage:使用法:

hatch config show [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--all, -a--all, -a booleanブール値 Do not scrub secret fields秘密フィールドをスクラブしない FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch config updatehatch config update

Update the config file with any new fields.新しいフィールドで設定ファイルを更新します。

Usage:使用法:

hatch config update [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch dephatch dep

Manage environment dependencies環境依存関係を管理します。

Usage:使用法:

hatch dep [OPTIONS] COMMAND [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch dep hashhatch dep hash

Output a hash of the currently defined dependencies.現在定義されている依存関係のハッシュを出力します。

Usage:使用法:

hatch dep hash [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--project-only, -p--project-only, -p booleanブール値 Whether or not to exclude environment dependencies環境依存関係を除外するかどうか FalseFalse
--env-only, -e--env-only, -e booleanブール値 Whether or not to exclude project dependenciesプロジェクトの依存関係を除外するかどうか FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch dep showhatch dep show

Display dependencies in various formatsさまざまな形式で依存関係を表示します

Usage:使用法:

hatch dep show [OPTIONS] COMMAND [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch dep show requirementshatch dep show requirements

Enumerate dependencies as a list of requirements.依存関係を要件のリストとして列挙します。

Usage:使用法:

hatch dep show requirements [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--project-only, -p--project-only, -p booleanブール値 Whether or not to exclude environment dependencies環境依存関係を除外するかどうか FalseFalse
--env-only, -e--env-only, -e booleanブール値 Whether or not to exclude project dependenciesプロジェクトの依存関係を除外するかどうか FalseFalse
--feature, -f--feature, -f textテキスト Whether or not to only show the dependencies of the specified features指定された機能の依存関係のみを表示するかどうか Sentinel.UNSETSentinel.UNSET
--all--all booleanブール値 Whether or not to include the dependencies of all featuresすべての機能の依存関係を含めるかどうか FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch dep show tablehatch dep show table

Enumerate dependencies in a tabular format.依存関係を表形式で列挙します。

Usage:使用法:

hatch dep show table [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--project-only, -p--project-only, -p booleanブール値 Whether or not to exclude environment dependencies環境依存関係を除外するかどうか FalseFalse
--env-only, -e--env-only, -e booleanブール値 Whether or not to exclude project dependenciesプロジェクトの依存関係を除外するかどうか FalseFalse
--lines, -l--lines, -l booleanブール値 Whether or not to show lines between table rowsテーブル行の間に行を表示するかどうか FalseFalse
--ascii--ascii booleanブール値 Whether or not to only use ASCII charactersASCII文字のみを使用するかどうか FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch envhatch env

Manage project environmentsプロジェクト環境を管理します

Usage:使用法:

hatch env [OPTIONS] COMMAND [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch env createhatch env create

Create environments.環境を作成します。

Usage:使用法:

hatch env create [OPTIONS] [ENV_NAME]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch env findhatch env find

Locate environments.環境を見つけます。

Usage:使用法:

hatch env find [OPTIONS] [ENV_NAME]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch env prunehatch env prune

Remove all environments.すべての環境を削除します。

Usage:使用法:

hatch env prune [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch env removehatch env remove

Remove environments.環境を削除します。

Usage:使用法:

hatch env remove [OPTIONS] [ENV_NAME]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch env runhatch env run

Run commands within project environments.プロジェクト環境内でコマンドを実行します。

The -e/--env option overrides the equivalent root option and the HATCH_ENV environment variable.この -e/--env オプションは、同等の root option および HATCH_ENV 環境変数を上書きします。

The -i/--include and -x/--exclude options may be used to include or exclude certain variables, optionally followed by specific comma-separated values, and may be selected multiple times. For example, if you have the following configuration:この -i/--include および -x/--exclude オプションは、特定の変数を含めたり除外したりするために使用でき、オプションで特定のカンマ区切りの値を続けることができ、複数回選択することができます。例えば、次の構成がある場合:

[[tool.hatch.envs.test.matrix]]
python = ["3.9", "3.10"]
version = ["42", "3.14", "9000"]
[[envs.test.matrix]]
python = ["3.9", "3.10"]
version = ["42", "3.14", "9000"]

then running:次に実行すると:

hatch env run -i py=3.10 -x version=9000 test:pytest

would execute pytest in the environments test.py3.10-42 and test.py3.10-3.14. Note that py may be used as an alias for python.pytest が環境 test.py3.10-42 および test.py3.10-3.14 で実行されます。なお、pypython のエイリアスとして使用できます。

Note注意

The inclusion option is treated as an intersection while the exclusion option is treated as a union i.e. an environment must match all of the included variables to be selected while matching any of the excluded variables will prevent selection.含めるオプションは交差として扱われ、除外オプションは和集合として扱われます。つまり、環境は選択されるためにすべての含まれる変数に一致する必要があり、除外される変数のいずれかに一致すると選択が妨げられます。

Usage:使用法:

hatch env run [OPTIONS] ARGS...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--env, -e--env, -e textテキスト The environments to targetターゲットとする環境 Sentinel.UNSETSentinel.UNSET
--include, -i--include, -i textテキスト The matrix variables to include含めるマトリックス変数 Sentinel.UNSETSentinel.UNSET
--exclude, -x--exclude, -x textテキスト The matrix variables to exclude除外するマトリックス変数 Sentinel.UNSETSentinel.UNSET
--filter, -f--filter, -f textテキスト The JSON data used to select environments環境を選択するために使用されるJSONデータ Noneなし
--force-continue--force-continue booleanブール値 Run every command and if there were any errors exit with the first codeすべてのコマンドを実行し、エラーがあった場合は最初のコードで終了する FalseFalse
--ignore-compat--ignore-compat booleanブール値 Ignore incompatibility when selecting specific environments特定の環境を選択する際に互換性を無視する FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了する。 FalseFalse

hatch env showhatch env show

Show the available environments.利用可能な環境を表示します。

Usage:使用法:

hatch env show [OPTIONS] [ENVS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--ascii--ascii booleanブール値 Whether or not to only use ASCII charactersASCII文字のみを使用するかどうか FalseFalse
--json--json booleanブール値 Whether or not to output in JSON formatJSON形式で出力するかどうか FalseFalse
--internal, -i--internal, -i booleanブール値 Show internal environments内部環境を表示 FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch fmthatch fmt

Format and lint source code.ソースコードをフォーマットし、リンティングします。

Usage:使用法:

hatch fmt [OPTIONS] [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--check--check booleanブール値 Only check for errors rather than fixing themエラーを修正するのではなく、エラーをチェックするだけ FalseFalse
--linter, -l--linter, -l booleanブール値 Only run the linterリンターを実行するだけ FalseFalse
--formatter, -f--formatter, -f booleanブール値 Only run the formatterフォーマッターを実行するだけ FalseFalse
--sync--sync booleanブール値 Sync the default config file with the current version of Hatchデフォルトの設定ファイルを現在のHatchのバージョンと同期します FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch newhatch new

Create or initialize a project.プロジェクトを作成または初期化します。

Usage:使用法:

hatch new [OPTIONS] [NAME] [LOCATION]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--interactive, -i--interactive, -i booleanブール値 Interactively choose details about the projectプロジェクトの詳細を対話的に選択する FalseFalse
--cli--cli booleanブール値 Give the project a command line interfaceプロジェクトにコマンドラインインターフェースを与える FalseFalse
--init--init booleanブール値 Initialize an existing project既存のプロジェクトを初期化する FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch projecthatch project

View project informationプロジェクト情報を表示

Usage:使用法:

hatch project [OPTIONS] COMMAND [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch project metadatahatch project metadata

Display project metadata.プロジェクトメタデータを表示します。

If you want to view the raw readme file without rendering, you can use a JSON parser like jq:レンダリングせずに生のreadmeファイルを表示したい場合は、jqのようなJSONパーサーを使用できます:

hatch project metadata | jq -r .readme

Usage:使用法:

hatch project metadata [OPTIONS] [FIELD]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch publishhatch publish

Publish build artifacts.ビルドアーティファクトを公開します。

Usage:使用法:

hatch publish [OPTIONS] [ARTIFACTS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--repo, -r--repo, -r textテキスト The repository with which to publish artifacts [env var: HATCH_INDEX_REPO]アーティファクトを公開するリポジトリ [環境変数: HATCH_INDEX_REPO] Sentinel.UNSETSentinel.UNSET
--user, -u--user, -u textテキスト The user with which to authenticate [env var: HATCH_INDEX_USER]認証に使用するユーザー [環境変数: HATCH_INDEX_USER] Sentinel.UNSETSentinel.UNSET
--auth, -a--auth, -a textテキスト The credentials to use for authentication [env var: HATCH_INDEX_AUTH]認証に使用する資格情報 [env var: HATCH_INDEX_AUTH] Sentinel.UNSETSentinel.UNSET
--ca-cert--ca-cert textテキスト The path to a CA bundle [env var: HATCH_INDEX_CA_CERT]CAバンドルへのパス [env var: HATCH_INDEX_CA_CERT] Sentinel.UNSETSentinel.UNSET
--client-cert--client-cert textテキスト The path to a client certificate, optionally containing the private key [env var: HATCH_INDEX_CLIENT_CERT]クライアント証明書へのパス、オプションで秘密鍵を含む [env var: HATCH_INDEX_CLIENT_CERT] Sentinel.UNSETSentinel.UNSET
--client-key--client-key textテキスト The path to the client certificate's private key [env var: HATCH_INDEX_CLIENT_KEY]クライアント証明書の秘密鍵へのパス [環境変数: HATCH_INDEX_CLIENT_KEY] Sentinel.UNSETSentinel.UNSET
--no-prompt, -n--no-prompt, -n booleanブール値 Disable prompts, such as for missing required fields必須フィールドが欠けている場合などのプロンプトを無効にします FalseFalse
--initialize-auth--initialize-auth booleanブール値 Save first-time authentication information even if nothing was published何も公開されていなくても初回認証情報を保存します FalseFalse
--publisher, -p--publisher, -p textテキスト The publisher plugin to use (default is index) [env var: HATCH_PUBLISHER]使用するパブリッシャープラグイン(デフォルトは index) [環境変数: HATCH_PUBLISHER] indexindex
--option, -o--option, -o textテキスト Options to pass to the publisher plugin. This may be selected multiple times e.g. -o foo=bar -o baz=23 [env var: HATCH_PUBLISHER_OPTIONS]パブリッシャープラグインに渡すオプション。これは複数回選択できます。例: -o foo=bar -o baz=23 [環境変数: HATCH_PUBLISHER_OPTIONS] Sentinel.UNSETSentinel.UNSET
--yes, -y--yes, -y booleanブール値 Confirm without prompting when the plugin is disabledプラグインが無効のときに確認なしで実行 FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch pythonhatch python

Manage Python installationsPythonインストールの管理

Usage:使用法:

hatch python [OPTIONS] COMMAND [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch python findhatch python find

Locate Python binaries.Pythonバイナリを見つけます。

Usage:使用法:

hatch python find [OPTIONS] NAME

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
-p, --parent-p, --parent booleanブール値 Show the parent directory of the Python binaryPythonバイナリの親ディレクトリを表示します。 FalseFalse
--dir, -d--dir, -d textテキスト The directory in which distributions reside配布物が存在するディレクトリ Sentinel.UNSETSentinel.UNSET
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch python installhatch python install

Install Python distributions.Pythonの配布物をインストールします。

You may select all to install all compatible distributions:allを選択して、すべての互換性のある配布物をインストールできます:

hatch python install all

You can set custom sources for distributions by setting the HATCH_PYTHON_SOURCE_<NAME> environment variable where <NAME> is the uppercased version of the distribution name with periods replaced by underscores e.g. HATCH_PYTHON_SOURCE_PYPY3_10.配布物のカスタムソースを設定するには、HATCH_PYTHON_SOURCE_<NAME> 環境変数を設定します。ここで、<NAME> は配布物名の大文字バージョンで、ピリオドをアンダースコアに置き換えたものです。例えば、HATCH_PYTHON_SOURCE_PYPY3_10のようになります。

Usage:使用法:

hatch python install [OPTIONS] NAMES...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--private--private booleanブール値 Do not add distributions to the user PATHユーザーのPATHにディストリビューションを追加しない FalseFalse
--update, -u--update, -u booleanブール値 Update existing installations既存のインストールを更新する FalseFalse
--dir, -d--dir, -d textテキスト The directory in which to install distributions, overriding configurationディストリビューションをインストールするディレクトリ、設定を上書きします Sentinel.UNSETSentinel.UNSET
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch python removehatch python remove

Remove Python distributions.Pythonディストリビューションを削除します。

You may select all to remove all installed distributions:インストールされているすべてのディストリビューションを削除するにはallを選択できます:

hatch python remove all

Usage:使用法:

hatch python remove [OPTIONS] NAMES...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--dir, -d--dir, -d textテキスト The directory in which distributions resideディストリビューションが存在するディレクトリ Sentinel.UNSETSentinel.UNSET
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch python showhatch python show

Show the available Python distributions.利用可能なPythonディストリビューションを表示します。

Usage:使用法:

hatch python show [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--ascii--ascii booleanブール値 Whether or not to only use ASCII charactersASCII文字のみを使用するかどうか FalseFalse
--dir, -d--dir, -d textテキスト The directory in which distributions resideディストリビューションが存在するディレクトリ Sentinel.UNSETSentinel.UNSET
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch python updatehatch python update

Update Python distributions.Pythonディストリビューションを更新します。

You may select all to update all installed distributions:allを選択して、インストールされているすべてのディストリビューションを更新できます:

hatch python update all

Usage:使用法:

hatch python update [OPTIONS] NAMES...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--dir, -d--dir, -d textテキスト The directory in which distributions resideディストリビューションが存在するディレクトリ Sentinel.UNSETSentinel.UNSET
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch runhatch run

Run commands within project environments. This is a convenience wrapper around the env run command.プロジェクト環境内でコマンドを実行します。これは、env run コマンドの便利なラッパーです。

If the first argument contains a colon, then the preceding component will be interpreted as the name of the environment to target, overriding the -e/--env root option and the HATCH_ENV environment variable.最初の引数にコロンが含まれている場合、前のコンポーネントはターゲットとする環境の名前として解釈され、-e/--env ルートオプションおよびHATCH_ENV環境変数を上書きします。

If the environment provides matrices, then you may also provide leading arguments starting with a + or - to select or exclude certain variables, optionally followed by specific comma-separated values. For example, if you have the following configuration:環境がマトリックスを提供する場合、特定の変数を選択または除外するために、+または-で始まる先行引数を提供することもできます。オプションで、特定のカンマ区切りの値を続けることができます。たとえば、次の構成がある場合:

[[tool.hatch.envs.test.matrix]]
python = ["3.9", "3.10"]
version = ["42", "3.14", "9000"]
[[envs.test.matrix]]
python = ["3.9", "3.10"]
version = ["42", "3.14", "9000"]

then running:次のように実行すると:

hatch run +py=3.10 -version=9000 test:pytest

would execute pytest in the environments test.py3.10-42 and test.py3.10-3.14. Note that py may be used as an alias for python.pytestが環境test.py3.10-42およびtest.py3.10-3.14で実行されます。pypythonのエイリアスとして使用できます。

Note注意

Inclusions are treated as an intersection while exclusions are treated as a union i.e. an environment must match all of the included variables to be selected while matching any of the excluded variables will prevent selection.インクルージョンは交差として扱われ、エクスクルージョンは和集合として扱われます。つまり、環境は選択されるためにすべての含まれた変数に一致する必要がありますが、除外された変数のいずれかに一致すると選択が防止されます。

Usage:使用法:

hatch run [OPTIONS] [ENV:]ARGS...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch selfhatch self

Manage HatchHatchを管理する

Usage:使用法:

hatch self [OPTIONS] COMMAND [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch self reporthatch self report

Generate a pre-populated GitHub issue.事前に入力されたGitHubの問題を生成します。

Usage:使用法:

hatch self report [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--no-open, -n--no-open, -n booleanブール値 Show the URL instead of opening itURLを開くのではなく表示します FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch self restorehatch self restore

Restore the installationインストールを復元する

Usage:使用法:

hatch self restore [OPTIONS] [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch self updatehatch self update

Install the latest version最新バージョンをインストール

Usage:使用法:

hatch self update [OPTIONS] [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch shellhatch shell

Enter a shell within a project's environment.プロジェクトの環境内でシェルに入ります。

Usage:使用法:

hatch shell [OPTIONS] [ENV_NAME]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--name--name textテキスト N/A該当なし Sentinel.UNSETSentinel.UNSET
--path--path textテキスト N/A該当なし Sentinel.UNSETSentinel.UNSET
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch statusハッチステータス

Show information about the current environment.現在の環境に関する情報を表示します。

Usage:使用法:

hatch status [OPTIONS]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch testhatch test

Run tests using the hatch-test environment matrix.hatch-test環境マトリックスを使用してテストを実行します。

If no filtering options are selected, then tests will be run in the first compatible environment found in the matrix with priority given to those matching the current interpreter.フィルタリングオプションが選択されていない場合、テストはマトリックス内で見つかった最初の互換性のある環境で実行され、現在のインタープリターに一致するものに優先順位が与えられます。

The -i/--include and -x/--exclude options may be used to include or exclude certain variables, optionally followed by specific comma-separated values, and may be selected multiple times. For example, if you have the following configuration:-i/--includeおよび-x/--excludeオプションを使用して、特定の変数を含めたり除外したりすることができ、オプションで特定のカンマ区切りの値を続けることができ、複数回選択することができます。たとえば、次の構成がある場合:

[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.9", "3.10"]
version = ["42", "3.14", "9000"]
[[envs.hatch-test.matrix]]
python = ["3.9", "3.10"]
version = ["42", "3.14", "9000"]

then running:その後、実行します:

hatch test -i py=3.10 -x version=9000

would run tests in the environments hatch-test.py3.10-42 and hatch-test.py3.10-3.14.環境 hatch-test.py3.10-42hatch-test.py3.10-3.14 でテストを実行します。

The -py/--python option is a shortcut for specifying the inclusion -i py=....-py/--python オプションは、-i py=... の指定を簡略化するショートカットです。

Note注意

The inclusion option is treated as an intersection while the exclusion option is treated as a union i.e. an environment must match all of the included variables to be selected while matching any of the excluded variables will prevent selection.インクルージョンオプションは交差として扱われ、エクスクルージョンオプションは和集合として扱われます。つまり、環境は選択されるためにすべてのインクルードされた変数に一致する必要がありますが、エクスクルードされた変数のいずれかに一致すると選択が妨げられます。

Usage:使用法:

hatch test [OPTIONS] [ARGS]...

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--randomize, -r--randomize, -r booleanブール値 Randomize the order of test executionテスト実行の順序をランダム化します FalseFalse
--parallel, -p--parallel, -p booleanブール値 Parallelize test executionテスト実行の並列化 FalseFalse
--retries--retries integer整数 Number of times to retry failed tests失敗したテストを再試行する回数 Sentinel.UNSETSentinel.UNSET
--retry-delay--retry-delay floatfloat Seconds to wait between retries再試行の間に待機する秒数 Sentinel.UNSETSentinel.UNSET
--cover, -c--cover, -c booleanブール値 Measure code coverageコードカバレッジを測定する FalseFalse
--cover-quiet--cover-quiet booleanブール値 Disable coverage reporting after tests, implicitly enabling --coverテスト後のカバレッジレポートを無効にし、暗黙的に --cover を有効にします FalseFalse
--all, -a--all, -a booleanブール値 Test all environments in the matrixマトリックス内のすべての環境をテストする FalseFalse
--python, -py--python, -py textテキスト The Python versions to test, equivalent to: -i py=...テストするPythonのバージョン、相当するもの: -i py=... Sentinel.UNSETSentinel.UNSET
--include, -i--include, -i textテキスト The matrix variables to include含めるマトリックス変数 Sentinel.UNSETSentinel.UNSET
--exclude, -x--exclude, -x textテキスト The matrix variables to exclude除外するマトリックス変数 Sentinel.UNSETSentinel.UNSET
--show, -s--show, -s booleanブール値 Show information about environments in the matrixマトリックス内の環境に関する情報を表示します FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse

hatch versionhatch version

View or set a project's version.プロジェクトのバージョンを表示または設定します。

Usage:使用法:

hatch version [OPTIONS] [DESIRED_VERSION]

Options:オプション:

Name名前 Type Description説明 Defaultデフォルト
--force, -f--force, -f booleanブール値 Allow an explicit downgrading version to be given明示的なダウングレードバージョンを指定できるようにします FalseFalse
--help--help booleanブール値 Show this message and exit.このメッセージを表示して終了します。 FalseFalse