agentuity-cli-cloud-db-sql
对数据库执行 SQL 查询。需要身份验证。用于Agentuity云平台操作
📖 中文导读:对数据库执行 SQL 查询。需要身份验证。用于Agentuity云平台操作 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: agentuity-cli-cloud-db-sql description: Execute SQL query on a database. Requires authentication. Use for Agentuity cloud platform operations version: "0.0.104" license: Apache-2.0 allowed-tools: "Bash(agentuity:*)" argument-hint: " " metadata: command: "agentuity cloud db sql" tags: "slow requires-auth"
Cloud Db Sql
Execute SQL query on a database
Prerequisites
- Authenticated with
agentuity auth login - Organization context required (
--org-idor default org)
Usage
agentuity cloud db sql <name> <query>
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
<name> |
string | Yes | - |
<query> |
string | Yes | - |
Examples
Execute SQL query:
bunx @agentuity/cli cloud db sql my-database "SELECT * FROM users LIMIT 10"
Execute query with JSON output:
bunx @agentuity/cli cloud db exec my-database "SELECT COUNT(*) FROM orders" --json
Query with filter:
bunx @agentuity/cli cloud db query my-database "SELECT * FROM products WHERE price > 100"
Output
Returns JSON object:
{
"rows": "array",
"rowCount": "number",
"truncated": "boolean"
}
| Field | Type | Description |
|---|---|---|
rows |
array | Query results |
rowCount |
number | Number of rows returned |
truncated |
boolean | Whether results were truncated |