CloudBase CLI Configuration Guide
CloudBase CLI is a unified command-line tool that integrates multiple mainstream AI programming tools, supports project-level configuration, and includes built-in CloudBase MCP and AI development rules.
Core Advantages:
- Unified Management: One command manages multiple AI programming CLI tools, no need to switch between multiple tools
- Built-in MCP and Rules: Ready to use out of the box, no need to manually configure MCP server and AI rules
- Project-level Configuration: Supports project-level configuration for easier team collaboration
- Multi-model Support: Supports built-in and custom various large models, including Kimi K2, Zhipu GLM-4.5, etc.
For example:
- "Create user table" - AI automatically creates database collection
- "Deploy this function" - AI automatically uploads and configures cloud function
- "Deploy frontend to CDN" - AI automatically uploads files and configures hosting
No need to switch to cloud console, all operations can be completed in command line using natural language.
Prerequisites
Before starting configuration, please ensure the following conditions are met:
Node.js environment and CloudBase environment are ready
Node.js Environment: Ensure Node.js v18.15.0 or higher is installed:
node --version
If not installed, please download and install from Node.js official website.
CloudBase Environment: Please refer to the documentation Create CloudBase Environment. New users can sign up for free.
Install CloudBase CLI
Install globally using npm/yarn/pnpm:
npm i -g @cloudbase/cli
Or using Yarn 1.x:
yarn global add @cloudbase/cli
Or Pnpm:
pnpm add -g @cloudbase/cli
If there are issues accessing the official npm registry, you can use the domestic mirror:
npm i -g @cloudbase/cli --registry=http://mirrors.cloud.tencent.com/npm/
Initialize AI Configuration
Run CloudBase AI CLI in terminal:
# Start configuration wizard
tcb ai
On first launch, the configuration wizard will guide you through:
- Select AI tool (CodeBuddy Code, Claude Code, OpenAI Codex, aider, Qwen Code)
- Complete AI tool configuration (supports custom LLM or using LLM in CloudBase environment)
After configuration is complete, you can start using AI tools for assisted development. You can run tcb ai --setup later to switch tools and models.
Configure your MCP client to connect with your CloudBase environment
Step 1: Installation
安装 CloudBase CLI:
npm i -g @cloudbase/cli初始化配置:
tcb ai配置向导会引导你完成 AI 工具的配置。CloudBase CLI 内置了 MCP 和 AI 开发规则,无需手动配置。
开始使用:
tcb aiStep 2: Verify connection
After configuration, enter the following in your AI chat to verify:
检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目Get Started
# Start AI tool
tcb ai
# Or preset prompt
tcb ai -- "Help me create an order management system"
# Or use non-interactive mode
tcb ai -- -p "Hello"
# View all available commands
tcb ai --help
Supported AI Tools
CloudBase CLI supports the following AI programming tools:
| AI Tool | Command Parameter |
|---|---|
| CodeBuddy Code | -a codebuddy |
| Claude Code | -a claude |
| OpenAI Codex | -a codex |
| aider | -a aider |
| Qwen Code | -a qwen |
Project-level Configuration
CloudBase CLI supports project-level configuration, configuration files are automatically saved in the project root directory. This allows team members to share the same configuration and improve collaboration efficiency.
Common Questions
Q: How to switch AI tools?
A: Run tcb ai --setup to rerun the configuration wizard and select different AI tools.
Q: How to view current configuration?
A: Run tcb ai --config to view current configuration information.
Q: How to reset configuration?
A: Run tcb ai --reset to reset all configuration.
More questions please check: Complete FAQ
相关资源
- 开发指南 - 深入了解开发最佳实践
- 使用案例 - 查看实际应用案例
- MCP 工具 - 了解所有可用工具
- 常见问题 - 查看常见问题解答
- CloudBase CLI 官方文档 - CloudBase CLI MCP 官方文档