ahylianhuman
ahylianhuman3mo ago

Non-interactive `convex dev` not working

Is there a way to configure convex dev without a prompt? Using convex dev --configure new --project <app-name> --dev-deployment local still gives a prompt. This is very unexpected since all of the details needed to set up a local Convex instance is already provided, and the --help docs seem to imply that --configure is non-interactive when using additional flags ("... interactively or set by ...", emphasis mine).
9 Replies
Convex Bot
Convex Bot3mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
erquhart
erquhart2mo ago
If you add the --team <team-name> flag it runs non-interactively
ahylianhuman
ahylianhumanOP2mo ago
This does not work, I still get a prompt asking questions that are already answered by the CLI arguments.
erquhart
erquhart2mo ago
convex dev --configure new --project test --dev-deployment local --team erquhart
✔ Created project test-10362, manage it at https://dashboard.convex.dev/t/erquhart/test-10362
Your account now has 0 projects remaining.
You're trying out the beta local deployment feature!
To learn more, read the docs: https://docs.convex.dev/cli/local-deployments
To opt out at any time, run `npx convex disable-local-deployments`
✔ Downloaded Convex backend binary
✔ Started running a deployment locally at http://127.0.0.1:3210 and saved its:
name as CONVEX_DEPLOYMENT to .env.local
URL as CONVEX_URL to .env.local
Added ".env.local" to .gitignore

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or support@convex.dev
View the Convex dashboard at https://dashboard.convex.dev/d/local-erquhart-test_10362

✖ In order to push, add `convex` to your package.json dependencies.
convex dev --configure new --project test --dev-deployment local --team erquhart
✔ Created project test-10362, manage it at https://dashboard.convex.dev/t/erquhart/test-10362
Your account now has 0 projects remaining.
You're trying out the beta local deployment feature!
To learn more, read the docs: https://docs.convex.dev/cli/local-deployments
To opt out at any time, run `npx convex disable-local-deployments`
✔ Downloaded Convex backend binary
✔ Started running a deployment locally at http://127.0.0.1:3210 and saved its:
name as CONVEX_DEPLOYMENT to .env.local
URL as CONVEX_URL to .env.local
Added ".env.local" to .gitignore

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or support@convex.dev
View the Convex dashboard at https://dashboard.convex.dev/d/local-erquhart-test_10362

✖ In order to push, add `convex` to your package.json dependencies.
If you have Convex already installed:
❯ convex dev --configure new --project test --dev-deployment local --team erquhart
✔ Created project test-b98ab, manage it at https://dashboard.convex.dev/t/erquhart/test-b98ab
Your account now has 0 projects remaining.
You're trying out the beta local deployment feature!
To learn more, read the docs: https://docs.convex.dev/cli/local-deployments
To opt out at any time, run `npx convex disable-local-deployments`
✔ Started running a deployment locally at http://127.0.0.1:3210 and saved its:
name as CONVEX_DEPLOYMENT to .env.local
URL as CONVEX_URL to .env.local
Added ".env.local" to .gitignore

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or support@convex.dev
View the Convex dashboard at https://dashboard.convex.dev/d/local-erquhart-test_b98ab

10:42:30 Convex functions ready! (243ms)
❯ convex dev --configure new --project test --dev-deployment local --team erquhart
✔ Created project test-b98ab, manage it at https://dashboard.convex.dev/t/erquhart/test-b98ab
Your account now has 0 projects remaining.
You're trying out the beta local deployment feature!
To learn more, read the docs: https://docs.convex.dev/cli/local-deployments
To opt out at any time, run `npx convex disable-local-deployments`
✔ Started running a deployment locally at http://127.0.0.1:3210 and saved its:
name as CONVEX_DEPLOYMENT to .env.local
URL as CONVEX_URL to .env.local
Added ".env.local" to .gitignore

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or support@convex.dev
View the Convex dashboard at https://dashboard.convex.dev/d/local-erquhart-test_b98ab

10:42:30 Convex functions ready! (243ms)
no prompts
ahylianhuman
ahylianhumanOP2mo ago
Created project test-10362, manage it at https://dashboard.convex.dev/t/erquhart/test-10362
This seems like you've already logged into Convex, is that a prerequisite just to use local development non-interactively? When I run that exact command, I immediately get the prompt asking me if I want to start without an account or login, even though the CLI should already know the answer based on the options I pass in.
Convex Dashboard
Manage your Convex apps
erquhart
erquhart2mo ago
Ah yeah - if you're not authenticated it can't do anything, so interaction is required. But once you authenticate once on your system, you're good. Don't have to do it per project.
ahylianhuman
ahylianhumanOP2mo ago
But it shouldn't require authentication. If I select the local option, it runs fine, but there's no way to set that up non-interactively.
erquhart
erquhart2mo ago
Aaahh I see what you're saying - yeah, it would probably make sense for --dev-deployment local to have that effect
Barrel Of Lube
+ 1, is there any way to bypass inteaction for local deployments it works fine with cloud deployments if u add the deployment key

Did you find this page helpful?