Skip to main content

Document Search

v3.0.0+

The tcb docs command has been available since v3.0.0 and works without signing in.

tcb docs searches and reads CloudBase official documentation in the terminal, without opening a browser.

List Modules​

tcb docs list

Lists every top-level module of the CloudBase documentation site:

文档站业务模块列表:
01 云函数
02 数据库
03 云存储
04 云托管
05 MySQL数据库
...

Read a Document​

tcb docs read <module | path | title | URL>

Parameters:

ParameterDescriptionRequired
<module>A top-level module name. Prints the document tree of that moduleYes
<path>Hierarchical path in a.b.c form, such as MySQL数据库.数据操作.字段类型Yes
<title>Document title, matched by titleYes
<URL>A documentation site address, such as https://docs.cloudbase.net/cli-v1/functions/deployYes

Pass one of the four forms. The command fails when nothing matches.

Examples:

# List modules first
tcb docs list

# Print the document tree of the 云函数 module
tcb docs read 云函数

# Read a document by hierarchical path
tcb docs read 云函数.部署.快速开始

# Read by title
tcb docs read 云函数部署

# Read by URL
tcb docs read https://docs.cloudbase.net/cli-v1/functions/deploy
tcb docs search <keyword>

Parameters:

ParameterDescriptionRequired
<keyword>Search term, in Chinese or EnglishYes

Examples:

# Search cloud function deployment documents
tcb docs search 云函数部署

# Search MySQL backup documents
tcb docs search MySQL 备份
搜索结果(3 条):

01 部署云函数
https://docs.cloudbase.net/cli-v1/functions/deploy
使用 tcb fn deploy 命令可以快速部署云函数到云开发环境…

02 函数配置
https://docs.cloudbase.net/cli-v1/functions/configs
cloudbaserc.json 中云函数的配置项说明…

Typical Workflow​

# 1. List all modules when you do not know what is available
tcb docs list

# 2. Print the document tree of a module
tcb docs read 数据库

# 3. Read a specific document
tcb docs read 数据库.数据模型管理

# 4. Search by keyword when the path is unknown
tcb docs search 数据模型 pull

Command Reference​

CommandDescription
tcb docs listList all top-level document modules
tcb docs read <path|title|URL>Read document content
tcb docs search <keyword>Search documents by keyword

Notes​

  • Document content is retrieved through CloudBase APIs, so a network connection is required
  • Add --json for structured output that scripts can consume
  • The command does not read local credentials, so it works without signing in