Agent SkillsHKUDS/CLI-Anything › cli-anything-jumpserver

cli-anything-jumpserver

GitHub

JumpServer堡垒机管理的CLI工具,支持资产、用户、权限、会话及审计管理。提供JSON输出和Dry Run模式,便于AI Agent进行自动化运维操作。

jumpserver/agent-harness/cli_anything/jumpserver/skills/SKILL.md HKUDS/CLI-Anything

Trigger Scenarios

需要管理JumpServer堡垒机资源 执行堡垒机安全审计或会话监控 通过API自动化运维基础设施

Install

npx skills add HKUDS/CLI-Anything --skill cli-anything-jumpserver -g -y
More Options

Non-standard path

npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/jumpserver/agent-harness/cli_anything/jumpserver/skills -g -y

Use without installing

npx skills use HKUDS/CLI-Anything@cli-anything-jumpserver

指定 Agent (Claude Code)

npx skills add HKUDS/CLI-Anything --skill cli-anything-jumpserver -a claude-code -g -y

安装 repo 全部 skill

npx skills add HKUDS/CLI-Anything --all -g -y

预览 repo 内 skill

npx skills add HKUDS/CLI-Anything --list

SKILL.md

Frontmatter
{
    "name": "cli-anything-jumpserver",
    "tags": [
        "jumpserver",
        "bastion",
        "pam",
        "security",
        "ssh",
        "cli"
    ],
    "version": "0.1.0",
    "category": "infrastructure",
    "commands": [
        {
            "group": "auth",
            "description": "Authentication and session management",
            "subcommands": [
                {
                    "name": "login",
                    "options": [
                        "--url",
                        "--username",
                        "--password",
                        "--org",
                        "--insecure"
                    ],
                    "description": "Authenticate to JumpServer and store session token"
                },
                {
                    "name": "logout",
                    "description": "Clear the current session"
                },
                {
                    "name": "status",
                    "description": "Show current authentication status"
                },
                {
                    "name": "org",
                    "options": [
                        "--list"
                    ],
                    "description": "Switch or list organizations"
                }
            ]
        },
        {
            "group": "asset",
            "description": "Manage assets (hosts, devices, databases, nodes, platforms, gateways, zones)",
            "subcommands": [
                {
                    "name": "list",
                    "options": [
                        "--type",
                        "--search",
                        "--node",
                        "--platform",
                        "--active\/--inactive",
                        "--limit",
                        "--offset"
                    ],
                    "description": "List assets of a given type"
                },
                {
                    "name": "get",
                    "description": "Get details of a specific asset"
                },
                {
                    "name": "create",
                    "options": [
                        "--name",
                        "--address",
                        "--platform",
                        "--type",
                        "--nodes",
                        "--dry-run"
                    ],
                    "description": "Create a new asset"
                },
                {
                    "name": "update",
                    "options": [
                        "--name",
                        "--address",
                        "--comment",
                        "--active\/--inactive",
                        "--dry-run"
                    ],
                    "description": "Update an existing asset"
                },
                {
                    "name": "delete",
                    "options": [
                        "--force",
                        "--dry-run"
                    ],
                    "description": "Delete an asset"
                },
                {
                    "name": "node",
                    "description": "Manage asset nodes (tree organization)",
                    "subcommands": [
                        {
                            "name": "list",
                            "options": [
                                "--tree",
                                "--parent"
                            ],
                            "description": "List nodes"
                        },
                        {
                            "name": "create",
                            "description": "Create a new node"
                        },
                        {
                            "name": "delete",
                            "description": "Delete a node"
                        },
                        {
                            "name": "add-assets",
                            "description": "Add assets to a node"
                        }
                    ]
                },
                {
                    "name": "platform",
                    "description": "Manage asset platforms",
                    "subcommands": [
                        {
                            "name": "list",
                            "description": "List platforms"
                        }
                    ]
                },
                {
                    "name": "gateway",
                    "description": "Manage gateways",
                    "subcommands": [
                        {
                            "name": "list",
                            "description": "List gateways"
                        },
                        {
                            "name": "test",
                            "description": "Test gateway connectivity"
                        }
                    ]
                },
                {
                    "name": "zone",
                    "description": "Manage zones",
                    "subcommands": [
                        {
                            "name": "list",
                            "description": "List zones"
                        }
                    ]
                }
            ]
        },
        {
            "group": "user",
            "description": "Manage users and user groups",
            "subcommands": [
                {
                    "name": "list",
                    "options": [
                        "--search",
                        "--source",
                        "--active\/--inactive"
                    ],
                    "description": "List users"
                },
                {
                    "name": "get",
                    "description": "Get user details"
                },
                {
                    "name": "create",
                    "options": [
                        "--name",
                        "--username",
                        "--email",
                        "--password",
                        "--role",
                        "--dry-run"
                    ],
                    "description": "Create a new user"
                },
                {
                    "name": "update",
                    "description": "Update a user"
                },
                {
                    "name": "delete",
                    "description": "Delete a user"
                },
                {
                    "name": "reset-password",
                    "description": "Reset a user's password"
                },
                {
                    "name": "unblock",
                    "description": "Unblock a locked user"
                },
                {
                    "name": "profile",
                    "description": "Show current user profile"
                },
                {
                    "name": "my-assets",
                    "description": "List assets the current user can access"
                },
                {
                    "name": "group",
                    "description": "Manage user groups",
                    "subcommands": [
                        {
                            "name": "list",
                            "description": "List user groups"
                        },
                        {
                            "name": "create",
                            "description": "Create a user group"
                        },
                        {
                            "name": "members",
                            "description": "List members of a user group"
                        }
                    ]
                }
            ]
        },
        {
            "group": "perm",
            "description": "Manage asset permissions",
            "subcommands": [
                {
                    "name": "list",
                    "options": [
                        "--search",
                        "--user",
                        "--active\/--inactive"
                    ],
                    "description": "List asset permissions"
                },
                {
                    "name": "get",
                    "description": "Get permission details"
                },
                {
                    "name": "create",
                    "options": [
                        "--name",
                        "--users",
                        "--user-groups",
                        "--assets",
                        "--nodes",
                        "--actions",
                        "--dry-run"
                    ],
                    "description": "Create a new asset permission"
                },
                {
                    "name": "update",
                    "description": "Update an asset permission"
                },
                {
                    "name": "delete",
                    "description": "Delete an asset permission"
                },
                {
                    "name": "users",
                    "description": "List users assigned to a permission"
                },
                {
                    "name": "assets",
                    "description": "List assets authorized by a permission"
                }
            ]
        },
        {
            "group": "account",
            "description": "Manage asset accounts and credentials",
            "subcommands": [
                {
                    "name": "list",
                    "options": [
                        "--search",
                        "--asset",
                        "--secret-type",
                        "--privileged\/--unprivileged"
                    ],
                    "description": "List asset accounts"
                },
                {
                    "name": "get",
                    "description": "Get account details"
                },
                {
                    "name": "create",
                    "options": [
                        "--asset",
                        "--username",
                        "--secret-type",
                        "--secret",
                        "--dry-run"
                    ],
                    "description": "Create a new asset account"
                },
                {
                    "name": "update",
                    "description": "Update an asset account"
                },
                {
                    "name": "delete",
                    "description": "Delete an asset account"
                },
                {
                    "name": "secret",
                    "description": "View account secrets\/passwords",
                    "subcommands": [
                        {
                            "name": "view",
                            "description": "View an account's password\/secret"
                        },
                        {
                            "name": "history",
                            "description": "View password change history"
                        }
                    ]
                },
                {
                    "name": "template",
                    "description": "Manage account templates",
                    "subcommands": [
                        {
                            "name": "list",
                            "description": "List account templates"
                        }
                    ]
                }
            ]
        },
        {
            "group": "session",
            "description": "Manage terminal sessions and replays",
            "subcommands": [
                {
                    "name": "list",
                    "options": [
                        "--search",
                        "--user",
                        "--asset",
                        "--protocol",
                        "--active\/--finished"
                    ],
                    "description": "List terminal sessions"
                },
                {
                    "name": "get",
                    "description": "Get session details"
                },
                {
                    "name": "replay",
                    "description": "Get session replay URL\/info"
                },
                {
                    "name": "kill",
                    "description": "Kill an active session"
                },
                {
                    "name": "command",
                    "description": "View session command history",
                    "subcommands": [
                        {
                            "name": "list",
                            "options": [
                                "--session",
                                "--user",
                                "--risk"
                            ],
                            "description": "List command records"
                        }
                    ]
                },
                {
                    "name": "terminal",
                    "description": "Manage terminal components",
                    "subcommands": [
                        {
                            "name": "list",
                            "description": "List terminal components"
                        },
                        {
                            "name": "status",
                            "description": "Get terminal component status"
                        }
                    ]
                }
            ]
        },
        {
            "group": "audit",
            "description": "View audit logs",
            "subcommands": [
                {
                    "name": "login",
                    "description": "View user login audit logs"
                },
                {
                    "name": "operate",
                    "description": "View resource operation audit logs"
                },
                {
                    "name": "ftp",
                    "description": "View FTP file transfer audit logs"
                },
                {
                    "name": "password",
                    "description": "View password change audit logs"
                },
                {
                    "name": "activity",
                    "description": "View user activity logs"
                }
            ]
        },
        {
            "group": "ops",
            "description": "Manage operations and job execution",
            "subcommands": [
                {
                    "name": "job-list",
                    "description": "List execution jobs"
                },
                {
                    "name": "job-log",
                    "description": "Get job execution log"
                },
                {
                    "name": "adhoc-list",
                    "description": "List ad-hoc command executions"
                },
                {
                    "name": "playbook-list",
                    "description": "List Ansible playbooks"
                }
            ]
        },
        {
            "group": "system",
            "description": "Manage system settings",
            "subcommands": [
                {
                    "name": "settings",
                    "description": "List system settings"
                },
                {
                    "name": "health",
                    "description": "Check system health"
                },
                {
                    "name": "info",
                    "description": "Show system information"
                }
            ]
        },
        {
            "group": "label",
            "description": "Manage labels",
            "subcommands": [
                {
                    "name": "list",
                    "description": "List labels"
                }
            ]
        },
        {
            "group": "role",
            "description": "Manage roles and permissions",
            "subcommands": [
                {
                    "name": "list",
                    "description": "List roles"
                },
                {
                    "name": "bindings",
                    "description": "List role bindings"
                }
            ]
        }
    ],
    "description": "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."
}

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 URL
  • JUMPSERVER_USERNAME - Default username
  • JUMPSERVER_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

Version History

  • 6f372d3 Current 2026-08-20 06:41

Same Skill Collection

3MF/agent-harness/cli_anything/threemf/skills/SKILL.md
adguardhome/agent-harness/cli_anything/adguardhome/skills/SKILL.md
anygen/agent-harness/cli_anything/anygen/skills/SKILL.md
audacity/agent-harness/cli_anything/audacity/skills/SKILL.md
blender/agent-harness/cli_anything/blender/skills/SKILL.md
browser/agent-harness/cli_anything/browser/skills/SKILL.md
calibre/agent-harness/cli_anything/calibre/skills/SKILL.md
cc-switch/agent-harness/cli_anything/ccswitch/skills/SKILL.md
chromadb/agent-harness/cli_anything/chromadb/skills/SKILL.md
cli-hub-matrix/3d-cad/SKILL.md
cli-hub-matrix/game-development/SKILL.md
cli-hub-matrix/image-design/SKILL.md
cli-hub-matrix/knowledge-research/SKILL.md
cli-hub-meta-skill/SKILL.md
cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/skills/SKILL.md
cloudcompare/agent-harness/cli_anything/cloudcompare/skills/SKILL.md
codex-skill/SKILL.md
comfyui/agent-harness/cli_anything/comfyui/skills/SKILL.md
dify-workflow/agent-harness/cli_anything/dify_workflow/skills/SKILL.md
drawio/agent-harness/cli_anything/drawio/skills/SKILL.md
eez-studio/agent-harness/cli_anything/eez_studio/skills/SKILL.md
eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/skills/SKILL.md
exa/agent-harness/cli_anything/exa/skills/SKILL.md
firefly-iii/agent-harness/cli_anything/firefly_iii/skills/SKILL.md
firefly-iii/agent-harness/skills/cli-anything-firefly-iii/SKILL.md
gimp/agent-harness/cli_anything/gimp/skills/SKILL.md
godot/agent-harness/cli_anything/godot/skills/SKILL.md
hermes-skill/SKILL.md
inkscape/agent-harness/cli_anything/inkscape/skills/SKILL.md
intelwatch/agent-harness/cli_anything/intelwatch/skills/SKILL.md
joplin/agent-harness/cli_anything/joplin/skills/SKILL.md
kdenlive/agent-harness/cli_anything/kdenlive/skills/SKILL.md
krita/agent-harness/cli_anything/krita/skills/SKILL.md
libreoffice/agent-harness/cli_anything/libreoffice/skills/SKILL.md
live2d/agent-harness/cli_anything/live2d/skills/SKILL.md
macrocli/agent-harness/cli_anything/macrocli/skills/SKILL.md
macrocli/SKILL.md
mailchimp/agent-harness/cli_anything/mailchimp/skills/SKILL.md
mermaid/agent-harness/cli_anything/mermaid/skills/SKILL.md
minimax/agent-harness/cli_anything/minimax/skills/SKILL.md
mubu/agent-harness/cli_anything/mubu/skills/SKILL.md
musescore/agent-harness/cli_anything/musescore/skills/SKILL.md
n8n/agent-harness/cli_anything/n8n/skills/SKILL.md
notebooklm/agent-harness/cli_anything/notebooklm/skills/SKILL.md
novita/agent-harness/cli_anything/novita/skills/SKILL.md
nsight-graphics/agent-harness/cli_anything/nsight_graphics/skills/SKILL.md
nslogger/agent-harness/cli_anything/nslogger/skills/SKILL.md
obs-studio/agent-harness/cli_anything/obs_studio/skills/SKILL.md
obsidian/agent-harness/cli_anything/obsidian/skills/SKILL.md

Metadata

Files
0
Version
6f372d3
Hash
b859246e
Indexed
2026-08-20 06:41

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 11:47
浙ICP备14020137号-1 $Map of visitor$