Loading...
Loading...
Compare original and translation side by side
dtctldtctlundefinedundefined
This displays:
- Current context name and environment URL
- Safety level (readonly, readwrite-mine, readwrite-all, dangerously-unrestricted)
- Authenticated user identity (name, email, UUID)
上述命令会输出以下内容:
- 当前上下文名称和环境URL
- 安全级别(readonly、readwrite-mine、readwrite-all、dangerously-unrestricted)
- 已认证用户身份(姓名、邮箱、UUID)dtctl querydtctl wait queryreferences/DQL-reference.mddtctl querydtctl wait queryreferences/DQL-reference.mddtctl describe <resource> <id> -o json --plain| Resource | Aliases |
|---|---|
| analyzer | analyzers |
| app | apps |
| bucket | bkt |
| copilot-skill | copilot-skills |
| dashboard | dash |
| edgeconnect | ec |
| extension | ext, extensions |
| extension-config | extcfg, extension-configs |
| function | fn, func |
| group | groups |
| intent | intents |
| lookup | lookups, lkup |
| notebook | nb |
| notification | notifications |
| sdk-version | sdk-versions |
| settings | setting |
| settings-schema | schema |
| slo | - |
| slo-template | slo-templates |
| trash | deleted |
| user | users |
| workflow | wf |
| workflow-execution | wfe |
dtctl describe <resource> <id> -o json --plain| 资源 | 别名 |
|---|---|
| analyzer | analyzers |
| app | apps |
| bucket | bkt |
| copilot-skill | copilot-skills |
| dashboard | dash |
| edgeconnect | ec |
| extension | ext, extensions |
| extension-config | extcfg, extension-configs |
| function | fn, func |
| group | groups |
| intent | intents |
| lookup | lookups, lkup |
| notebook | nb |
| notification | notifications |
| sdk-version | sdk-versions |
| settings | setting |
| settings-schema | schema |
| slo | - |
| slo-template | slo-templates |
| trash | deleted |
| user | users |
| workflow | wf |
| workflow-execution | wfe |
| Verb | Description | Example |
|---|---|---|
| get | List resources | |
| describe | Show resource details | |
| edit | Edit resource interactively | |
| apply | Create/update from file | |
| delete | Delete resource | |
| exec | Execute workflow/function/analyzer/copilot | |
| query | Run DQL query | |
| logs | Print resource logs | |
| wait | Wait for conditions | |
| history | Show document history | |
| restore | Restore document version | |
| share | Share document | |
| unshare | Remove sharing | |
| find | Discover resources | |
| open | Open in browser | |
| diff | Compare resources | |
| verify | Validate without executing | |
| commands | List all commands (machine-readable) | |
| 动词 | 描述 | 示例 |
|---|---|---|
| get | 列出资源 | |
| describe | 展示资源详情 | |
| edit | 交互式编辑资源 | |
| apply | 从文件创建/更新资源 | |
| delete | 删除资源 | |
| exec | 执行工作流/函数/分析器/copilot | |
| query | 运行DQL查询 | |
| logs | 打印资源日志 | |
| wait | 等待条件满足 | |
| history | 展示文档历史版本 | |
| restore | 恢复文档版本 | |
| share | 共享文档 | |
| unshare | 取消共享 | |
| find | 搜索资源 | |
| open | 在浏览器中打开 | |
| diff | 对比资源 | |
| verify | 校验而不执行 | |
| commands | 列出所有命令(机器可读格式) | |
undefinedundefined
**For AI agents, prefer:** `dtctl <command> --agent` (auto-detected) or `dtctl <command> -o json --plain`
The `--agent` envelope provides structured metadata alongside results:
```json
{
"ok": true,
"result": [ ... ],
"context": {
"verb": "get", "resource": "workflow",
"total": 5, "has_more": false,
"suggestions": ["Run 'dtctl describe workflow <id>' for details"]
}
}
**AI Agent 场景优先使用:** `dtctl <command> --agent`(自动检测)或 `dtctl <command> -o json --plain`
`--agent` 封装模式会在返回结果外附带结构化元数据:
```json
{
"ok": true,
"result": [ ... ],
"context": {
"verb": "get", "resource": "workflow",
"total": 5, "has_more": false,
"suggestions": ["Run 'dtctl describe workflow <id>' for details"]
}
}undefinedundefined
```dql
```dql
Execute with: `dtctl apply -f file.yaml --set environment=prod --set team=platform`
执行命令:`dtctl apply -f file.yaml --set environment=prod --set team=platform`undefinedundefined
Prefer `get ... -o json --plain` first, then `describe`/`exec` with explicit IDs.
优先使用 `get ... -o json --plain` 拉取列表,再通过明确的ID执行`describe`/`exec`操作。undefinedundefined
Use `can-i` to verify permissions before attempting operations.
尝试操作前使用`can-i`命令验证权限。references/DQL-reference.mddtctl query ... -o json --plaindtctl wait query ...undefinedreferences/DQL-reference.mddtctl query ... -o json --plaindtctl wait query ...undefinedundefinedundefineddtctl apply -f dashboard.yaml --plaindtctl get dashboard <id> -o yaml --plaindtctl apply -f dashboard.yaml --plaindtctl get dashboard <id> -o yaml --plainname: "Dashboard Name"
type: dashboard
content:
annotations: []
importedWithCode: false
settings:
defaultTimeframe:
enabled: true
value: { from: now()-2h, to: now() }
layouts:
"1": # string key, must match a tile key
x: 0 # 24-column grid (full=24, half=12, third=8)
"y": 0 # MUST quote "y" to avoid YAML boolean parse
w: 12
h: 6
tiles:
"1":
title: "Tile Title"
type: data # data | markdown
query: |
fetch logs | limit 10
visualization: lineChart
visualizationSettings:
autoSelectVisualization: false
davis: { enabled: false, davisVisualization: { isAvailable: true } }name: "Dashboard Name"
type: dashboard
content:
annotations: []
importedWithCode: false
settings:
defaultTimeframe:
enabled: true
value: { from: now()-2h, to: now() }
layouts:
"1": # 字符串键,必须与对应的tile键匹配
x: 0 # 24列网格(整行=24,半行=12,三分之一行=8)
"y": 0 # 必须给"y"加引号,避免被YAML解析为布尔值
w: 12
h: 6
tiles:
"1":
title: "Tile Title"
type: data # data | markdown
query: |
fetch logs | limit 10
visualization: lineChart
visualizationSettings:
autoSelectVisualization: false
davis: { enabled: false, davisVisualization: { isAvailable: true } }type: dataqueryvisualizationsingleValuelineChartareaChartbarChartpieCharttablehoneycombscatterplottype: markdowncontenttype: dataqueryvisualizationsingleValuelineChartareaChartbarChartpieCharttablehoneycombscatterplottype: markdowncontentdavis.enabled: falsemakeTimeseriestimeseriesversionididdavis.enabled: falsemakeTimeseriestimeseriesversionididdtctl get <resource> -o json --plain | jq -r '.[] | "\(.id) | \(.name)"'dtctl auth can-i <verb> <resource>dtctl config describe-context $(dtctl config current-context) --plaindtctl config use-context <name>dtctl get <resource> -o json --plain | jq -r '.[] | "\(.id) | \(.name)"'dtctl auth can-i <verb> <resource>dtctl config describe-context $(dtctl config current-context) --plaindtctl config use-context <name>dtctl --helpdtctl <command> --helpdtctl --helpdtctl <command> --help--plainget/describe--mine--plainget/describe--mine