KosmoKrator

productivity

Jenkins CLI for Shell Scripts

Use the Jenkins CLI for shell scripts with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 6 read 1 write API token auth

Jenkins CLI for Shell Scripts

Call integration functions from shell scripts with stable JSON input and output.

Use shell scripts for small local automations that need one or more integration calls. The Jenkins CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Jenkins CLI for Shell Scripts
kosmokrator integrations:configure jenkins --set api_token="$JENKINS_API_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call jenkins.jenkins_list_jobs '{}' --json

Discovery Before Execution

Agents and scripts can inspect Jenkins docs and schemas before choosing a function.

kosmo integrations:docs jenkins --json
kosmo integrations:docs jenkins.jenkins_list_jobs --json
kosmo integrations:schema jenkins.jenkins_list_jobs --json
kosmo integrations:search "Jenkins" --json
kosmo integrations:list --json

Useful Jenkins CLI Functions

FunctionTypeParametersDescription
jenkins.jenkins_list_jobs Read none List all Jenkins jobs. Returns job names, URLs, colors (build status), and basic metadata.
jenkins.jenkins_get_job Read job_name Get detailed information about a specific Jenkins job, including description, last build, health reports, and parameters.
jenkins.jenkins_create_job Write name, mode, description, config Create a new Jenkins job. Requires a job name and configuration.
jenkins.jenkins_list_builds Read job_name, status, per_page List builds for a specific Jenkins job, including build numbers, results, durations, and timestamps.
jenkins.jenkins_get_build Read job_name, build_number Get detailed information about a specific Jenkins build, including result, duration, console output, artifacts, and change sets.
jenkins.jenkins_list_nodes Read none List all Jenkins nodes (agents), including name, offline status, and executor count.
jenkins.jenkins_get_current_user Read none Get the authenticated Jenkins user's profile information, including user ID, full name, and email.

Automation Notes

Related Jenkins CLI Pages