Skip to content

feat(cli): print next steps after projects create in agent mode - #7875

Open
myerekapan wants to merge 6 commits into
developfrom
mertyerekapan/growth-709-projects-create-next-steps
Open

myerekapan wants to merge 6 commits into
developfrom
mertyerekapan/growth-709-projects-create-next-steps

Conversation

@myerekapan

@myerekapan myerekapan commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

supabase projects create now prints a short next-steps block when a coding agent is driving the CLI: the project's API URL, the command that fetches its API keys, and the command that deploys a function. Runs by a person at a terminal are unchanged.

Changed:

  • Agent mode only: the block is gated on the existing agent detection (--agent yes, or a detected coding agent). --agent no prints nothing.
  • stdout stays clean: in text mode and with -o json|yaml|toml|env the block goes to stderr, through the helper the stack nudges already use (I moved it to its own file). With --output-format json it goes to stderr, and with stream-json it is a log event before the result event, which stays the last event.
  • bootstrap unchanged: I emit the block from the shared create core, behind an option that only projects create turns on.

Note: the commands in the block use --remote=<ref>, since --project-ref is deprecated.

Linear

  • fixes GROWTH-709

@myerekapan myerekapan self-assigned this Nov 30, 2026
@myerekapan

Copy link
Copy Markdown
Contributor Author

Manual check, from source against a local stub of the Management API:

  • projects create <name> --org-id <org> --db-password <pw> --region us-east-1 --yes --agent yes: next-steps block on stderr, stdout is the JSON result only.
  • Same with --agent no: no block.
  • Same with -o json, -o yaml, -o toml, -o env: stdout is byte-identical between --agent yes and --agent no; the block is on stderr.
  • Same with --output-format stream-json: the block is a log event after the result event.

@myerekapan
myerekapan marked this pull request as ready for review December 2, 2026 10:04
@myerekapan
myerekapan requested a review from a team as a code owner December 2, 2026 10:04
@myerekapan
myerekapan requested a review from avallete December 2, 2026 10:04
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

CLI benchmark (Lightweight Commands): no changes found

Commit 2a7673b against develop at 00782d7 · 10 runs each · report only, never blocks merging

Command Workload Before After Change
supabase --version version 258 ms 254 ms no real change
supabase --help help 250 ms 278 ms no real change (+11%, within normal variation)
supabase init init 237 ms 236 ms no real change
supabase migration new bench migration-new 230 ms 237 ms no real change
supabase config convert config-convert 241 ms 267 ms no real change (+11%, within normal variation)
supabase config validate config-validate 261 ms 247 ms no real change (-5%, within normal variation)
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 303 ms 295 ms no real change
supabase projects list projects-list 425 ms 381 ms no real change (-10%, within normal variation)
supabase functions list --project-ref replayfixtureprojref functions-list 416 ms 374 ms no real change (-10%, within normal variation)

API calls: unchanged for all 9 commands.

Binary size: 135.7 MB, up 4.0 KB from 135.7 MB.

Details: timing ranges, API calls per command, slowest phases

Timing ranges

Command Workload Before range After range Change Verdict
supabase --version version 216-299 ms 212-328 ms -4 ms (-2%) within noise
supabase --help help 229-376 ms 230-354 ms +27 ms (+11%) within noise
supabase init init 221-458 ms 217-509 ms -1 ms (0%) within noise
supabase migration new bench migration-new 199-265 ms 208-307 ms +7 ms (+3%) within noise
supabase config convert config-convert 204-301 ms 198-391 ms +26 ms (+11%) within noise
supabase config validate config-validate 236-376 ms 225-284 ms -13 ms (-5%) within noise
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 248-394 ms 253-362 ms -9 ms (-3%) within noise
supabase projects list projects-list 254-638 ms 351-761 ms -44 ms (-10%) within noise
supabase functions list --project-ref replayfixtureprojref functions-list 310-531 ms 323-456 ms -42 ms (-10%) within noise

API calls per command

Command Workload Before After Endpoint changes
supabase --version version 0 0
supabase --help help 0 0
supabase init init 0 0
supabase migration new bench migration-new 0 0
supabase config convert config-convert 0 0
supabase config validate config-validate 0 0
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 2 2
supabase projects list projects-list 1 1
supabase functions list --project-ref replayfixtureprojref functions-list 2 2

Slowest phases

No command moved beyond noise, so there are no phase deltas.

Workflow run

Comment /bench to run the lightweight benchmark (this comment) again on the latest commit, or /bench full to also run the integration-heavy benchmark, which posts in its own comment.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 AI Review

CLI reference prose guidance: snapshot supabase/supabase@8028b57 supplied to reviewers (advisory, not a style pass).

Confirmed three distinct test-coverage gaps in the new agent-only projects create hint. Source inspection found no production defect, overlay drift, or conflict with pending work on next. The diff changes runtime output and contains no CLI reference prose in scope for style review. Workspace dependencies were absent, so the verdicts are based on source inspection.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/projects/create/create.integration.test.ts:186 test-coverage codex The deployment hint test would pass if the displayed command omitted --remote or pointed to a different project.
🟡 MINOR apps/cli/src/commands/projects/create/create.integration.test.ts:200 test-coverage codex The explicit --agent no test would pass if the handler returned successfully without creating a project.
⚪ NIT apps/cli/src/commands/projects/create/create.integration.test.ts:179 test-coverage claude The integration suite does not verify that --output-format stream-json emits the agent hint as a log event after the project creation result event.

Stats

Claude findings: 1 · Codex findings: 2 · Confirmed: 3 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.2-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

@Coly010 Coly010 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting changes for the stream-json ordering. The rest is smaller stuff.

  1. In --output-format stream-json the hint comes out as a log event after the result event. start shows its nudge before output.success, so its result stays the last event. Anything reading the stream that way (tail -n1 | jq .data, or stopping at result) will either break or miss the hint here, and agents are the ones most likely to read it like that. The core sends the result itself, so maybe the simplest fix is to emit the hint inside projectCreateCore just before the result, behind an option that bootstrap leaves off? Open to other ways of doing it though.
  2. Smaller one: emitNudge is now exported from stack-nudge.ts, but this isn't really a stack nudge. Might be worth moving the helper somewhere neutral and importing it from both places.
  3. +1 to the bot's test comments. A stream-json test that checks result is the last event would also have caught 1.

Non-blocking, feel free to disagree with either:

  • Unless I'm mistaken, the project is still COMING_UP when this prints, and an agent will run the next command straight away. I haven't checked whether functions deploy fails on a project that's still starting up, but a line saying it's still provisioning might save the agent a confusing first failure.
  • I wonder if these should eventually go in the structured result as well, something like next_steps: [{ description, command }], the way errors carry suggestion. Not for this PR, just something to think about.

Otherwise looks good to me!

This branch has not been deployed

No deployments
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