agents
auth
Run command
Run a command as part of deploying with the deployment URL as an env var.
--component flag
Path to the component to target a mounted component.
components
npx convex data
List tables and print data from your database.
npx convex deploy
Deploy to a production or preview deployment.
npx convex dev
Develop against a dev deployment, watching for changes.
npx convex dev
Develop against a dev deployment, watching for changes.
npx convex docs
Opens the Convex docs in the browser.
Convex Documentation
npx convex env
Set and view environment variables.
npx convex export
Export data from your deployment to a ZIP file.
npx convex import
Import data from a file to your deployment.
npx convex logs
Watch logs from your deployment.
npx convex run
Run a function or evaluate an inline readonly query on your deployment.
dash alias
The dashboard command can be invoked via the alias dash.
npx convex dashboard
Opens the Convex dashboard in the browser.
--deployment option
Open the dashboard for a specific deployment by name, reference, dev, prod, or local.
--no-open option
Don't automatically open the dashboard in the default browser.
--prod option
Open the dashboard for this project's default production deployment.
database
deployment create
Create a new dev or prod deployment for a project, optionally selecting it.
--deployment flag
Run the function on a specific deployment.
--deployment option
Exports data from a specific deployment, accepting names, references, or dev/prod/local.
deployment select
Select the deployment used by all npx convex commands except npx convex deploy.
Deployment selection
Select dev, prod, local, or a specific deployment.
Deployment Targeting
Import into dev, prod, local, or a specific deployment via --deployment.
deployment token
Create and delete deploy keys that scope commands to a target deployment.
deployment usage
Show current usage for each metric, optionally as JSON.
deployment usage-limits
List and configure deployment usage limits.
Dry run
Print out the generated configuration without deploying.
npx convex env default
Manage project-level default environment variables.
Env file
Path to a custom file of environment variables for choosing the deployment.
npx convex env get
Print a variable's value.
npx convex env list
List all variables and values, or only names with --names-only.
npx convex env remove
Unset a variable; aliases rm and unset.
npx convex env set
Set environment variables on your deployment, interactively or from a .env file.
npx convex export
Exports data, and optionally file storage, from a Convex deployment to a ZIP file.
file-storage
Format output
Print data as jsonArray, jsonLines, or pretty.
Format Support
Supports csv, jsonLines, jsonArray, and zip import formats.
functions
Import from Snapshot
Import data from a snapshot zip file into a Convex deployment.
Import Modes
Supports --replace, --append, and --replace-all import modes.
--include-file-storage
Includes stored files in a storage folder within the ZIP file.
JSON arguments
Arguments are specified as a JSON object.
List documents
List documents in a specified table.
List tables
List tables in a deployment's database.
Deployment selection
Watch logs from a specific deployment by name or reference.
Log history
Show n most recent logs; defaults to showing all available logs.
JSONL output
Output raw log events as JSONL.
Production logs
Watch logs from this project's default production deployment.
Success log lines
Print a log line for every successful function execution.
Deployment message
Optional message to attach to this deployment in the audit log.
--no-open option
Print docs URL instead of opening it in your browser.
--once
Execute only the first 3 steps, stop on any failure.
--path option
Exports data into a ZIP file at the given path, which may be a directory or unoccupied .zip path.
Preview deployments
Deploy to a preview deployment named by Git branch or flags.
--prod flag
Run the function on the project's default production deployment.
--prod option
Exports data from this project's default production deployment.
--push flag
Push code to deployment before running the function.
realtime
--run-component
If --run is used and the function is in a component, the path to the component.
--run
The identifier of the function to run in step 3, like api.init.createData.
scheduling
search
--start
Start a long-running command alongside npx convex dev, like a frontend dev server.
Table Import
Import a single table from a JSON file using the --table option.
--tail-logs
Choose whether to tail Convex function logs in this terminal.
testing
understanding
--until-success
Execute only the first 3 steps, on failure watch for local and remote changes and retry steps 2 and 3.