ASP CLI
ASP CLI 提供 asp 命令,用于让分析师、自动化脚本和支持 skills 的 Agent 通过命令行访问 ASP。它可以执行认证、资源查询、评论与文件操作、Playbook 运行、SIEM 查询、威胁情报和 CMDB 查询等常用任务,也是 Skills 调用 ASP Agent Operations API 的稳定边界。
安装
先安装 pipx。
macOS
bash
brew install pipx
pipx ensurepathLinux
bash
python3 -m pip install --user pipx
python3 -m pipx ensurepathWindows
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 status、asp doctor | 查看当前登录状态并检查服务连通性。 |
| Case / Alert / Artifact | asp case list、asp case show case_000001、asp alert list、asp artifact show artifact_000001 | 查询核心调查对象和关联上下文。 |
| Comment / File | asp comment list case_000001、asp comment add case_000001 --body "..."、asp file upload ./evidence.txt、asp file read-text <file_key> | 读取讨论、追加评论、上传或读取附件。 |
| Playbook | asp playbook template list、asp playbook run investigation case_000001 --user-input "..." | 查看可运行模板并触发 Case 自动化任务。 |
| SIEM | asp siem schema list、asp siem search keyword "powershell" --from 2026-07-01T00:00:00Z --to 2026-07-02T00:00:00Z、`asp siem query spl "index=main | head 10" --from ... --to ...` |
| Threat Intelligence / CMDB | asp ti query 8.8.8.8 --artifact-type IP、asp cmdb lookup IP 10.0.0.5 | 查询 IOC 威胁情报和资产上下文。 |
| Knowledge / Enrichment | asp knowledge search phishing、asp enrichment create artifact_000001 --name "TI result" --value malicious | 检索知识库或写入结构化富化结果。 |
如果需要把这些能力交给支持 skills 的 Agent 使用,请继续阅读 Skills。