Agent Skills › vendurehq/vendure › vendure-cli

vendure-cli

GitHub

Vendure CLI技能,用于管理Vendure电商项目全生命周期。支持通过检测包管理器自动执行开发、构建、启动、插件脚手架、数据库迁移、GraphQL Schema生成及健康诊断等任务。

skills/vendure-cli/SKILL.md vendurehq/vendure

Trigger Scenarios

需要运行Vendure开发服务器或生产构建 执行数据库迁移或Schema生成 为Vendure项目创建插件或实体脚手架 进行Vendure项目配置诊断

Install

npx skills add vendurehq/vendure --skill vendure-cli -g -y
More Options

Use without installing

npx skills use vendurehq/vendure@vendure-cli

指定 Agent (Claude Code)

npx skills add vendurehq/vendure --skill vendure-cli -a claude-code -g -y

安装 repo 全部 skill

npx skills add vendurehq/vendure --all -g -y

预览 repo 内 skill

npx skills add vendurehq/vendure --list

SKILL.md

Frontmatter
{
    "name": "vendure-cli",
    "description": "Use the Vendure CLI (`vendure`) to scaffold, run, build, migrate and maintain a Vendure ecommerce project. Use whenever working inside a Vendure project that needs a dev server, a production build, database migrations, plugin\/entity\/service scaffolding, GraphQL schema generation, diagnostic checks, or codemods.",
    "allowed-tools": "Bash, Read, Edit, Glob, Grep"
}

Vendure CLI

The Vendure CLI (@vendure/cli, binary vendure) drives the full lifecycle of a Vendure project. Use it instead of hand-writing boilerplate or guessing build and migration commands.

Detecting a Vendure project

Run CLI commands from a Vendure server package root, or from a monorepo root that contains a Vendure package under packages/, apps/, libs/, services/, or modules/.

dev, build, and start resolve the project directory from the current working directory if it contains @vendure/core, or by scanning those monorepo package directories. add, migrate, schema, and config-dependent doctor checks analyze the TypeScript project from process.cwd() and require a tsconfig*.json there, so do not assume they work from arbitrary nested subdirectories.

Running the CLI

@vendure/cli is normally a project dependency, so run it through the project's package manager — do not assume npx. Detect the package manager from the lockfile in the project root or workspace root and use the matching runner:

Lockfile in project root Package manager Run the CLI with
bun.lock / bun.lockb bun bunx vendure <command>
pnpm-lock.yaml pnpm pnpm exec vendure <command>
yarn.lock yarn yarn vendure <command>
package-lock.json npm npx vendure <command>
none found npm (fallback) npx vendure <command>

If @vendure/cli is installed globally, call vendure <command> directly. List all commands with vendure --help.

The commands/*.md reference files write examples with a bare vendure … — prefix each one with the runner for the detected package manager.

Note: CLI scaffolding that installs packages currently detects yarn.lock, package-lock.json, and pnpm-lock.yaml internally, then falls back to npm. It does not use Bun for those generated dependency installs.

Commands

Command Use it to… Reference
dev Run server + worker + dashboard in development mode commands/dev.md
build Compile the project for production commands/build.md
start Run an already-built project commands/start.md
add Scaffold a plugin, entity, service, API extension, etc. commands/add.md
migrate Generate, run or revert database migrations commands/migrate.md
schema Generate a GraphQL schema file from the Admin/Shop API commands/schema.md
doctor Diagnose project, dependency, config, schema and DB health commands/doctor.md
codemod Run automated code transforms (e.g. UI migrations) commands/codemod.md
plugins List / enable / disable CLI plugins for the project commands/plugins.md

To diagnose a broken project, use the vendure-troubleshooting skill (skills/vendure-troubleshooting/).

Installed CLI plugins (packages that declare vendure.cliPlugin) may add commands or replace built-ins such as dev. Prefer vendure --help in the project to see the effective command set. See the developer CLI guide section “Extending the CLI”.

Critical rules for agents

  1. Never hardcode npx. Resolve the runner from the project's lockfile — see "Running the CLI" above (bunx, pnpm exec, yarn, npx).
  2. Prompt-capable commands (add, migrate, schema, codemod, plugins) need explicit flags/arguments from agents. Run them with explicit inputs so they take the non-interactive path; otherwise the process rejects prompt-only invocations in non-interactive environments. Set VENDURE_CLI_NON_INTERACTIVE=true when calling the CLI from an agent so prompt-only invocations fail fast with examples instead of waiting on a terminal prompt. The exact non-interactive flags are in each command's reference file. For CLI plugins use vendure plugins --json / vendure plugins add <pkg> / vendure plugins remove <pkg> — there is no blanket-approve flag.
  3. dev, start, and build --watch are long-running processes. Do not run them just to "check" something. Run them only when the user asks, and prefer running them in the background.
  4. Production-only installs may not include @vendure/cli. Generated apps keep the CLI as a dev dependency, so after pruning dev dependencies, start compiled server/worker entrypoints with node ./dist/... or make the CLI a production dependency explicitly.
  5. Read the relevant commands/*.md file before building a command. Valid targets and flags differ per command (e.g. start has no dashboard target; --inspect only applies to dev).

Version History

  • a29d8ff Current 2026-10-19 18:45
  • 7f72774 2026-08-20 09:27

Same Skill Collection

skills/radix-to-base-ui-migration/SKILL.md
skills/vendure-dashboard-migration/SKILL.md
skills/vendure-troubleshooting/SKILL.md

Metadata

Files
0
Version
a29d8ff
Hash
f42ab538
Indexed
2026-08-20 09:27

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-31 04:01
浙ICP备14020137号-1