跳转到内容

ASP CLI

ASP CLI 提供 asp 命令,用于让分析师、自动化脚本和支持 skills 的 Agent 通过命令行访问 ASP。它可以执行认证、资源查询、评论与文件操作、Playbook 运行、SIEM 查询、威胁情报和 CMDB 查询等常用任务,也是 Skills 调用 ASP Agent Operations API 的稳定边界。

安装

先安装 pipx

macOS

bash
brew install pipx
pipx ensurepath

Linux

bash
python3 -m pip install --user pipx
python3 -m pipx ensurepath

Windows

powershell
scoop install pipx
pipx ensurepath

更多安装方式见 pipx 完整文档

推荐使用 pipx 安装:

powershell
pipx install asp-cli

安装后可以查看版本和帮助:

powershell
asp --help

登录与验证

使用 ASP 地址和个人 API Key 登录:

powershell
asp auth login --api-url https://asp.example.com --api-key asp_xxx

验证当前配置和服务连通性:

powershell
asp doctor --output json

输出格式

CLI 默认输出适合人工阅读;用于脚本、自动化和 Skills 时,建议显式使用 JSON 输出:

powershell
asp case list --output json

常用功能

场景常用命令用途
认证和配置asp auth statusasp doctor查看当前登录状态并检查服务连通性。
Case / Alert / Artifactasp case listasp case show case_000001asp alert listasp artifact show artifact_000001查询核心调查对象和关联上下文。
Comment / Fileasp comment list case_000001asp comment add case_000001 --body "..."asp file upload ./evidence.txtasp file read-text <file_key>读取讨论、追加评论、上传或读取附件。
Playbookasp playbook template listasp playbook run investigation case_000001 --user-input "..."查看可运行模板并触发 Case 自动化任务。
SIEMasp siem schema listasp siem search keyword "powershell" --from 2026-07-01T00:00:00Z --to 2026-07-02T00:00:00Z、`asp siem query spl "index=mainhead 10" --from ... --to ...`
Threat Intelligence / CMDBasp ti query 8.8.8.8 --artifact-type IPasp cmdb lookup IP 10.0.0.5查询 IOC 威胁情报和资产上下文。
Knowledge / Enrichmentasp knowledge search phishingasp enrichment create artifact_000001 --name "TI result" --value malicious检索知识库或写入结构化富化结果。

如果需要把这些能力交给支持 skills 的 Agent 使用,请继续阅读 Skills