帮助你快速创建或接入 Convex,并完成前端初始化与首次本地运行。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "convex-quickstart" 技能: 1. 下载 https://raw.githubusercontent.com/openclaw/clawhub/main/.agents/skills/convex-quickstart/SKILL.md 2. 保存为 ~/.claude/skills/convex-quickstart/SKILL.md 3. 装好后重载技能,告诉我可以用了
帮我从零开始创建一个 Convex 项目,使用 npm create convex@latest,并告诉我每一步需要做什么,包括安装、初始化和启动开发环境。
一份从创建到启动的分步指南,包含命令行命令和关键说明。
我已经有一个 React 前端项目,请指导我接入 Convex,包括安装依赖、配置客户端、设置环境变量,并完成首次连接测试。
适用于现有项目的接入步骤,附带示例代码和环境变量配置说明。
请告诉我如何完成第一次 npx convex dev 运行,说明运行前的准备、执行命令后会发生什么,以及常见报错如何排查。
一份首次运行说明,涵盖准备条件、执行流程和常见问题排查建议。
Set up a working Convex project as fast as possible.
convex/ exists - just start
buildingconvex-setup-auth skillnpm create convex@latestconvex and wire up the providernpx convex dev to connect a deployment and start the dev loopUse the official scaffolding tool. It creates a complete project with the frontend framework, Convex backend, and all config wired together.
| Template | Stack |
|---|---|
react-vite-shadcn | React + Vite + Tailwind + shadcn/ui |
nextjs-shadcn | Next.js App Router + Tailwind + shadcn/ui |
react-vite-clerk-shadcn | React + Vite + Clerk auth + shadcn/ui |
nextjs-clerk | Next.js + Clerk auth |
nextjs-convexauth-shadcn | Next.js + Convex Auth + shadcn/ui |
nextjs-lucia-shadcn | Next.js + Lucia auth + shadcn/ui |
bare | Convex backend only, no frontend |
If the user has not specified a preference, default to react-vite-shadcn for
simple apps or nextjs-shadcn for apps that need SSR or API routes.
You can also use any GitHub repo as a template:
npm create convex@latest my-app -- -t owner/repo
npm create convex@latest my-app -- -t owner/repo#branch
Always pass the project name and template flag to avoid interactive prompts:
npm create convex@latest my-app -- -t react-vite-shadcn
cd my-app
npm install
The scaffolding tool creates files but does not run npm install, so you must
run it yourself.
To scaffold in the current directory (if it is empty):
npm create convex@latest . -- -t react-vite-shadcn
npm install
npx convex dev is a long-running watcher process that syncs backend code to a
Convex deployment on every save. It also requires authentication on first run
(browser-based OAuth). Both of these make it unsuitable for an agent to run
directly.
Ask the user to run this themselves:
Tell the user to run npx convex dev in their terminal. On first run it will
prompt them to log in or develop anonymously. Once running, it will:
.env.localconvex/ directory with generated typesThe user should keep npx convex dev running in the background while you work
on code. The watcher will automatically pick up any files you create or edit in
convex/.
Exception - cloud or headless agents: Environments that cannot open a browser for interactive login should use Agent Mode (see below) to run anonymously without user interaction.
The user should also run the frontend dev server in a separate terminal:
npm run dev
Vite apps serve on http://localhost:5173, Next.js on http://localhost:3000.
After scaffolding, the project structure looks like:
my-app/
convex/ # Backend functions and schema
_generated/ # Auto-generated types (check this into git)
schema.ts # Database schema (if template includes one)
src/ # Frontend code (or app/ for Next.js)
package.json
.env.local # CONVEX_URL / VITE_CONVEX_URL / NEXT_PUBLIC_CONVEX_URL
…
帮助 ClawHub 管理人员执行封禁、解封、角色调整与状态核验。
帮助你用 React 与 Vite 快速创建并部署 Power Apps 代码应用。