name: agentuity-cli-cloud-env-set description: 设置环境变量。需要身份验证。用于Agentuity云平台操作 version: “0.0.103” license: Apache-2.0 allowed-tools: “Bash(agentuity:*)” argument-hint: “<键> <值>” metadata: command: “agentuity cloud env set” tags: “mutating updates-resource slow requires-auth requires-project”
云环境变量设置
设置环境变量
前提条件
- 已通过
agentuity auth login完成身份验证 - 需要项目上下文(从项目目录运行或使用
--project-id)
使用方法
agentuity cloud env set <键> <值>
参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
<键> |
字符串 | 是 | - |
<值> |
字符串 | 是 | - |
示例
设置生产环境命令:
bunx @agentuity/cli env set NODE_ENV production
设置端口命令:
bunx @agentuity/cli env set PORT 3000
设置调试级别命令:
bunx @agentuity/cli env set LOG_LEVEL debug
输出
返回JSON对象:
{
"success": "boolean",
"key": "string",
"path": "string"
}
| 字段 | 类型 | 描述 |
|---|---|---|
success |
布尔值 | 操作是否成功 |
key |
字符串 | 环境变量键名 |
path |
字符串 | 环境变量保存的本地文件路径 |