Skip to content

Commit 8ca57c3

Browse files
author
LittleCoinCoin
committed
docs: fix critical CLI command inaccuracies across documentation
Comprehensive audit revealed multiple command inaccuracies requiring immediate correction: CLIReference.md fixes: - Add missing 'hatch package sync' command with complete documentation - Correct 'hatch mcp configure' argument specifications: * Fix --args to accept multiple values [ARGS ...] * Correct --headers format and mutual exclusivity with --url * Fix --env flag name and format (was --env-var) - Remove non-existent 'hatch mcp backup create' command - Fix 'hatch mcp list servers' to show correct --env flag (not --host/--detailed) GettingStarted.md fixes: - Replace non-existent 'hatch --version' with 'hatch --help' - Remove non-existent '--verbose' flag from 'hatch env list' direct_management_commands.md fixes: - Correct server_name argument format (remove angle brackets) - Add missing --env flag documentation for server removal All fixes verified through direct CLI testing. Prevents user confusion and command execution failures. Maintains consistency with actual implementation.
1 parent edcca56 commit 8ca57c3

File tree

3 files changed

+38
-27
lines changed

3 files changed

+38
-27
lines changed

docs/articles/users/CLIReference.md

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,29 @@ Syntax:
269269

270270
Output: each package row includes name, version, hatch compliance flag, source URI and installation location.
271271

272+
#### `hatch package sync`
273+
274+
Synchronize package MCP servers to host platforms.
275+
276+
Syntax:
277+
278+
`hatch package sync <package_name> --host <hosts> [--env ENV] [--dry-run] [--auto-approve] [--no-backup]`
279+
280+
| Argument / Flag | Type | Description | Default |
281+
|---:|---|---|---|
282+
| `package_name` | string (positional) | Name of package whose MCP servers to sync | n/a |
283+
| `--host` | string | Comma-separated list of host platforms or 'all' | n/a |
284+
| `--env`, `-e` | string | Environment name (defaults to current) | current environment |
285+
| `--dry-run` | flag | Preview changes without execution | false |
286+
| `--auto-approve` | flag | Skip confirmation prompts | false |
287+
| `--no-backup` | flag | Disable default backup behavior | false |
288+
289+
Examples:
290+
291+
`hatch package sync my-package --host claude-desktop`
292+
293+
`hatch package sync weather-server --host claude-desktop,cursor --dry-run`
294+
272295
---
273296

274297
## Environment Variables
@@ -315,17 +338,17 @@ Configure an MCP server on a specific host platform.
315338

316339
Syntax:
317340

318-
`hatch mcp configure <server-name> --host <host> [--command CMD] [--args ARGS] [--url URL] [--header HEADER] [--env-var VAR] [--dry-run] [--auto-approve] [--no-backup]`
341+
`hatch mcp configure <server-name> --host <host> (--command CMD | --url URL) [--args ARGS] [--env ENV] [--headers HEADERS] [--dry-run] [--auto-approve] [--no-backup]`
319342

320343
| Argument / Flag | Type | Description | Default |
321344
|---:|---|---|---|
322345
| `server-name` | string (positional) | Name of the MCP server to configure | n/a |
323346
| `--host` | string | Target host platform (claude-desktop, cursor, etc.) | n/a |
324-
| `--command` | string | Command to execute for local servers | none |
325-
| `--args` | string | Command arguments for local servers | none |
326-
| `--url` | string | URL for remote MCP servers | none |
327-
| `--header` | string | HTTP headers for remote servers (repeatable) | none |
328-
| `--env-var` | string | Environment variables (repeatable) | none |
347+
| `--command` | string | Command to execute for local servers (mutually exclusive with --url) | none |
348+
| `--url` | string | URL for remote MCP servers (mutually exclusive with --command) | none |
349+
| `--args` | multiple | Arguments for MCP server command (only with --command) | none |
350+
| `--env`, `-e` | string | Environment variables format: KEY=VALUE | none |
351+
| `--headers` | string | HTTP headers format: KEY=VALUE (only with --url) | none |
329352
| `--dry-run` | flag | Preview configuration without applying changes | false |
330353
| `--auto-approve` | flag | Skip confirmation prompts | false |
331354
| `--no-backup` | flag | Skip backup creation before configuration | false |
@@ -394,16 +417,15 @@ Syntax:
394417

395418
### `hatch mcp list servers`
396419

397-
List configured MCP servers on hosts.
420+
List configured MCP servers from environment.
398421

399422
Syntax:
400423

401-
`hatch mcp list servers [--host HOST] [--detailed]`
424+
`hatch mcp list servers [--env ENV]`
402425

403426
| Flag | Type | Description | Default |
404427
|---:|---|---|---|
405-
| `--host` | string | Specific host to list servers for | all hosts |
406-
| `--detailed` | flag | Show detailed server information | false |
428+
| `--env`, `-e` | string | Environment name (defaults to current) | current environment |
407429

408430
### `hatch mcp discover hosts`
409431

@@ -425,18 +447,6 @@ Syntax:
425447
|---:|---|---|---|
426448
| `--env` | string | Specific environment to discover servers in | current environment |
427449

428-
### `hatch mcp backup create`
429-
430-
Create backup of host configurations.
431-
432-
Syntax:
433-
434-
`hatch mcp backup create --host <hosts>`
435-
436-
| Flag | Type | Description | Default |
437-
|---:|---|---|---|
438-
| `--host` | string | Hosts to backup (comma-separated or 'all') | n/a |
439-
440450
### `hatch mcp backup list`
441451

442452
List available configuration backups.

docs/articles/users/GettingStarted.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ Now that you have Hatch installed and understand the basics:
254254

255255
**Diagnostics**: Use these commands to gather information when seeking help:
256256
```bash
257-
hatch --version
258-
hatch env list --verbose
257+
hatch --help
258+
hatch env list
259259
hatch package list
260260
python --version
261261
which conda || echo "conda not found"

docs/articles/users/MCP/direct_management_commands.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ Remove an MCP server from one or more hosts while preserving other servers:
1919

2020
```bash
2121
# Remove from single host
22-
hatch mcp remove server <server-name> --host <host-name>
22+
hatch mcp remove server <server_name> --host <host-name>
2323

2424
# Remove from multiple hosts
25-
hatch mcp remove server <server-name> --host <host1>,<host2>,<host3>
25+
hatch mcp remove server <server_name> --host <host1>,<host2>,<host3>
2626

2727
# Remove from all configured hosts
28-
hatch mcp remove server <server-name> --host all
28+
hatch mcp remove server <server_name> --host all
2929
```
3030

3131
### Examples
@@ -44,6 +44,7 @@ hatch mcp remove server old-server --host all
4444
### Options
4545

4646
- `--host <hosts>`: Comma-separated list of host names or 'all'
47+
- `--env <environment>`: Environment name for environment-based removal
4748
- `--no-backup`: Skip backup creation before removal
4849
- `--dry-run`: Preview changes without executing them
4950
- `--auto-approve`: Skip confirmation prompts

0 commit comments

Comments
 (0)