We're pleased to announce the official release of CloudBase CLI V3, a CloudBase command-line tool redesigned for AI agents.
This version adds 15 top-level command modules, covering environment management, database, user permissions, routing, domains, logs, AI agents and more. Now every operation of a cloud project, from creation to launch, can be done in the terminal — no console needed.
What V3 changed
- Filled in the large number of missing commands, so nearly every CloudBase operation can be done in the terminal;
- Every command has
-h/--helpself-explanation, letting AI agents discover and understand command functions on their own; - Added the
tcb docscommand, solving the problem that CloudBase docs were hard for agents to read; - Full
--jsonoutput mode, making all command returns machine-readable structured data.
Why CLI V3
We've observed more and more developers using AI tools like Claude Code, Cursor and CodeBuddy to operate CloudBase — creating environments, deploying functions, configuring routes, handing the whole flow to an agent.
But the traditional GUI console isn't agent-friendly: agents can't click buttons, can't read visual feedback on a page, can't handle popup confirmations. Every time they hit an operation the CLI doesn't cover, the agent has to stop and wait for a human.
A CLI is a design better suited to agents. Command-line input and output are structured text that agents can parse and process directly, no visual understanding needed; commands can be composed and scripted, a natural fit for multi-step automation workflows.
CloudBase CLI V3 solves exactly this: fully redesigned for AI agents, so the agent can run the whole way.
15 new commands: full coverage from environment creation to launch
| New module | What it does |
|---|---|
| tcb env | Full environment lifecycle — create, plan change, renew, destroy, resource usage query |
| tcb cors | Secure domain management (Web SDK whitelist) |
| tcb domains | Custom domain binding and SSL certificate management |
| tcb routes | HTTP route configuration (replaces tcb service) |
| tcb user | User management (create, query, modify, ban, delete) |
| tcb role | Role and permission policy management (system presets + custom policies) |
| tcb permission | Resource-level access permissions (database collections, storage, cloud functions) |
| tcb agent | AI agent management (create, deploy, update, delete) |
| tcb ai | Unified AI CLI entry, integrating Claude Code / CodeBuddy / Codex / aider and more |
| tcb logs | Unified log search (cloud functions, Cloud Run, database, LLM, CLS syntax) |
| tcb api | Generic passthrough to Tencent Cloud APIs — any public API of any Tencent Cloud product |
| tcb docs | In-CLI documentation search |
| tcb app | One-click app deploy (auto-detect framework, install deps, build, upload, bind routes) |
| tcb cloudrun | Cloud Run management (replaces tcb fun), with canary releases and traffic management |
| tcb secrets | Temporary secret management |
| tcb db | NoSQL native commands, MySQL SQL execution, backup/rollback, slow-query monitoring |
Existing commands were also systematically reorganized: command style migrated from colon-separated (tcb functions:deploy) to space-separated (tcb fn deploy), more in line with CLI conventions. This means operations that in the V2 era required switching between "CLI + console" can now all be done in the terminal.
--help: self-explaining commands
Every command and subcommand in CLI V3 has -h / --help built in, outputting the full usage, parameter list and examples.
Facing an unfamiliar command, an agent doesn't need to check external docs — tcb <command> --help gives structured usage directly:
tcb fn deploy --help
For an agent, this is a zero-cost command discovery mechanism: tcb --help to see the top-level commands, then tcb <command> --help for specifics, exploring layer by layer with no external knowledge needed.
tcb docs: a docs system for agents
When developing against CloudBase, agents often struggle to find the right docs, and search-engine results are frequently outdated or imprecise.
tcb docs lets agents query official CloudBase docs directly in the terminal, no search engine needed:
# list all doc modules
tcb docs list
# read a doc by path
tcb docs read 云函数
tcb docs read https://docs.cloudbase.net/cloud-function/faq
# full-text keyword search
tcb docs search 微信支付
For an agent, this forms an autonomous troubleshooting loop: hit unknown knowledge → tcb docs search → confirm the content → execute the next step. No human intervention, no external search.
tcb docsworks without login.
--json output mode: machine-readable output
All V3 subcommands support the global --json parameter. With it, output has no progress bars, no color codes, no human-readable decoration — the agent gets pure structured data.
On success:
{"currentEnvId":"luke-personal-test-new-8d0d90f5f"}
On failure:
{"error":{"code":"FUNCTION_NOT_FOUND","message":"函数 ai-reply 不存在","exit_code":4}}
Combined with V3's six structured exit codes, an agent can route responses by exit code:
| Exit code | Meaning | Agent response strategy |
|---|---|---|
| 0 | Success | Continue to the next step |
| 1 | Generic error | Check command logic, switch approach |
| 2 | Auth failure | Trigger tcb login again |
| 3 | Parameter error | Call --help to verify parameter format |
| 4 | Resource not found | Verify the resource name |
| 5 | Cloud API error | Wait and retry |
| 6 | Local config error | Check cloudbaserc.json |
Failure is no longer a vague error text but a deterministic signal. Agents don't need semantic understanding to guess the next step.
In practice: Claude Code + CLI V3 building an intelligent support ticket system
We built an intelligent support ticket system with Claude Code + CloudBase CLI V3 to verify V3's real capability boundary. The project covers a database, four cloud functions, HTTP routes, user and permission management, a custom domain and an SSL certificate — the full deployment. The whole flow ran through tcb commands, zero console operations.
Step 1: create and activate the environment
tcb env create --alias "ticket-system-prod" --package baas_personal --yes --json
tcb env use luke-personal-test-new-8d0d90f5f --json
Returns { "currentEnvId": "luke-personal-test-new-8d0d90f5f" }. After setting the global default environment, subsequent commands don't need --env-id. V3's environment priority: global config < cloudbaserc.json < -e CLI parameter.
Step 2: initialize the database: the ticket system needs three collections — tickets, ticket_history, user_roles — with indexes created via tcb db nosql execute.
Step 3: deploy cloud functions: four cloud functions (three event functions, one HTTP function):
tcb fn deploy submit-ticket --json
tcb fn deploy assign-ticket --json
tcb fn deploy reply-ticket --json
tcb fn deploy ai-reply --dir . --yes --json
Step 4: configure security rules and user permissions: database security rules, create an ops account, assign the admin role — the agent closes the loop with five commands.
Step 5: configure HTTP routes: tcb routes add configures the /api/ai-reply route, tcb routes list --json outputs the structured route table.
Step 6: bind the custom domain: look up the certificate, bind the domain, create the CNAME record — three steps in one workflow context. tcb api brings the whole Tencent Cloud ecosystem into one entry point.
Step 7: deploy the front end: cd frontend && tcb app deploy --yes, then open the link to see the published web app.
Summary: all CLI, zero console
In the past, AI-assisted development stopped at code generation. AI wrote the code, but deployment and ops still needed a human to open the console manually.
V3's design goal is to make tcb an interface agents can fully control. --json machine-readable output, structured exit codes, the tcb api unified entry, tcb docs self-service documentation — the agent can take over the full chain from environment creation to project launch.
Next time you have an AI agent build a cloud project, try not opening the console at all and see how far it gets.
How to use the V3 CLI
V3's CLI is already on npm:
npm install -g @cloudbase/cli
tcb login
Related docs:
- CloudBase CLI docs: https://docs.cloudbase.net/cli-v1/install
- V3 migration guide: https://docs.cloudbase.net/cli-v1/migrate-v3
- CloudBase MCP: https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/
- cloudbase-skills: https://github.com/TencentCloudBase/cloudbase-skills

