Files
langgraph/libs/cli/langgraph_cli
Hugo DURAND c696d4e79f feat(cli): add --json to deploy list (#9395)
This PR adds a `--json` flag to the `langgraph deploy list` CLI command.
It solves the issue of CI/CD pipelines having to parse complex ASCII
tables by providing a structured JSON output (e.g., `[{"id": "...",
"name": "..."}]`) to check for existing deployments. It also fixes a
limitation where the CLI previously only fetched the first 20
deployments by implementing proper pagination.

## Changes

* **Added `--json` flag:** Outputs a clean, allow-listed JSON array of
deployments.
* **Stripped secrets:** Explicitly excludes environment variables from
the JSON output to prevent leaking secrets in CI logs.
* **Full pagination:** Updates the backend to fetch all limit/offset
pages, ensuring all deployments (not just the first 20) are retrieved.
* **Cleaned standard output:** Moved beta warnings to `stderr` and
disabled interactive prompts when using `--json` to guarantee valid JSON
on `stdout`.
* **Centralized formatting:** Refactored three separate table rendering
functions into a single shared `Table` and `JsonOutput` logic.

## Test

* **Automated checks:** Passed `make format`, `make lint`, and `make
test` (580 tests total).
* **New unit tests:** Added extensive testing for JSON shape, secret
omission, empty lists, missing IDs, stderr routing, and multi-page
retrieval logic.
* **Manual verification:** Tested against a local mock control plane
with 101 deployments, verifying that `jq` can successfully parse the
output and check for specific deployment names.

Release Note: Added `--json` flag to `langgraph deploy list` to support
scriptable, structured deployment lookups in CI/CD environments.
2026-10-26 09:45:57 -04:00
..
2026-10-23 14:18:08 +00:00
2025-05-09 13:14:45 -07:00
2026-04-22 11:29:23 -07:00
2026-04-22 11:29:23 -07:00
2024-06-24 18:14:56 -04:00
2024-06-20 17:08:35 -04:00
2026-03-13 16:07:27 -04:00
2024-06-24 18:14:56 -04:00