Skip to content

Commit ac326e0

Browse files
author
LittleCoinCoin
committed
docs: add --version flag documentation and installation verification
Update documentation to include the new --version flag: - CLI Reference: Add --version to global options table with usage example - Getting Started: Update Step 3 verification to use 'hatch --version' first - Installation Tutorial: Add version check to installation verification steps - README: Add version check after installation instructions The --version flag provides a quick way to verify successful installation and check the installed Hatch version. Related to: feature/hatch-version-command
1 parent d1a0e2d commit ac326e0

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ cd Hatch
2525
pip install -e .
2626
```
2727

28+
Verify installation:
29+
30+
```bash
31+
hatch --version
32+
```
33+
2834
### Create a package template
2935

3036
```bash

docs/articles/users/CLIReference.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,18 @@ These flags are accepted by the top-level parser and apply to all commands unles
3030

3131
| Flag | Type | Description | Default |
3232
|------|------|-------------|---------|
33+
| `--version` | flag | Show program version and exit | n/a |
3334
| `--envs-dir` | path | Directory to store environments | `~/.hatch/envs` |
3435
| `--cache-ttl` | int | Cache time-to-live in seconds | `86400` (1 day) |
3536
| `--cache-dir` | path | Directory to store cached packages | `~/.hatch/cache` |
3637

38+
Example:
39+
40+
```bash
41+
hatch --version
42+
# Output: hatch 0.6.1
43+
```
44+
3745
## Commands
3846

3947
Each top-level command has its own table. Use the Syntax line before the table to see how to call it.

docs/articles/users/GettingStarted.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,14 @@ pip install -e .
105105
Test that Hatch is working:
106106

107107
```bash
108-
hatch --help
108+
hatch --version
109109
```
110110

111-
You should see available commands.
111+
You should see the installed version (e.g., `hatch 0.6.1`). You can also view available commands:
112+
113+
```bash
114+
hatch --help
115+
```
112116

113117
## First Steps
114118

docs/articles/users/tutorials/01-getting-started/01-installation.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ This article covers the installation of Hatch, a package manager for Model Conte
2828
pip install -e .
2929
```
3030

31-
3. Verify the installation by checking the available commands:
31+
3. Verify the installation by checking the version:
32+
33+
```bash
34+
hatch --version
35+
```
36+
37+
You should see output like `hatch 0.6.1`. You can also view available commands:
3238

3339
```bash
3440
hatch --help

0 commit comments

Comments
 (0)