Skip to content

feat(create): machine-readable --json output and hidden --origin flag#1280

Draft
l2ysho wants to merge 1 commit into
1236-guided-apify-create-wizard-use-case-language-best-match-templatefrom
1238-apify-create-machine-readable-json-origin
Draft

feat(create): machine-readable --json output and hidden --origin flag#1280
l2ysho wants to merge 1 commit into
1236-guided-apify-create-wizard-use-case-language-best-match-templatefrom
1238-apify-create-machine-readable-json-origin

Conversation

@l2ysho

@l2ysho l2ysho commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Closes #1238. Stacked on #1278 (base = the 1236 wizard branch); rebase onto master after that merges.

Makes apify create machine-readable for agents and the Console "Clone locally" handoff.

What changed

  • --json on apify create prints a contract on stdout:
    { "dir", "actorJsonPath", "template", "source": "apify", "nextSteps": [] }
    All progress/info/warning output stays on stderr. On error: non-zero exit, message on stderr, no stdout.
  • Hidden --origin console|cli flag (default cli) → recorded in create telemetry for the funnel.
  • Small: buildNextSteps() extracted (shared by --json and the success message); templates ls shows JavaScript instead of raw javascript.

Not in scope (deferred, per the epic)

  • --source/--git-repo and the git-connect flow → separate sub-issue. So the contract omits remote/gitConnectUrl and hardcodes source: "apify" (the only behavior today).
  • --json without --template in a non-TTY still prompts (then fails); agents/Console always pass --template. Routing dependency-install output off stdout in JSON mode is a known robustness gap — left as follow-up (touches shared execWithLog).

Tests

12 create tests (incl. --json contract shape + hidden --origin acceptance) + 27 lib tests. build / lint / format clean; docs regenerated.

🤖 Generated with Claude Code

- Enable --json on `apify create`: prints { dir, actorJsonPath, template,
  source, nextSteps }. Progress/logs stay on stderr.
- Add hidden --origin console|cli flag for funnel telemetry (default cli).
- Extract buildNextSteps(), shared by the --json output and success message.
- templates ls: render the language label ("JavaScript") not the raw category.

Refs #1238

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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