home / dev-tools / jenkins-cli

Jenkins CLI

Official · Jenkins
25k

Official Jenkins CLI for triggering builds, managing jobs, nodes, and plugins, and running controller administration commands.

$curl -O JENKINS_URL/jnlpJars/jenkins-cli.jar
Language
Java
Stars
25,081
Category
Dev Tools
Agent
AI Analysis

Jenkins CLI is the official remote command surface for a Jenkins controller. It lets you run controller-defined commands for builds, jobs, nodes, plugins, and admin tasks from scripts or the shell.

What It Enables
  • Trigger builds, wait for completion, follow console output, and stop or safe-restart controller activity without using the web UI.
  • Read, create, and update jobs or nodes by streaming Jenkins config XML through stdout or stdin.
  • List jobs or plugins, install plugins, inspect the current identity, and run other extension-provided controller commands exposed by the server.
Agent Fit
  • Commands are mostly non-interactive and backed by stable exit codes, so they work in CI jobs and inspect or change or verify loops.
  • Transport options are practical for headless use, but output is largely plain text or XML and no native JSON mode was found.
  • Best fit when you already operate Jenkins directly and can capture controller-specific commands, permissions, and XML payloads in a skill.
Caveats
  • The available command set depends on the target controller, installed plugins, and your permissions, so discovery on one Jenkins instance may not transfer cleanly to another.
  • Many mutating workflows use Jenkins XML over stdin or stdout rather than structured JSON, which makes parsing and templated edits more brittle.