cli-anything-jumpserver
它能做什么
这个技能让你的智能体管理 JumpServer,这是一个通过堡垒机控制服务器访问的系统。适合需要检查访问权限和审计记录的 IT 人员和系统管理员。
适用场景
- ✓当你想列出 JumpServer 管理的服务器或资产的时候。
- ✓当你想检查用户权限或账户访问的时候。
- ✓当你想查看会话或审计记录的时候。
技能链接
https://github.com/HKUDS/CLI-Anything/blob/main/jumpserver/agent-harness/cli_anything/jumpserver/skills/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我列出 JumpServer 中所有的主机资产,并显示谁有权访问生产组。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能使用你的登录信息调用 JumpServer REST API,然后列出或修改记录。修改操作可以先通过试运行选项预览。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
cli-anything-jumpserver
Stateful CLI harness for JumpServer bastion host. Manage assets, users, permissions, accounts, sessions, audits, and more via the JumpServer REST API.
Quick Start
# Install
cd agent-harness && pip install -e .
# Authenticate
cli-anything-jumpserver auth login --url https://jumpserver.example.com --username admin
# List hosts
cli-anything-jumpserver asset list --type host
# Interactive REPL mode
cli-anything-jumpserver --interactive
Agent Usage Guidance
This CLI is designed for AI agent consumption. Key features for agents:
JSON Output Mode
All commands support --output json for machine-parseable output:
cli-anything-jumpserver asset list --type host --output json
Dry Run Mode
All mutation commands support --dry-run to preview without execution:
cli-anything-jumpserver asset create --name test --address 10.0.0.1 --platform 1 --dry-run --output json
Environment Variables
JUMPSERVER_URL- Default JumpServer URLJUMPSERVER_USERNAME- Default usernameJUMPSERVER_PASSWORD- Default password
Typical Agent Workflows
1. Discovery and Inventory
# Check connection
cli-anything-jumpserver auth status --output json
# List all hosts
cli-anything-jumpserver asset list --type host --output json
# Get asset details
cli-anything-jumpserver asset get <ID> --type host --output json
# List all users
cli-anything-jumpserver user list --output json
2. User and Permission Management
# Create user
cli-anything-jumpserver user create --name "New User" --username newuser --email user@example.com --output json --dry-run
# Grant asset access
cli-anything-jumpserver perm create --name "App Access" --users "user1,user2" --assets "asset1,asset2" --output json --dry-run
# Verify permissions
cli-anything-jumpserver perm users <PERM_ID> --output json
3. Security Audit
# Check failed logins
cli-anything-jumpserver audit login --status failed --output json
# Review operations
cli-anything-jumpserver audit operate --action delete --output json
# Check active sessions
cli-anything-jumpserver session list --active --output json
# View command history
cli-anything-jumpserver session command list --risk 5 --output json
4. Session Management
# Monitor active sessions
cli-anything-jumpserver session list --active --output json
# Check terminal health
cli-anything-jumpserver session terminal list --output json
cli-anything-jumpserver session terminal status <TERMINAL_ID> --output json
Output Formats
| Format | Flag | Use Case |
|---|---|---|
| Table | --output table (default) |
Human-readable display |
| JSON | --output json |
Agent consumption, scripting |
| YAML | --output yaml |
Configuration, readability |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | CLI error (auth, API, etc.) |
| 2 | Usage error (invalid options/arguments) |
| 130 | Interrupted (Ctrl+C) |
File Locations
| Path | Purpose |
|---|---|
~/.jumpserver-cli/session.json |
Authentication session |
~/.jumpserver-cli/state.json |
CLI operational state |
常见问题
我可以先预览更改吗?
可以,修改类命令支持试运行选项,可以在不执行的情况下显示将会发生的事情。
我如何登录?
你需要提供 JumpServer 网址和用户名,这个技能可以从环境变量中读取默认值。
有交互模式吗?
有,你可以启动交互式会话,逐步完成工作。
详情
作者的原始描述
Stateful CLI harness for JumpServer bastion host management. Supports asset, user, permission, account, session, audit, and operations management via REST API, with both one-shot and interactive REPL modes.
repo: HKUDS/CLI-Anything
热度
- GitHub 星标
- 58k
- 排名
- #3214
- 许可证
- Apache-2.0
- 更新时间
- 2026/9/21
评论
- …
同一仓库的更多技能
cli-anything-3mf
58k帮你的智能体检查和修复 3D 打印文件,包括查找圆孔、调整孔径、修复网格,以及比较两个文件。
cli-anything-qgis
58k帮你的智能体在终端中打开、编辑和导出 QGIS 地图项目,包括图层、要素、打印布局和处理工具。
cli-anything-adguardhome
58k帮你的智能体管理 AdGuard Home,这是一款全网络广告拦截器,可管理过滤规则、DNS 重写、客户端和查询日志。
cli-anything-anygen
58k帮你的智能体借助 AnyGen 服务,根据文字提示生成幻灯片、文档、网站和图表。