Say Goodbye to Jenkins UI — jk Brings Jenkins to Your Terminal and AI Agents
Say Goodbye to Jenkins UI — jk Brings Jenkins to Your Terminal and AI Agents

TLDR
jk is a Jenkins CLI designed for AI coding agents: it ships with a companion SKILL, requires no MCP server, and lets agents operate Jenkins Pipelines by running commands directly.
Introduction
Every time you need to trigger a Jenkins build, the routine goes something like this: open a browser, find the right Pipeline, click “Build with Parameters”, fill in the parameters, submit, wait for the page to redirect, click into the build details, then click “Console Output” — just to see the logs.
If the Pipeline has an input step, you also have to stare at the page waiting for the prompt to appear, then manually click "Proceed".
This whole ritual repeats a dozen times a day. There’s nothing technical about it, but every step requires a mouse click.
[jk](https://github.com/addozhang/jk) is a Pipeline-native Jenkins CLI that brings all of the above into the terminal. It takes a Jenkins Job URL as its target — no extra configuration of job names or server paths needed. Just use the URL from your browser's address bar, as-is.
Why It’s a Good Fit for AI Agents
Compared to integrating Jenkins through an MCP server, jk is more AI coding agent-friendly:
- Fewer dependencies: No need to spin up an additional MCP server
- Lower integration overhead: Just invoke commands directly, no protocol wiring needed
- Fewer failure points: No protocol layer means simpler debugging
- Aligns with coding agent workflows: Agents are already good at running commands and parsing stdout
- Easy to adopt: Works out of the box in scripts, CI, and local dev environments
The repository includes a built-in jk-jenkins-cli skill that teaches agents how to use jk correctly — covering diagnostic workflows for failed builds, handling rules for input steps, and a safety classification of which commands are read-only vs. which require explicit user confirmation. For example, when facing a production input step, the skill explicitly requires the agent to check pendingInput details and request user confirmation before proceeding — this kind of judgment can't be expressed by the CLI itself; it needs to live in the skill.
Core Features
jk covers several high-frequency Pipeline scenarios:
View Pipeline Info
jk pipeline info https://jenkins.example.com/job/my-pipeline
Outputs basic job info and parameter definitions in YAML format, easy to parse in scripts.
Trigger a Build
# Trigger and wait for result; exit code reflects build status
jk build trigger https://jenkins.example.com/job/my-pipeline --watch
# Trigger with parameters
jk build trigger https://jenkins.example.com/job/my-pipeline -p ENV=prod -p VERSION=1.2.0 --watch
--watch blocks until the build completes. The exit code directly reflects the build status: 0 = SUCCESS, 1 = FAILURE, 2 = UNSTABLE, 3 = ABORTED, 4 = PENDING_INPUT, >=10 = jk internal error. Agents can use $? directly to decide what to do next.
Stream Logs in Real Time
jk build logs -f https://jenkins.example.com/job/my-pipeline/lastBuild
Like tail -f — streams output while the build runs, exits automatically when it finishes.
Respond to input Steps
# Proceed directly
jk build input https://jenkins.example.com/job/my-pipeline/lastBuild proceed
# Proceed with parameters
jk build input https://jenkins.example.com/job/my-pipeline/lastBuild proceed -p DEPLOY_TARGET=production
Steps that previously required manual confirmation in the browser can now be triggered via command, with the decision made by a script or agent.
URL as Identity
jk supports multiple URL forms — no need to remember job names or configure aliases:
- Top-level Pipeline:
[https://host/job/pipeline](https://host/job/pipeline) - Inside a Folder:
[https://host/job/folder/job/pipeline](https://host/job/folder/job/pipeline) - Multibranch branch:
[https://host/job/mb/job/main](https://host/job/mb/job/main) - Specific build number:
[https://host/job/pipeline/42](https://host/job/pipeline/42) - Symbolic links:
lastBuild,lastSuccessfulBuild,lastFailedBuild, etc.
Installation & Quick Start
Install via Homebrew (recommended):
brew install addozhang/tap/jk
Or install directly with Go:
go install github.com/addozhang/jk/cmd/jk@latest
Or download a pre-built binary for your platform from the Releases page.
Configure Credentials
jk auth add https://jenkins.example.com
Follow the prompts to enter your username and API Token. Credentials are saved to ~/.config/jk/credentials with 0600 permissions. All subsequent commands read them automatically — no need to pass auth flags each time. If Jenkins uses a self-signed certificate, set SSL_CERT_FILE to point to the PEM file, or temporarily add --insecure to skip verification.
Walk Through a Typical Workflow
# Trigger build and wait
jk build trigger https://jenkins.example.com/job/deploy/job/main --watch
# Exit code 4 = stuck on input, proceed
jk build input https://jenkins.example.com/job/deploy/job/main/lastBuild proceed
# Stream logs in real time
jk build logs -f https://jenkins.example.com/job/deploy/job/main/lastBuild
Three commands cover 90% of day-to-day Pipeline operations.
Summary
jk isn't trying to replace Jenkins — it's moving the Jenkins interface from the browser to the terminal. For engineers who work with Pipelines every day, the point isn't saving a few mouse clicks. The real value is making Jenkins operations scriptable: usable in scripts, Makefiles, and AI agent toolchains.
For AI coding agents, jk combined with its skill is currently the lightest-weight way to integrate with Jenkins.
Jenkins isn’t going anywhere — but the way you operate it can get a little more modern.
Project: github.com/addozhang/jk — give it a try and drop a star if it’s useful.
메타데이터
- post_id
- ac8bd5a78cf1
- slug
- say-goodbye-to-jenkins-ui-jk-brings-jenkins-to-your-terminal-and-ai-agents-ac8bd5a78cf1
- url
- https://medium.com/@addozhang/say-goodbye-to-jenkins-ui-jk-brings-jenkins-to-your-terminal-and-ai-agents-ac8bd5a78cf1
- canonical_url
- https://medium.com/@addozhang/say-goodbye-to-jenkins-ui-jk-brings-jenkins-to-your-terminal-and-ai-agents-ac8bd5a78cf1
- author_url
- https://medium.com/@addozhang
- status
- ok
- fetched_at
- 2026-07-14 08:13:23