feat(create): machine-readable --json output and hidden --origin flag#1280
Draft
l2ysho wants to merge 1 commit into
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1238. Stacked on #1278 (base = the
1236wizard branch); rebase onto master after that merges.Makes
apify createmachine-readable for agents and the Console "Clone locally" handoff.What changed
--jsononapify createprints a contract on stdout:{ "dir", "actorJsonPath", "template", "source": "apify", "nextSteps": [] }info/warningoutput stays on stderr. On error: non-zero exit, message on stderr, no stdout.--origin console|cliflag (defaultcli) → recorded increatetelemetry for the funnel.buildNextSteps()extracted (shared by--jsonand the success message);templates lsshowsJavaScriptinstead of rawjavascript.Not in scope (deferred, per the epic)
--source/--git-repoand the git-connect flow → separate sub-issue. So the contract omitsremote/gitConnectUrland hardcodessource: "apify"(the only behavior today).--jsonwithout--templatein 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 sharedexecWithLog).Tests
12
createtests (incl.--jsoncontract shape + hidden--originacceptance) + 27 lib tests. build / lint / format clean; docs regenerated.🤖 Generated with Claude Code