You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat(create): machine-readable --json output and hidden --origin flag (#1280)
Closes#1238. Stacked on #1278 — rebase onto master after that merges.
Makes `apify create` machine-readable for agents and the Console "Clone
locally" handoff.
## What changed
- **`--json` is strictly non-interactive.** A missing name or
`--template` fails before `mkdir`, naming the flag to pass. Gated on the
flag rather than `isTTY`, so it errors deterministically instead of
hanging on a prompt under a pty.
- **Hidden `--origin console|cli`** (default `cli`) → recorded in
`create` telemetry for the funnel.
- **stdout hygiene.** `apify create --json | jq` used to fail on any
call that didn't pass both `--skip-git-init` and
`--skip-dependency-install` — i.e. the bare call agents and Console
actually make. Two causes:
- child processes inherited our stdout, putting `git init` and the whole
installer transcript ahead of the payload. `keepStdoutClean()` routes
child stdout to stderr, latched by the command framework for every
command with `enableJsonFlag`.
- `@inquirer/core` writes to `process.stdout` unless handed a context.
All five prompt wrappers now render on stderr — correct independent of
`--json`.
- **`--template` accepts the manifest `id` as well as `name`.** 19 of 43
templates have `id !== name`, and the `--json` payload reports `id`, so
the value the contract emitted was rejected on round-trip. The `--help`
example was broken for the same reason.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Edyta <142720610+szaganek@users.noreply.github.com>
Copy file name to clipboardExpand all lines: skills/apify/SKILL.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ See https://apify.com/auth.md for how to authenticate. Do not assume `APIFY_TOKE
29
29
## Structured output
30
30
31
31
-`--json` is supported on most list/info commands (`apify actors ls --json`, `apify actors info <id> --json`, `apify datasets info <id> --json`, `apify runs ls --json`, etc.). Use it and parse with `jq`; don't scrape the human table.
32
+
-`apify create <name> --template <template> --json` prints `{ dir, actorJsonPath, template, source, nextSteps, postCreate, gitRepositoryInitialized }` on stdout. Everything else goes to stderr, so stdout is safe to pipe into `jq`. `postCreate` is non-null when the template needs extra setup before `apify run` works.
32
33
- List commands paginate — control with `--limit` / `--offset` (and `--desc`).
0 commit comments