Is there a way to run `npx convex
Is there a way to run
npx convex deploy
but for dev? I want to sync my local code (schema) with my Convex dev env, and then run some npx convex run xyz
which deplends on the schema change.
Alternatively can I somehow run convex dev
but exit once the schemas have been synced? Eg. since convex dev is kept alive, it won't work for scripting.
1. CLI: Sync schema.ts
2. CLI: Run function which depends on the new schema
3. Exit6 Replies
Oh, I think I know!
npx convex run --push
🤘@Indy @ian FYI The changes in https://news.convex.dev/announcing-convex-1-4/ are not reflected in the main docs https://docs.convex.dev/cli#run-convex-functions
Convex News
Announcing Convex 1.4
Convex 1.4 introduces a new option to install packages used in your Node action environment on the server, a variety of logging improvements, a new option to pause deployments, a new npm create convex command and more!
External packages in Node.js
Before 1.4, several NPM dependencies were
CLI | Convex Developer Hub
The Convex command-line interface (CLI) is your interface for managing Convex

I think
npx convex dev --once
/ npx convex dev --once --run xyz
might also workFixing the docs, thanks!
That's great! Got it working now 🙏
npx convex run
used to sync by default, now you need to pass --push
. Thanks for pointing out the docs discrpency 🙏