@agentscope-ai/platform-cli
v1.0.4
Published
AgentScope Platform CLI (asp) — authentication for AgentScope Platform
Readme
AgentScope Platform CLI (asp)
AgentScope Platform 命令行工具。默认对接生产环境:https://platform.agentscope.io。
| 环境 | Platform URL | 命令标识 |
| --- | --- | --- |
| prod(默认) | https://platform.agentscope.io | (无需标识) |
| pre(预发) | https://platform-pre.agentscope.io | 命令末尾加 pre,或使用 --pre |
生产与预发凭证分开存储(~/.asp/credentials.json 与 ~/.asp/credentials.pre.json),互不影响。
安装
npm install -g @agentscope-ai/platform-cli环境变量
| 变量 | 说明 |
| --- | --- |
| ASP_TOKEN | 访问令牌 |
| ASP_PLATFORM_URL | 自定义 Platform 地址 |
| ASP_CONFIG_DIR | 凭证目录,默认 ~/.asp |
全局选项
asp --token <token>
asp --pre # 等价于命令末尾的 pre 标识
asp --platform-url <url> # 高级:自定义 Platform 地址
asp --verbose
asp --json
asp --version
asp --help登录方式
支持两种登录方式(与后端 /api/cli/v1 联调文档一致):
| 方式 | 命令 | 说明 |
| --- | --- | --- |
| 浏览器授权(推荐) | asp auth login → 选 1 或 --browser | 打开 {platform_url}/cli/login,OAuth PKCE 授权后回调本机 |
| 账号密码 | asp auth login → 选 2 或 --password | POST /auth/login |
生产环境(默认)
命令不加 pre,默认对接 https://platform.agentscope.io。
鉴权
asp auth login
asp auth login --browser
asp auth login --password
asp auth login --password --account [email protected] --pass 'your-password'
asp auth status
asp auth refresh
asp auth logout
asp auth logsPlugin
# 搜索 / 查看
asp plugin search qwen
asp plugin info <plugin_id>
asp plugin versions <plugin_id>
# 安装(通过 qwenpaw)
asp plugin install <plugin_id>
# 发布:本地 zip(zip 模式下 artifact_id/version 由 complete 阶段从包内解析)
asp plugin publish ./my-plugin.zip
# 发布:URL(会优先从 URL 自动识别 category,识别不到再交互选择)
asp plugin publish --url "https://github.com/org/repo/releases/download/v1.0.0/plugin.zip" --category tool
# 查询发布进度 / 日志(支持 plugin_id;已发布插件会走 GET /plugins/{id})
asp plugin publish status plugin_id --watch
asp plugin publish logs plugin_idSkill
# 搜索 / 查看
asp skill search web
asp skill info <skill_id>
asp skill versions <skill_id>
# 安装(通过 qwenpaw)
asp skill install <skill_id>
# 发布:本地 zip(未传 --category 会交互选择)
asp skill publish ./my-skill.zip --category 'document office'
# 发布:URL(未传 --category 会交互选择)
asp skill publish --url "https://github.com/org/repo/releases/download/v1.0.0/skill.zip" --category 'document office'
# 查询发布进度 / 日志
asp skill publish status <skill_id> --watch
asp skill publish logs <skill_id>预发环境
所有命令末尾加 pre(或使用 --pre),对接 https://platform-pre.agentscope.io。
鉴权
asp auth login pre
asp auth login --browser pre
asp auth login --password pre
asp auth login --password --account [email protected] --pass 'your-password' pre
asp auth status pre
asp auth refresh pre
asp auth logout pre
asp auth logs prePlugin
# 搜索 / 查看
asp plugin search qwen pre
asp plugin info <plugin_id> pre
asp plugin versions <plugin_id> pre
# 安装(通过 qwenpaw)
asp plugin install <plugin_id> pre
# 发布:本地 zip
asp plugin publish ./my-plugin.zip pre
# 发布:URL
asp plugin publish --url "https://github.com/org/repo/releases/download/v1.0.0/plugin.zip" --category tool pre
# 查询发布进度 / 日志
asp plugin publish status plugin_id --watch pre
asp plugin publish logs plugin_id preSkill
# 搜索 / 查看
asp skill search web pre
asp skill info <skill_id> pre
asp skill versions <skill_id> pre
# 安装(通过 qwenpaw)
asp skill install <skill_id> pre
# 发布:本地 zip
asp skill publish ./my-skill.zip --category 'document office' pre
# 发布:URL
asp skill publish --url "https://github.com/org/repo/releases/download/v1.0.0/skill.zip" --category 'document office' pre
# 查询发布进度 / 日志
asp skill publish status <skill_id> --watch pre
asp skill publish logs <skill_id> pre