Skip to content

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

Open
MichaelHogers wants to merge 1 commit intomainfrom
feat/deploy-show-resource-details
Open

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

Conversation

@MichaelHogers
Copy link
Copy Markdown
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
  • Without --verbose, deploy output is completely unchanged

Default output

npx checkly deploy

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

With --output

npx checkly deploy --output

Create:
    ApiCheck: homepage-check

Update and Unchanged:
    BrowserCheck: login-flow

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

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

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).

Chose to gate this behind --verbose rather than showing it by default because some users may have 1000+ checks — adding two extra lines per resource to every deploy would produce a wall of output and could cause issues in CI logs and terminal buffers.

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 (unchanged behavior)
  • Preview mode (--preview) — verify name shown (no physicalId since it's a dry run)

@MichaelHogers MichaelHogers requested a review from sorccu March 10, 2026 15:35
@sorccu
Copy link
Copy Markdown
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?

@MichaelHogers
Copy link
Copy Markdown
Contributor Author

@sorccu what about this latest version

@MichaelHogers
Copy link
Copy Markdown
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
Copy Markdown
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.

@MichaelHogers MichaelHogers force-pushed the feat/deploy-show-resource-details branch from 7b045a4 to 2568c0e Compare March 31, 2026 07:31
@MichaelHogers
Copy link
Copy Markdown
Contributor Author

@sorccu Rebased on main, squashed to a single commit, and updated the description with before/after examples. Ready for review when you get a chance.

@MichaelHogers MichaelHogers force-pushed the feat/deploy-show-resource-details branch 5 times, most recently from b3b170b to be43c4a Compare March 31, 2026 07:57
thebiglabasky
thebiglabasky previously approved these changes Mar 31, 2026
Copy link
Copy Markdown
Contributor

@thebiglabasky thebiglabasky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit

Add a -v/--verbose flag to `deploy` that shows the resource name and
physical ID (UUID) for each created or updated resource. The --verbose
flag implies --output, so both flags don't need to be passed together.

Without --verbose, deploy output is unchanged.
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.

3 participants