Skip to content

feat(deploy): show resource name and id in deploy output#1254

Open
MichaelHogers wants to merge 10 commits intomainfrom
feat/deploy-show-resource-details
Open

feat(deploy): show resource name and id in deploy output#1254
MichaelHogers wants to merge 10 commits intomainfrom
feat/deploy-show-resource-details

Conversation

@MichaelHogers
Copy link
Contributor

@MichaelHogers MichaelHogers commented Mar 10, 2026

Summary

  • Adds a --verbose (-v) flag to deploy that includes the resource name and physical ID (UUID) for each created or updated resource
  • --verbose implies --output, so no need to pass both

Default output

npx checkly deploy

Successfully deployed project "my-project" to account "My Account".

With --verbose

npx checkly deploy --verbose

Create:
    ApiCheck: homepage-check
      name: Homepage Check
      id: 7ea2b661-88fa-4658-9d5c-c8c8c10057a1

Update and Unchanged:
    BrowserCheck: login-flow
      name: Login Flow Check
      id: a3f1b2c4-55de-4a89-b012-1234abcd5678

Example usage

The ID lets you reference deployed resources programmatically. For example, a CI script that triggers a check run right after deploy:

DEPLOY_OUTPUT=$(npx checkly deploy --verbose 2>&1)
CHECK_ID=$(echo "$DEPLOY_OUTPUT" | grep -A2 "ApiCheck: homepage-check" | grep "id:" | awk '{print $2}')

# Trigger the check via API
curl -X POST "https://api.checklyhq.com/v1/checks/$CHECK_ID/trigger" \
  -H "Authorization: Bearer $CHECKLY_API_KEY"

Or an AI agent parsing deploy output to verify newly deployed checks are green.

Motivation

The deploy API response already contains physicalId (UUID) for each resource, but the CLI discarded it. Surfacing it behind --verbose makes deployed resources easier to identify and reference programmatically (e.g. by CI scripts or AI agents that need to act on specific checks after deploy).

Test plan

  • Deploy with --verbose — verify name + id appear for created/updated resources
  • Deploy without --verbose — output unchanged
  • Deploy with --output only — name/id not shown (only diff summary)
  • Preview mode (--preview) — verify name shown (no physicalId since it's a dry run)

When using the -o flag, the deploy output now includes the resource
name and physical ID (UUID) for each created or updated resource.
This makes it easier to identify deployed resources programmatically.
@MichaelHogers MichaelHogers requested a review from sorccu March 10, 2026 15:35
Gate the resource name and physicalId lines behind the --output flag
so --preview output remains unchanged.
Use per-resource toContain blocks that verify name: lines while
tolerating dynamic id: lines with UUIDs.
Verify the full output structure including name and id lines,
using a UUID pattern for dynamic physical IDs.
@sorccu
Copy link
Member

sorccu commented Mar 11, 2026

Since the new format is an extension of the current format, I feel like it would be appropriate to simply call it verbose mode and change the flag to -v | --verbose. Would that still achieve your goal?

Keep -o/--output unchanged (no breaking change) and add -v/--verbose
as an opt-in flag to show resource names and physical IDs.
Using -v alone now shows deploy output with resource details,
no need to also pass -o.
@MichaelHogers
Copy link
Contributor Author

@sorccu what about this latest version

@MichaelHogers
Copy link
Contributor Author

@sorccu i've been thinking, can we always return the id, instead of only in verbose mode? i think it is always useful to know the id?

@sorccu
Copy link
Member

sorccu commented Mar 11, 2026

Can you update the description to include an example of how the ID would be used?

Also, possibly premature if we change the PR again, but the description now refers to flags that no longer exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants