Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Convex CLI

$ convex Official Med Risk
Convex · Database & Data · Apache-2.0 · macos / linux / windows

Convex CLI drives local and production workflows for Convex's reactive TypeScript database/backend. Supports convex dev --once for single-shot Agent codegen/typecheck loops, convex deploy --dry-run, convex data, and convex run.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
npm install convex
CLI vs MCP Decision Hybrid (CLI + MCP)

npx convex dev --once and convex deploy --dry-run are indispensable in coding loops for TypeScript typecheck/codegen; Convex MCP assists with live table/log inspection.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

dev --once, --typecheck enable, deploy --dry-run, and JSON arguments in convex run fit coding-agent loops well.

  • Supports dev --once, deploy --dry-run, and CONVEX_DEPLOY_KEY
Trust & Safety 21 / 25

Separates dev and --prod deployments explicitly and supports deploy --dry-run pre-flight validation.

  • --dry-run preview on deploy and explicit --prod targeting
Setup & Portability 14 / 15

Bundled directly with the convex npm package (npx convex) across macOS, Linux, and Windows.

  • Zero extra install beyond project convex npm dependency
Utility & Efficiency 14 / 15

Handles schema sync, TypeScript codegen (convex/_generated), env vars, and function execution in one CLI.

  • Single tool manages schema push, codegen, data inspection, and deployments
Maintenance & Lineage 7 / 10

Maintained officially by Convex (get-convex/convex-backend) with active releases.

  • Official convex npm package and get-convex/convex-backend
Docs & Verifiability 7 / 10

Clear CLI reference at docs.convex.dev/cli covering dev, deploy, and env workflows.

  • Official CLI documentation at docs.convex.dev/cli

Security, Auth & Guardrails

Auth Modes
OAuth Browser Env API Key Config File
Credential Storage

Deploy keys passed via CONVEX_DEPLOY_KEY env var; local dev auth stored in ~/.convex/config.json and .env.local.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

CLI (convex npm package) is Apache-2.0 open-source; Convex Cloud has a free tier and Pro plans.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Convex CLI Agent Rules
- Always pass `--once` to `npx convex dev` so it exits instead of blocking in watch mode.
- Run `npx convex deploy --dry-run` before any production deployment.
- Never pass `--prod` to `convex run` or `convex env set` without explicit user approval.

Agent-Ready Command Recipes

Safe Read-Only Queries

Validate schema and regenerate types once
npx convex dev --once --typecheck enable

Pushes to dev deployment, runs TypeScript checks, and exits cleanly without staying in watch mode.

Preview a production deploy with --dry-run
npx convex deploy --dry-run

Checks TypeScript compilation and prints the deployment profile without applying cloud changes.

Controlled Writes & Previews

Execute a named Convex query or mutation
npx convex run tasks:list '{"limit": 10}'

Runs a single backend function with JSON arguments and exits.

Strengths for Agents

  • + npx convex dev --once lets agents validate schemas and regenerate TypeScript types without hanging in a file watcher.
  • + npx convex deploy --dry-run verifies production builds safely before release.
  • + Clean separation between dev deployments and --prod flags.

Caveats & Pitfalls

  • ! Running npx convex dev without --once starts a persistent watch loop that will block agents.
  • ! First-time project initialization prompts interactively unless .env.local or CONVEX_DEPLOY_KEY is configured.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI