A GitHub CLI-style interface for Jenkins, enabling operations teams to manage jobs, runs, logs, and admin tasks directly from the terminal. Integrates with existing Jenkins pipelines and workflows, reducing reliance on the web UI for routine operations.
git clone https://github.com/avivsinai/jenkins-cli.gitA GitHub CLI-style interface for Jenkins, enabling operations teams to manage jobs, runs, logs, and admin tasks directly from the terminal. Integrates with existing Jenkins pipelines and workflows, reducing reliance on the web UI for routine operations.
[{"step":"Install the Jenkins CLI tool. If using a package manager, run `brew install jenkins-cli` (macOS) or `scoop install jenkins-cli` (Windows). Alternatively, download the JAR from your Jenkins instance at `https://<JENKINS_URL>/jnlpJars/jenkins-cli.jar`.","tip":"Ensure you have Java 8+ installed. The CLI uses the same authentication as the web UI, so configure your credentials once and reuse them across sessions."},{"step":"Configure the Jenkins instance URL and authentication. Run `jenkins-cli config set instance https://jenkins.company.com` and `jenkins-cli config set user <USERNAME> --password <API_TOKEN>`.","tip":"Generate an API token in Jenkins under 'User Settings' > 'Configure' > 'API Token'. Store it securely or use environment variables for automation."},{"step":"Execute commands directly from the terminal. Use `list-jobs`, `trigger-build`, `get-logs`, or `pause-job` based on your needs. Combine with shell tools like `grep`, `jq`, or `awk` for advanced filtering.","tip":"Use `--help` with any command to see available options. For example, `jenkins-cli trigger-build --help` shows how to pass parameters or wait for build completion."},{"step":"Integrate with scripts or CI/CD pipelines. For example, use the CLI in a GitHub Actions workflow to trigger Jenkins jobs or fetch logs after a deployment.","tip":"Wrap CLI commands in scripts to standardize operations. For instance, create a `jenkins-ops.sh` script with functions for common tasks like `deploy-prod` or `rollback`."},{"step":"Monitor and debug builds. Use `get-logs` with `--tail` to stream logs in real-time, or `get-build-info` to check build status and artifacts.","tip":"For large logs, use `--max-lines` to limit output or pipe to `less` for easier navigation. Combine with `grep` to filter for errors or warnings."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/avivsinai/jenkins-cliCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use the Jenkins CLI to [COMMAND] for [JENKINS_INSTANCE_URL]. For example: 'List all active jobs with their last build status', 'Trigger a build for [JOB_NAME] with parameters [PARAM1=value1, PARAM2=value2]', 'Fetch logs for the latest run of [JOB_NAME] and extract errors', or 'Pause a job [JOB_NAME] and wait for confirmation'. Include the --depth flag if needed to control API response size.
``` $ jenkins-cli --instance https://jenkins.company.com list-jobs --depth 1 Active Jobs: 1. backend-unit-tests (last build: SUCCESS #142, duration: 4m 12s) 2. frontend-build (last build: FAILURE #89, duration: 2m 45s) 3. security-scan (last build: SUCCESS #203, duration: 12m 3s) 4. deploy-prod (last build: SUCCESS #45, duration: 8m 15s) $ jenkins-cli --instance https://jenkins.company.com trigger-build backend-unit-tests --params BRANCH=main,ENV=staging Build triggered successfully! Build URL: https://jenkins.company.com/job/backend-unit-tests/143/ Queue position: 2 $ jenkins-cli --instance https://jenkins.company.com get-logs backend-unit-tests 143 --tail 50 [2024-05-15 14:32:18] INFO: Starting test execution [2024-05-15 14:32:22] INFO: Test suite 'AuthServiceTest' completed [2024-05-15 14:32:23] ERROR: Test 'UserControllerTest.loginTest' failed: NullPointerException [2024-05-15 14:32:24] INFO: Test execution completed with 1 failure ``` The Jenkins CLI provides a streamlined way to interact with Jenkins without using the web interface. The commands above demonstrate how to list jobs with their status, trigger a parameterized build, and fetch logs with error extraction. This is particularly useful for operations teams who need to quickly diagnose issues or manage builds during incidents.
The leading open source automation server for CI/CD.
Let’s build from here, together
Facilitate continuous integration and agile project management with integrated DevOps tools.
IronCalc is a spreadsheet engine and ecosystem
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan