feat: CLI consistency pass — unified args, verbs, and status
#1 Positional dest unified to `name` across info + dev verbs (was `project`). #2 install/uninstall help now states the activate semantics (tool→PATH, service/job→systemd, frontend→served) rather than 'to PATH'. #4 `service status` (a plural op) moved to `services status`; the singular `service` group is enable/disable only. #5 `list --behavior` now filters the program *catalog* by its real behavior field. behavior (what a program is) and service/job (how it's deployed) are separate axes: `list` shows a Programs catalog plus Services/Jobs deployment views; a behavior filter scopes the catalog only. #6 `list` uses lifecycle.is_active uniformly for the status dot (tool on PATH / service running / job timer / static frontend served) instead of registry presence. #7 New `castle restart <name>` — restart a service (unit) or job (timer). #8 New `castle status` — unified services + jobs + programs activation view. #9 New `castle format [name]` dev verb (ruff format / pnpm format); wired into stacks DEV_ACTIONS + handlers. #10 New `castle up` — deploy + start everything in one shot. Docs: CLAUDE.md command reference refreshed. Tests updated to the two-axis list model (+ a daemon-behavior program fixture). core 92 · cli 24 · api 52 green; ruff clean.
This commit is contained in:
14
CLAUDE.md
14
CLAUDE.md
@@ -73,21 +73,23 @@ The CLI lives in `cli/` and is installed via `uv tool install --editable cli/`.
|
||||
|
||||
```bash
|
||||
castle list # List all programs, services, and jobs
|
||||
castle list --behavior daemon # Filter by behavior
|
||||
castle list --behavior daemon # Filter the program catalog by behavior
|
||||
castle list --stack python-cli # Filter by stack
|
||||
castle info <name> # Show details (--json for machine-readable)
|
||||
castle status # Unified status (services + jobs + programs)
|
||||
castle create <name> [--stack ...] # Scaffold new project (--stack optional → bare program)
|
||||
castle add <path|git-url> [--name ...] # Adopt an EXISTING repo as a program (detects verbs)
|
||||
castle clone [name] # Clone source for programs that declare repo:
|
||||
castle deploy [name] # Deploy to runtime (registry + systemd + Caddyfile)
|
||||
castle build|test|lint|type-check|check [project] # Dev verbs (one or all)
|
||||
castle install|uninstall [program] # Install/remove a program on PATH
|
||||
castle up # Deploy + start everything (one-shot bring-up)
|
||||
castle build|test|lint|format|type-check|check [name] # Dev verbs (one program or all)
|
||||
castle install|uninstall [name] # Activate/deactivate (tool→PATH, service→systemd, frontend→served)
|
||||
castle run <name> # Run a program (declared run) or service in foreground
|
||||
castle restart <name> # Restart a service or job
|
||||
castle logs <name> [-f] [-n 50] # View service/job logs
|
||||
castle gateway start|stop|reload|status # Manage Caddy reverse proxy
|
||||
castle service enable|disable <name> # Manage individual systemd service
|
||||
castle service status # Show all service statuses
|
||||
castle services start|stop # Start/stop everything
|
||||
castle service enable|disable <name> # Manage an individual systemd service
|
||||
castle services start|stop|status # Start/stop/inspect all services together
|
||||
```
|
||||
|
||||
**Dev verbs** resolve per-program: a declared `commands:` entry (or `build:`)
|
||||
|
||||
Reference in New Issue
Block a user