cocos/cocos-cli(新しいタブで開きます)
主要言語: TypeScript
COCOS CLI
- star 数
- 454
- watcher 数
- 8
- fork 数
- 158
- issue 数
- 55
- 最終更新
- 2026/10/30
主要言語: TypeScript
COCOS CLI
🚀 A powerful command-line interface tool for Cocos Engine development
For native development, please refer to the Native Development Setup Guide for detailed setup instructions.
Clone the repository
git clone <repository-url> cd cocos-cli
Install dependencies
npm install -g node-gyp npm run init npm install
Build and link globally
npm run build npm link
See Quick Start Guide for detailed usage steps.
# Create project cocos create --project ./my-project # Build project cocos build --project ./my-project --platform web-mobile # Import project cocos import --project ./my-project # Show project information cocos info --project ./my-project # Start MCP server cocos start-mcp-server --project ./my-project --port 9527 # Interactive wizard cocos wizard # Display help cocos --help
For detailed command documentation, see Commands Documentation.
The simulator is not part of npm run build — npm run release builds it automatically, or you can build it directly:
# Build the native simulator executable + runtime artifacts npm run build:simulator # Build only the native executable npm run build:simulator:native # Build only the runtime artifacts npm run build:simulator:runtime
The public API lives in src/lib/simulator/simulator.ts (generated types in packages/cocos-cli-types/simulator.d.ts). See docs/en/simulator.md for an overview.
# Run all unit tests (core) npm test # Run asset-db workspace tests npm run test:asset-db # Run tests in watch mode npm run test:watch # Run tests with coverage report npm run test:coverage
# Run E2E tests npm run test:e2e # Run E2E tests in debug mode (preserves test projects) npm run test:e2e:debug # Check E2E test coverage npm run check:e2e-coverage # Generate E2E coverage HTML report npm run check:e2e-coverage:report
# Run all tests (unit + E2E)
npm run test:allFor more testing details, see:
We welcome contributions! Please see our Contributing Guide to get started.
The guide covers:
MIT License - see the LICENSE file for details.