npx convex dev
Develop against a dev deployment, watching for changes
- Configures a new or existing project (if needed)
- Updates generated types and pushes code to the configured dev deployment
- Runs the provided command (if
--startor--runis used) - Watches for file changes, and repeats step 2
Usage
npx convex dev [options]
Options
-v, --verboseShow full listing of changes
--typecheck <mode>Check TypeScript files with
tsc --noEmit.--typecheck-componentsCheck TypeScript files within component implementations with
tsc --noEmit.--codegen <mode>Regenerate code in
convex/_generated/--onceExecute only the first 3 steps, stop on any failure
--until-successExecute only the first 3 steps, on failure watch for local and remote changes and retry steps 2 and 3
--start <command>Start a long-running command alongside
npx convex dev, like a frontend dev server. The command inherits stdin/stdout so you can interact with it directly. Example: npx convex dev --start 'vite --open'--run <functionName>The identifier of the function to run in step 3, like
api.init.createDataormyDir/myFile:myFunction--run-component <functionName>If --run is used and the function is in a component, the path to the component (e.g. "workflow" or "workflow/workpool"). Components are a beta feature. This flag is unstable and may change in subsequent releases.
--tail-logs [mode]Choose whether to tail Convex function logs in this terminal:
alwaysshows logs continuouslypause-on-deploy(the default) pauses logs during deploys so you can spot sync issuesdisablehides logs while developing.
--configure [choice]Ignore existing configuration and configure new or existing project, interactively or set by --team <team_slug>, --project <project_slug>, and --dev-deployment local|cloud
--env-file <envFile>Path to a custom file of environment variables, for choosing the deployment, e.g. CONVEX_DEPLOYMENT or CONVEX_SELF_HOSTED_URL. Same format as .env.local or .env files, and overrides them.