Skip to content

Commit ff15134

Browse files
docs: feat: add deployments show subcommand (#134)
## Summary This work relates to PR #125 ## Motivation <!-- Why is this change needed? Link to an issue if applicable. --> Closes #<!-- issue number --> ## Changes <!-- Bullet list of the key changes. Focus on *what* changed, not *how*. --> - ## Test strategy <!-- How did you verify this works? Check all that apply. --> - [ ] Added/updated unit tests - [ ] Manual CLI testing (`poly <command>`) - [ ] Tested against a live Agent Studio project - [x] N/A (docs, config, or trivial change) ## Checklist - [ ] `ruff check .` and `ruff format --check .` pass - [ ] `pytest` passes - [x] No breaking changes to the `poly` CLI interface (or migration path documented) - [ ] Commit messages follow [conventional commits](https://www.conventionalcommits.org/) ## Screenshots / Logs <!-- Optional: paste terminal output, screenshots, or before/after diffs if helpful. --> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 7b837cb commit ff15134

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/docs/reference/cli.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,14 @@ Examples:
455455
poly deployments list
456456
poly deployments list --env live
457457
poly deployments list --details
458+
poly deployments show abc123def
459+
poly deployments show abc123def --env live
458460
~~~
459461

462+
#### `poly deployments list`
463+
464+
List deployments for the project.
465+
460466
| Flag | Description |
461467
|---|---|
462468
| `--env` | Environment to list deployments for. Choices: `sandbox`, `pre-release`, `live`. Defaults to `sandbox`. |
@@ -547,6 +553,7 @@ poly init --region us-1 --account_id 123 --project_id my_project --json
547553
poly project create --region us-1 --account_id my-account --name my-project --json
548554
poly chat --json -m 'Hello'
549555
poly chat --json --input-file ./script.txt
556+
poly deployments show abc123def --json
550557
poly deployments list --json
551558
poly deployments promote --from <id> --to pre-release --force --json
552559
poly deployments rollback --to <id> --force --json
@@ -588,13 +595,21 @@ The exact fields vary by command. Common fields include:
588595
| `poly init --json` | `success`, `root_path` |
589596
| `poly project create --json` | `success`, `root_path` (via init); on error: `success`, `error` |
590597
| `poly chat --json` | `conversations` (array); optional `push` (when `--push` is used) |
598+
| `poly deployments show --json` | `success`, `deployment`, `active_deployment_hashes`, `included_deployments`, `is_rollback` |
591599
| `poly deployments promote --json` | `success`, `from_hash`, `to_env`, `message`, `included_deployments`; `dry_run` when `--dry-run` is used |
592600
| `poly deployments rollback --json` | `success`, `target_hash`, `message`, `reverted_deployments`; `dry_run` when `--dry-run` is used |
593601

594602
For `poly branch delete --json`, when a branch that was the current branch is deleted, the response also includes `"switched_to": "main"`.
595603

596604
For `poly branch merge --json`, a successful merge returns `{ "success": true }`. When conflicts or errors are present, the response includes `"conflicts"` and `"errors"` arrays containing the raw conflict and error objects from the platform.
597605

606+
For `poly deployments show --json`, the response includes:
607+
608+
- `deployment` — the full deployment record for the requested version hash.
609+
- `active_deployment_hashes` — a map of environment names to the currently active version hash in each environment.
610+
- `included_deployments` — the list of sandbox deployments included since the predecessor version in the queried environment.
611+
- `is_rollback``true` if the deployment is a rollback to an older version.
612+
598613
Error responses always include `{ "success": false, "error": "...", "traceback": "..." }`.
599614

600615
!!! info "`init` with `--json` requires explicit flags"

0 commit comments

Comments
 (0)