From f329ce220ec22884dbb7aa47e640e2ed6bfacab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hanu=C5=A1?= Date: Thu, 9 Jul 2026 09:59:06 +0200 Subject: [PATCH] feat(push): print a next-step hint after a successful build `apify push` deploys but does not run. Today the success block ends with: Actor URL: https://console.apify.com/actors/ Build URL: https://console.apify.com/actors/#/builds/ Users (and agents driving the CLI) frequently read the URL as "job done" and stop there without ever invoking the Actor. That's fine when the intent was purely "build and hand off to Console", but it's the wrong default for a first-time deploy where the whole point is to confirm the Actor works end-to-end. Append a short next-steps block below the URLs, only on `buildStatus === SUCCEEDED`, pointing at the two commands the user almost certainly wants next: Next: run it once to verify the build. apify call / # blocks and prints run summary apify actors start / # non-blocking The block is suppressed on failed / aborted / timed-out builds (where it would be noise) and in `--json` mode (which keeps its existing machine-readable envelope). Surfaced during an evaluation of Apify surfaces for agent-driven Actor development. Co-Authored-By: Claude Opus 4.7 --- src/commands/actors/push.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/commands/actors/push.ts b/src/commands/actors/push.ts index 683462834..7ef1b10bf 100644 --- a/src/commands/actors/push.ts +++ b/src/commands/actors/push.ts @@ -549,6 +549,21 @@ Skipping push. Use --force to override.`, return; } + // After a successful build, guide the caller to the next step. `apify push` + // deploys but does not run — users (and agents driving the CLI) frequently + // read the Actor URL as "job done" and stop there without ever invoking + // the Actor. A short hint block removes that ambiguity. + const actorSlug = `${userInfo.username || userInfo.id}/${actorConfig!.name}`; + const nextStepsLines = + outcome.ok && buildStatus === ACTOR_JOB_STATUSES.SUCCEEDED + ? [ + '', + 'Next: run it once to verify the build.', + ` apify call ${actorSlug} # blocks and prints run summary`, + ` apify actors start ${actorSlug} # non-blocking`, + ] + : []; + const lines = [ `Apify push result: ${outcome.resultLabel}`, '', @@ -562,6 +577,7 @@ Skipping push. Use --force to override.`, `Actor URL: ${actorUrl}`, `Build URL: ${buildUrl}`, ...(outcome.errorMessage && logTail.length ? ['', 'Reason:', ...logTail] : []), + ...nextStepsLines, ]; simpleLog({ stdout: true, message: lines.join('\n') });