Agentuity云平台API密钥创建工具 agentuity-cli-cloud-apikey-create

Agentuity云平台API密钥创建工具,用于生成和管理云服务访问凭证。支持自定义密钥名称、灵活设置过期时间(支持ISO 8601格式和时长表示),适用于自动化脚本和CI/CD流程。关键词:API密钥管理、云平台认证、命令行工具、自动化部署、安全凭证生成、Agentuity云服务

云安全 0 次安装 0 次浏览 更新于 2/27/2026

name: agentuity-cli-cloud-apikey-create description: 创建新的API密钥。需要身份验证。用于Agentuity云平台操作 version: “0.0.103” license: Apache-2.0 allowed-tools: “Bash(agentuity:*)” metadata: command: “agentuity cloud apikey create” tags: “destructive creates-resource slow requires-auth”

云平台API密钥创建

创建新的API密钥

前提条件

  • 已通过agentuity auth login完成身份验证
  • 需要组织上下文(--org-id或默认组织)

使用方法

agentuity cloud apikey create [options]

选项参数

选项 类型 必填 默认值 描述
--name 字符串 - API密钥的名称
--expires-at 字符串 - 过期时间,支持ISO 8601格式(2025-12-31T23:59:59Z)或时长表示(1h, 2d, 30d, 1y)
--confirm 布尔值 - 跳过确认提示(非TTY环境必需)

示例

创建有效期1年的API密钥:

bunx @agentuity/cli cloud apikey create --name "我的API密钥" --expires-at 1y

创建有效期30天的API密钥:

bunx @agentuity/cli cloud apikey create --name "短期密钥" --expires-at 30d

创建指定日期过期的API密钥并跳过确认:

bunx @agentuity/cli cloud apikey create --name "生产环境密钥" --expires-at 2026-01-01T00:00:00Z --confirm

输出结果

返回JSON对象:

{
  "id": "string",
  "value": "string"
}
字段 类型 描述
id 字符串 API密钥ID
value 字符串 API密钥值