
Jk
- 255 installs
- 78 repo stars
- Updated August 3, 2026
- avivsinai/jenkins-cli
Drive Jenkins jobs, triggers, and pipeline status from the jk CLI when agents or operators need scripted CI control without opening the Jenkins UI.
About
jk skill from jenkins-cli enables terminal control of Jenkins: trigger jobs, inspect pipeline results, and automate recurring CI tasks for SaaS teams that prefer CLI workflows over manual dashboard operations during day-to-day operations.
- jk Jenkins CLI commands
- Job trigger automation
- Pipeline status queries
- Scripted CI operations
- Agent-friendly terminal workflow
Jk by the numbers
- 255 all-time installs (skills.sh)
- Ranked #361 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/avivsinai/jenkins-cli --skill jkAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 255 |
|---|---|
| repo stars | ★ 78 |
| Last updated | August 3, 2026 |
| Repository | avivsinai/jenkins-cli ↗ |
What it does
Drive Jenkins jobs, triggers, and pipeline status from the jk CLI when agents or operators need scripted CI control without opening the Jenkins UI.
Files
Jenkins CLI (jk)
jk is a GitHub CLI–style interface for Jenkins controllers. It provides modern, scriptable workflows for developers and operators.
Dependency Check
Before executing any `jk` command, verify the CLI is installed:
jk --versionFor jk job create, jk job config, jk job configure, and jk job scan, use jk 0.0.29 or newer.
If the command fails or jk is not found, install it using one of these methods:
| Platform | Command |
|---|---|
| macOS/Linux | brew install avivsinai/tap/jk |
| Windows | scoop bucket add avivsinai https://github.com/avivsinai/scoop-bucket && scoop install jk |
| Go | go install github.com/avivsinai/jenkins-cli/cmd/jk@latest |
| Binary | Download from GitHub Releases |
Only proceed with `jk` commands after confirming installation succeeds.
Authentication
# Login with credentials
jk auth login https://jenkins.example.com --username alice --token <API_TOKEN>
# Login to a Jenkins controller that uses Google/OIDC/SSO in the browser
jk auth login https://jenkins.example.com --username <jenkins-user-id> --token <JENKINS_API_TOKEN>
# Login with custom context name
jk auth login https://jenkins.example.com --name prod --username alice --token <TOKEN>
# Login with TLS options
jk auth login https://jenkins.example.com --username alice --token <TOKEN> --insecure
jk auth login https://jenkins.example.com --username alice --token <TOKEN> --ca-file /path/to/ca.pem
# Check auth status (active context)
jk auth status
# Logout from a context
jk auth logout # Logout from active context
jk auth logout prod # Logout from specific contextOptions for auth login:
--name— Context name (defaults to hostname)--username— Jenkins user ID (SSO users: use browser/whoAmI/api/jsonif unsure)--token— Jenkins API token--insecure— Skip TLS verification--proxy— Proxy URL--ca-file— Custom CA bundle--set-active— Set as active context (default: true)--allow-insecure-store— Allow encrypted file fallback
For Google OAuth, OpenID Connect, Okta, Azure AD, or other browser SSO security realms, first sign in to Jenkins in the browser and create a Jenkins API token from /me/configure. Use that Jenkins API token with --token; do not use a Google/OIDC access token. If the username/email is rejected, open <jenkins-url>/whoAmI/api/json in the signed-in browser and use the returned name value as --username.
Contexts
Contexts store controller URLs and credentials for easy switching:
# List contexts (* = active)
jk context ls
# Switch active context
jk context use prod-jenkins
# Remove a context
jk context rm stagingEnvironment: JK_CONTEXT overrides active context.
Quick Command Reference
| Task | Command |
|---|---|
| Search jobs | jk search --job-glob '*deploy*' |
| List jobs | jk job ls |
| View job | jk job view team/app |
| Create multibranch job | jk job create auth-relay --folder platform/services --repo-owner playg --repository repo |
| Fetch job config | jk job config platform/services/auth-relay |
| Patch Jenkinsfile path | jk job configure platform/services/auth-relay --script-path services/auth-relay/Jenkinsfile |
| Rescan multibranch job | jk job scan platform/services/auth-relay |
| List runs | jk run ls team/app |
| Start run | jk run start team/app -p KEY=value |
| View run | jk run view team/app 128 |
| Follow logs | jk run start team/app --follow |
| Stream logs | jk log team/app 128 --follow |
| Download artifacts | jk artifact download team/app 128 |
| Test report | jk test report team/app 128 |
| List credentials | jk cred ls |
| List nodes | jk node ls |
| View queue | jk queue ls |
| List plugins | jk plugin ls |
Job Discovery
# Search across folders
jk search --job-glob '*deploy*' --limit 10
# Search in specific folder
jk search --folder team/services --job-glob '*api*'
# Filter by run results
jk search --job-glob '*' --filter result=FAILURE --since 7d
# With parameter filters
jk search --job-glob '*/deploy-*' --filter param.ENV=productionJob Operations
# List jobs in root
jk job ls
# List jobs in folder (positional or flag)
jk job ls team/app
jk job ls --folder team/app
# View job details
jk job view team/app/pipeline
# Create a Bitbucket-backed Multibranch Pipeline job
jk job create auth-relay \
--folder platform/services \
--repo-owner playg \
--repository taboola-sales-skills \
--script-path services/auth-relay/Jenkinsfile \
--credentials bitbucket-ro \
--branch-strategy all
# Fetch raw config.xml for a job
jk job config platform/services/auth-relay
# Replace config.xml from a file or stdin
jk job configure platform/services/auth-relay --file auth-relay.config.xml
cat auth-relay.config.xml | jk job configure platform/services/auth-relay --stdin
# Patch only the Jenkinsfile path in a multibranch config
jk job configure platform/services/auth-relay --script-path services/auth-relay/Jenkinsfile
# Trigger a multibranch rescan
jk job scan platform/services/auth-relayRun Management
Listing Runs
# List recent runs
jk run ls team/app/pipeline
# Limit results
jk run ls team/app/pipeline --limit 50
# Filter runs
jk run ls team/app/pipeline --filter result=SUCCESS
jk run ls team/app/pipeline --filter result=FAILURE --since 7d
# Filter by parameters
jk run ls team/app/pipeline --filter param.ENV=staging
# Include queued builds
jk run ls team/app/pipeline --include-queued
# Group by parameter
jk run ls team/app/pipeline --group-by param.ENV --agg last
# With metadata for agents
jk run ls team/app/pipeline --json --with-meta
# Pagination
jk run ls team/app/pipeline --cursor <cursor-from-previous>Starting Runs
# Start a run
jk run start team/app/pipeline
# Start with parameters
jk run start team/app/pipeline -p BRANCH=main -p ENV=staging
# Start and follow logs
jk run start team/app/pipeline --follow
# Start, wait for completion (no log streaming)
jk run start team/app/pipeline --wait --timeout 10m
# Get only the result
jk run start team/app/pipeline --follow --result
# Fuzzy job matching
jk run start deploy --fuzzyViewing Runs
# View run details
jk run view team/app/pipeline 128
# Get only result status
jk run view team/app/pipeline 128 --result
# Exit with build result code
jk run view team/app/pipeline 128 --exit-status
# Wait for completion
jk run view team/app/pipeline 128 --wait --timeout 5m
# Show summary
jk run view team/app/pipeline 128 --summaryOther Run Commands
# View run parameters
jk run params team/app/pipeline
# Cancel a run
jk run cancel team/app/pipeline 128
jk run cancel team/app/pipeline 128 --mode term
jk run cancel team/app/pipeline 128 --mode kill
# Rerun a build (with same parameters)
jk run rerun team/app/pipeline 128
jk run rerun team/app/pipeline 128 --followLogs
# View console log (snapshot)
jk log team/app/pipeline 128
# Stream live logs
jk log team/app/pipeline 128 --follow
# Custom poll interval
jk log team/app/pipeline 128 --follow --interval 2s
# Plain output (no decorations)
jk log team/app/pipeline 128 --plainArtifacts
# List artifacts
jk artifact ls team/app/pipeline 128
# Download all artifacts
jk artifact download team/app/pipeline 128
# Download with pattern filter
jk artifact download team/app/pipeline 128 --pattern "**/*.jar"
jk artifact download team/app/pipeline 128 -p "reports/**/*.xml"
# Output directory
jk artifact download team/app/pipeline 128 -o ./artifacts/
# Allow empty result (no error if no matches)
jk artifact download team/app/pipeline 128 -p "*.log" --allow-emptyTest Results
# View test report
jk test report team/app/pipeline 128
# JSON output
jk test report team/app/pipeline 128 --jsonCredentials
# List credentials (system scope)
jk cred ls
# List folder-scoped credentials
jk cred ls --scope folder --folder team/app
# Create secret text
jk cred create-secret --id my-secret --secret "value"
jk cred create-secret --id my-secret --secret "value" --description "API key"
# Create from stdin
echo "secret-value" | jk cred create-secret --id my-secret --from-stdin
# Folder-scoped credential
jk cred create-secret --id my-secret --secret "value" --scope folder --folder team/app
# Delete credential (system scope only)
jk cred rm my-secretNode Management
# List nodes
jk node ls
# Cordon node (mark temporarily offline)
jk node cordon agent-01
jk node cordon agent-01 --message "Maintenance"
# Uncordon node (bring back online)
jk node uncordon agent-01
# Remove node
jk node rm agent-01Queue Management
# List queued items
jk queue ls
# Cancel queued item
jk queue cancel <item-id>Plugin Management
# List installed plugins
jk plugin ls
# Install plugin (prompts for confirmation)
jk plugin install docker-workflow
# Install without confirmation
jk plugin install docker-workflow --yes
# Install specific version
jk plugin install docker-workflow@1.26
# Enable/disable plugin
jk plugin enable docker-workflow
jk plugin disable docker-workflowOutput Modes
All commands support structured output:
# JSON output
jk run ls team/app --json
# YAML output
jk run ls team/app --yaml
# Filter with jq expression
jk run ls team/app --json --jq '.items[0].number'
# Go template
jk run ls team/app --json --template '{{range .items}}{{.number}}{{end}}'
# Quiet mode (minimal output)
jk run start team/app --quietGlobal Options
-c, --context <name>— Use specific context--json— JSON output--yaml— YAML output--format json|yaml— Output format--jq <expr>— Filter JSON with jq expression-t, --template <tmpl>— Format with Go template-q, --quiet— Suppress non-essential output
Environment Variables
JK_CONTEXT— Override active contextJK_QUIET— Equivalent to--quiet(any value enables)
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Validation error |
| 3 | Not found |
| 4 | Authentication failure |
| 5 | Permission denied |
| 6 | Connectivity failure |
| 7 | Timeout |
| 8 | Feature unsupported |
With --follow or --wait, build results use additional codes:
| Code | Result |
|---|---|
| 0 | SUCCESS |
| 10 | UNSTABLE |
| 11 | FAILURE |
| 12 | ABORTED |
| 13 | NOT_BUILT |
| 14 | RUNNING |
References
- Full command reference: See references/commands.md
<!-- auto-generated by cmd/docgen — do not edit below this line -->
- artifact — Work with run artifacts
- auth — Authenticate with Jenkins instances
- context — Manage Jenkins contexts
- cred — Manage Jenkins credentials
- job — Manage Jenkins jobs and pipelines
- node — Inspect and manage Jenkins nodes
- plugin — Inspect and manage Jenkins plugins
- queue — Inspect the build queue
- run — Interact with job runs
- test — Inspect test results
- other — log, search, version
<!-- end auto-generated -->
Jenkins CLI Command Reference
Complete command reference for jk. Run jk <command> --help for details.
Authentication
Login
# Login with credentials
jk auth login https://jenkins.example.com --username alice --token <API_TOKEN>
# Login to a Jenkins controller that uses Google/OIDC/SSO in the browser
jk auth login https://jenkins.example.com --username <jenkins-user-id> --token <JENKINS_API_TOKEN>
# With context name
jk auth login https://jenkins.example.com --name prod --username alice --token <TOKEN>
# TLS options
jk auth login https://jenkins.example.com --username alice --token <TOKEN> --insecure
jk auth login https://jenkins.example.com --username alice --token <TOKEN> --ca-file /path/to/ca.pem
# With proxy
jk auth login https://jenkins.example.com --username alice --token <TOKEN> --proxy http://proxy:8080
# Allow insecure storage (when keychain unavailable)
jk auth login https://jenkins.example.com --username alice --token <TOKEN> --allow-insecure-storeOptions:
--name— Context name (defaults to hostname)--username— Jenkins user ID (SSO users: use browser/whoAmI/api/jsonif unsure)--token— Jenkins API token--insecure— Skip TLS verification--proxy— Proxy URL--ca-file— Custom CA bundle path--set-active— Set as active context (default: true)--allow-insecure-store— Allow encrypted file fallback
For Google OAuth, OpenID Connect, Okta, Azure AD, or other browser SSO security realms, first sign in to Jenkins in the browser and create a Jenkins API token from /me/configure. Use that Jenkins API token with --token; do not use a Google/OIDC access token. If the username/email is rejected, open <jenkins-url>/whoAmI/api/json in the signed-in browser and use the returned name value as --username.
Status and Logout
jk auth status # Show active context info
jk auth logout # Logout from active context
jk auth logout prod # Logout from specific context
jk auth logout --context prod # Alternative syntaxContext Management
# List contexts (* = active)
jk context ls
# Switch active context
jk context use prod-jenkins
# Delete context
jk context rm stagingEnvironment: JK_CONTEXT overrides active context.
Search Commands
Cross-job discovery across folders:
# Search by job name pattern
jk search --job-glob '*deploy*'
# Search in specific folder
jk search --folder team/services --job-glob '*api*'
# Limit results
jk search --job-glob '*' --limit 20
# Filter by run attributes
jk search --job-glob '*' --filter result=SUCCESS --since 7d
# Filter by parameter values
jk search --job-glob '*/deploy-*' --filter param.ENVIRONMENT=production
# Control scan depth
jk search --job-glob '*' --max-scan 100
# Select additional fields
jk search --job-glob '*' --select parameters --limit 5Options:
--folder— Anchor search in folder--job-glob— Job name pattern (doublestar supported)--filter key[op]value— Filter runs (repeatable)--since <duration>— Time bound (e.g.,72h,7d)--limit <n>— Max results (default: 10)--max-scan <n>— Max runs to inspect per job (default: 500)--select field1,field2— Project additional fields--regex— Enable regex matching for filters
Job Commands
List
jk job ls # List jobs at root
jk job ls team/app # List jobs in folder (positional)
jk job ls --folder team/app # List jobs in folder (flag)View
jk job view team/app/pipeline # View job detailsCreate
jk job create auth-relay \
--folder platform/services \
--repo-owner playg \
--repository taboola-sales-skills \
--script-path services/auth-relay/Jenkinsfile \
--credentials bitbucket-ro
# Optional discovery behavior
jk job create auth-relay \
--repo-owner playg \
--repository taboola-sales-skills \
--branch-strategy only-prs \
--discover-origin-prs \
--discover-fork-prsOptions:
--folder— Folder path where the job should be created--description— Job description--repo-owner— Bitbucket repository owner/workspace--repository— Bitbucket repository name--script-path— Jenkinsfile path inside the repository (default:Jenkinsfile)--credentials— Jenkins credentials ID for the Bitbucket source--bitbucket-url— Bitbucket server URL (default:https://bitbucket.org)--branch-strategy all|exclude-prs|only-prs— Branch discovery mode--discover-origin-prs— Discover PRs from the origin repository--discover-fork-prs— Discover PRs from forks usingTrustTeamForks
Config
# Fetch raw config.xml to stdout
jk job config platform/services/auth-relay
# Save config.xml for review or editing
jk job config platform/services/auth-relay > auth-relay.config.xmlNotes:
- Output is always raw XML.
--json,--yaml, and--format json|yamlare rejected for this command.
Configure
# Replace config.xml from a file
jk job configure platform/services/auth-relay --file auth-relay.config.xml
# Replace config.xml from stdin
cat auth-relay.config.xml | jk job configure platform/services/auth-relay --stdin
# Patch only the Jenkinsfile path for a multibranch job
jk job configure platform/services/auth-relay --script-path services/auth-relay/JenkinsfileOptions:
--file <path>— Read a fullconfig.xmlreplacement from a file--stdin— Read a fullconfig.xmlreplacement from standard input--script-path <path>— Patch the Multibranch Pipeline Jenkinsfile path
Scan
# Trigger a multibranch rescan
jk job scan platform/services/auth-relayNotes:
jk job scanis only valid for Multibranch Pipeline jobs.- The command validates the target job type before triggering the Jenkins
/build?delay=0endpoint.
Run Commands
List
jk run ls team/app/pipeline # List recent runs
jk run ls team/app/pipeline --limit 50 # Limit results
# Filtering
jk run ls team/app/pipeline --filter result=SUCCESS
jk run ls team/app/pipeline --filter result=FAILURE
jk run ls team/app/pipeline --filter param.ENV=staging
jk run ls team/app/pipeline --since 7d
# Grouping and aggregation
jk run ls team/app/pipeline --group-by result --agg count
jk run ls team/app/pipeline --group-by param.ENV --agg last
# Include queued builds
jk run ls team/app/pipeline --include-queued
# With metadata for agents
jk run ls team/app/pipeline --json --with-meta
# Pagination
jk run ls team/app/pipeline --cursor <cursor>Options:
--limit <n>— Max results (default: 20)--cursor <string>— Pagination cursor--filter key[op]value— Filter runs (repeatable)--since <duration>— Time bound--select field1,field2— Project additional fields--group-by <field>— Group results--agg count|first|last— Aggregation for groups--include-queued— Include queued builds--with-meta— Include metadata in JSON output--regex— Enable regex matching for filters
Search
jk run search --job-glob '*deploy*' # Same as `jk search`View Parameters
jk run params team/app/pipeline # Show job's parameter definitionsStart
jk run start team/app/pipeline # Trigger a run
jk run start team/app/pipeline -p BRANCH=main -p ENV=staging
# Follow logs until completion
jk run start team/app/pipeline --follow
jk run start team/app/pipeline --follow --follow-interval 500ms
# Wait for completion (no log streaming)
jk run start team/app/pipeline --wait
jk run start team/app/pipeline --wait --interval 2s --timeout 10m
# Get only the result
jk run start team/app/pipeline --follow --result
# Fuzzy job matching
jk run start deploy --fuzzy
jk run start deploy --fuzzy --non-interactive
# Quiet mode (outputs only build number)
jk run start team/app/pipeline --quietOptions:
-p, --param key=value— Build parameter (repeatable)--follow— Follow logs until completion--follow-interval <duration>— Poll interval for logs (default: 500ms)--fuzzy— Enable fuzzy job name matching--non-interactive— Fail on ambiguous matches--result— Output only final result (requires --follow)--wait— Wait for completion without streaming logs--interval <duration>— Wait poll interval (default: 2s)--timeout <duration>— Max wait time (0 = no timeout)
View
jk run view team/app/pipeline 128 # View run details
# Get only result
jk run view team/app/pipeline 128 --result
# Exit with build result code
jk run view team/app/pipeline 128 --exit-status
# Wait for completion
jk run view team/app/pipeline 128 --wait
jk run view team/app/pipeline 128 --wait --interval 2s --timeout 5m
# Show human-readable summary
jk run view team/app/pipeline 128 --summaryOptions:
--result— Output only build result--exit-status— Exit with code based on build result--wait— Wait for build to complete--interval <duration>— Wait poll interval (default: 2s)--timeout <duration>— Max wait time (0 = no timeout)--summary— Show human-readable summary
Cancel
jk run cancel team/app/pipeline 128 # Cancel running build
jk run cancel team/app/pipeline 128 --mode stop # Default
jk run cancel team/app/pipeline 128 --mode term # Terminate
jk run cancel team/app/pipeline 128 --mode kill # Force killOptions:
--mode stop|term|kill— Cancellation mode (default: stop)
Rerun
jk run rerun team/app/pipeline 128 # Rerun with same parameters
jk run rerun team/app/pipeline 128 --follow
jk run rerun team/app/pipeline 128 --wait --timeout 10m
jk run rerun team/app/pipeline 128 --follow --resultOptions:
--follow— Follow logs until completion--follow-interval <duration>— Poll interval for logs--result— Output only final result (requires --follow)--wait— Wait for completion without streaming logs--interval <duration>— Wait poll interval--timeout <duration>— Max wait time
Log Commands
jk log team/app/pipeline 128 # View console log (snapshot)
jk log team/app/pipeline 128 --follow # Stream live logs
jk log team/app/pipeline 128 --follow --interval 2s
jk log team/app/pipeline 128 --plain # No decorationsOptions:
--follow— Stream live output--interval <duration>— Poll interval (default: 1s)--plain— Disable headings and formatting
Artifact Commands
List
jk artifact ls team/app/pipeline 128 # List artifactsDownload
jk artifact download team/app/pipeline 128
jk artifact download team/app/pipeline 128 --pattern "**/*.jar"
jk artifact download team/app/pipeline 128 -p "reports/**/*.xml"
jk artifact download team/app/pipeline 128 -o ./artifacts/
jk artifact download team/app/pipeline 128 -p "*.log" --allow-emptyOptions:
-p, --pattern <glob>— Filter pattern (default:**/*)-o, --output <dir>— Output directory (default:.)--allow-empty— Don't error if no artifacts match
Test Commands
Report
jk test report team/app/pipeline 128 # View test report
jk test report team/app/pipeline 128 --jsonCredential Commands
List
jk cred ls # List system credentials
jk cred ls --scope system # Explicit system scope
jk cred ls --scope folder --folder team/appOptions:
--scope system|folder— Credential scope (default: system)--folder <path>— Folder path (required for folder scope)
Create Secret
jk cred create-secret --id my-secret --secret "value"
jk cred create-secret --id my-secret --secret "value" --description "API key"
# From stdin
echo "secret" | jk cred create-secret --id my-secret --from-stdin
# Folder-scoped
jk cred create-secret --id my-secret --secret "value" --scope folder --folder team/appOptions:
--id <id>— Credential ID (required)--secret <value>— Secret value--description <text>— Description--from-stdin— Read secret from stdin--scope system|folder— Scope (default: system)--folder <path>— Folder path (required for folder scope)
Delete
jk cred rm my-secret # Delete system credentialNode Commands
List
jk node ls # List all nodesCordon
jk node cordon agent-01 # Mark temporarily offline
jk node cordon agent-01 --message "Maintenance"Options:
--message <text>— Offline message
Uncordon
jk node uncordon agent-01 # Bring back onlineRemove
jk node rm agent-01 # Delete nodeQueue Commands
List
jk queue ls # List queued itemsCancel
jk queue cancel <id> # Cancel queued itemPlugin Commands
List
jk plugin ls # List installed pluginsInstall
jk plugin install docker-workflow # Install (prompts for confirm)
jk plugin install docker-workflow --yes # Skip confirmation
jk plugin install docker-workflow@1.26 # Specific version
jk plugin install plugin1 plugin2 # Multiple pluginsOptions:
-y, --yes— Skip confirmation prompt
Enable/Disable
jk plugin enable docker-workflow
jk plugin disable docker-workflowGlobal Options
All commands support:
-c, --context <name>— Use specific context--json— JSON output--yaml— YAML output--format json|yaml— Output format--jq <expr>— Filter JSON with jq expression-t, --template <tmpl>— Format with Go template-q, --quiet— Suppress non-essential output
Environment Variables
JK_CONTEXT— Override active context (empty = use config)JK_QUIET— Equivalent to--quiet(any value enables)
Exit Codes
General Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Validation error |
| 3 | Not found |
| 4 | Authentication failure |
| 5 | Permission denied |
| 6 | Connectivity failure |
| 7 | Timeout |
| 8 | Feature unsupported |
Build Result Exit Codes (with --follow or --wait)
| Code | Result |
|---|---|
| 0 | SUCCESS |
| 10 | UNSTABLE |
| 11 | FAILURE |
| 12 | ABORTED |
| 13 | NOT_BUILT |
| 14 | RUNNING |
<!-- auto-generated by cmd/docgen — do not edit -->
jk artifact
Work with run artifacts
jk artifact <command> [flags]Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| download | Download artifacts | --allow-empty, --output, --pattern |
| ls | List artifacts for a run | — |
jk artifact download
Download artifacts
Usage
jk artifact download <jobPath> <buildNumber> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--allow-empty | Do not error when no artifacts match | |
--output | -o | Output directory |
--pattern | -p | Glob to match artifacts |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk artifact ls
List artifacts for a run
Usage
jk artifact ls <jobPath> <buildNumber> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
<!-- auto-generated by cmd/docgen — do not edit -->
jk auth
Authenticate with Jenkins instances
jk auth <command> [flags]Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| login | Authenticate to Jenkins and persist a context | --allow-insecure-store, --ca-file, --insecure, --name |
| logout | Remove credentials for a context | --context |
| status | Display authentication status | — |
jk auth login
Authenticate to Jenkins and persist a context
Usage
jk auth login <url> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--allow-insecure-store | Allow encrypted file-based secret storage | |
--ca-file | Custom CA bundle for TLS verification | |
--insecure | Skip TLS certificate verification | |
--name | Context name (defaults to Jenkins hostname) | |
--no-verify | Skip credential verification against the controller | |
--proxy | Proxy URL for this context | |
--set-active | Set the context as active after login | |
--token | Jenkins API token | |
--username | Jenkins user ID (SSO users: use browser /whoAmI/api/json if unsure) |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk auth logout
Remove credentials for a context
Usage
jk auth logout [context] [flags]Flags
| Flag | Short | Description |
|---|---|---|
--context | Context name to remove (defaults to active) |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk auth status
Display authentication status
Usage
jk auth status [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
<!-- auto-generated by cmd/docgen — do not edit -->
jk context
Manage Jenkins contexts.
Environment variable JK_CONTEXT can be used instead of the --context flag. Precedence: --context flag > JK_CONTEXT env var > active context in config
jk context <command> [flags]Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| ls | List configured contexts | — |
| rm | Remove a context and its credentials | — |
| use | Set the active context | — |
jk context ls
List configured contexts
Usage
jk context ls [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk context rm
Remove a context and its credentials
Usage
jk context rm <name> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk context use
Set the active context
Usage
jk context use <name> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
<!-- auto-generated by cmd/docgen — do not edit -->
jk cred
Manage Jenkins credentials
jk cred <command> [flags]Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| create-secret | Create a secret text credential | --description, --folder, --from-stdin, --id |
| ls | List credentials | --folder, --scope |
| rm | Delete a credential | — |
jk cred create-secret
Create a secret text credential
Usage
jk cred create-secret [flags]Flags
| Flag | Short | Description |
|---|---|---|
--description | Credential description | |
--folder | Folder path when scope=folder (e.g. team/service) | |
--from-stdin | Read secret value from standard input | |
--id | Credential identifier | |
--scope | Scope to create the credential (system or folder) | |
--secret | Secret value (omit to read from stdin with --from-stdin) |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk cred ls
List credentials
Usage
jk cred ls [flags]Flags
| Flag | Short | Description |
|---|---|---|
--folder | Folder path when scope=folder (e.g. team/service) | |
--scope | Scope to query: system or folder |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk cred rm
Delete a credential
Usage
jk cred rm <id> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
<!-- auto-generated by cmd/docgen — do not edit -->
jk job
Manage Jenkins jobs and pipelines
jk job <command> [flags]Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| config | Fetch a job's raw config.xml | — |
| configure | Update a job's config.xml | --file, --script-path, --stdin |
| create | Create a Jenkins job | --bitbucket-url, --branch-strategy, --credentials, --description |
| ls | List job names in a folder | --folder |
| scan | Trigger a Multibranch Pipeline rescan | — |
| view | View job details | — |
jk job config
Fetch a job's raw config.xml.
This command writes the XML payload directly to stdout so it can be piped into tools like xmllint, redirected to a file, or round-tripped back into jk job configure --stdin.
Structured output flags are not supported for this command; output is always raw XML.
Usage
jk job config <jobPath> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
Examples
jk job config platform/services/auth-relay
jk job config platform/services/auth-relay > auth-relay.config.xml
jk job config platform/services/auth-relay | xmllint --format -jk job configure
Update a job's config.xml.
Use --file or --stdin to post a full raw XML replacement, or use --script-path to fetch, patch, and post a Multibranch Pipeline config.
Usage
jk job configure <jobPath> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--file | Read a full config.xml replacement from a file | |
--script-path | Patch the Multibranch Pipeline Jenkinsfile path | |
--stdin | Read a full config.xml replacement from standard input |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
Examples
jk job configure platform/services/auth-relay --file auth-relay.config.xml
cat auth-relay.config.xml | jk job configure platform/services/auth-relay --stdin
jk job configure platform/services/auth-relay --script-path services/auth-relay/Jenkinsfilejk job create
Create a Jenkins job.
Current support is intentionally focused: this command creates a Multibranch Pipeline backed by a Bitbucket repository and configures the Jenkinsfile path.
If Jenkins creates the job but a later config.xml step fails, the partially created job remains and may need cleanup via the Jenkins UI.
Usage
jk job create <name> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--bitbucket-url | Bitbucket server URL | |
--branch-strategy | Branch discovery strategy: all, exclude-prs, only-prs | |
--credentials | Jenkins credentials ID for the Bitbucket source | |
--description | Job description | |
--discover-fork-prs | Discover pull requests raised from forks using TrustTeamForks | |
--discover-origin-prs | Discover pull requests raised from the origin repository | |
--folder | Folder path where the job should be created | |
--repo-owner | Bitbucket repository owner/workspace | |
--repository | Bitbucket repository name | |
--script-path | Path to the Jenkinsfile inside the repository |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
Examples
jk job create auth-relay \
--folder platform/services \
--repo-owner playg \
--repository taboola-sales-skills \
--script-path services/auth-relay/Jenkinsfile \
--credentials bitbucket-readonlyjk job ls
List job names and URLs. Use this to discover what jobs exist, not to search build history.
Related commands: jk search --job-glob '<pattern>' Search for jobs by pattern
Usage
jk job ls [folder] [flags]Flags
| Flag | Short | Description |
|---|---|---|
--folder | Folder path to list jobs from |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk job scan
Trigger a Multibranch Pipeline rescan.
The command validates that the target job is a Multibranch Pipeline before posting the Jenkins scan trigger endpoint.
Usage
jk job scan <jobPath> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
Examples
jk job scan platform/services/auth-relayjk job view
View job details
Usage
jk job view <jobPath> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
<!-- auto-generated by cmd/docgen — do not edit -->
jk node
Inspect and manage Jenkins nodes
jk node <command> [flags]Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| cordon | Mark a node temporarily offline | --message |
| ls | List Jenkins nodes | — |
| rm | Delete a node | — |
| uncordon | Bring a node back online | — |
jk node cordon
Mark a node temporarily offline
Usage
jk node cordon <name> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--message | Offline message to display |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk node ls
List Jenkins nodes
Usage
jk node ls [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk node rm
Delete a node
Usage
jk node rm <name> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk node uncordon
Bring a node back online
Usage
jk node uncordon <name> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
<!-- auto-generated by cmd/docgen — do not edit -->
Other Commands
jk log
Display the console log for a Jenkins run. Add --follow to stream live output similar to gh run view --log.
Usage
jk log <jobPath> <buildNumber> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--follow | Stream log output until the run finishes | |
--interval | Polling interval while following live logs | |
--plain | Disable headings and additional formatting |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
---
jk search
Search Jenkins jobs and their runs without knowing exact folder paths.
This is equivalent to 'jk run search', exposed at the top level for discoverability.
Usage
jk search [flags]Flags
| Flag | Short | Description |
|---|---|---|
--filter | Filter runs (repeatable): key[op]value | |
--folder | Folder path to search in | |
--job-glob | Job glob pattern (e.g., "/deploy-") | |
--limit | Max results to return | |
--max-scan | Max builds to scan per job | |
--regex | Enable regular expression matching for filters | |
--select | Select additional fields (comma-separated) | |
--since | Only search runs since timestamp or duration (RFC3339, 72h, 7d) | |
--with-meta | Compatibility alias; structured search output already includes metadata |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
Examples
# Discover job paths that contain "ada"
jk search --job-glob "*ada*" --limit 5
# Find recent failed builds across a folder
jk search --folder ci-jobs --filter result=FAILURE --limit 10
# Search for builds with specific parameter value
jk search --job-glob "*/deploy-*" --filter param.ENVIRONMENT=production --since 7d---
jk version
Print jk version information
Usage
jk version [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
<!-- auto-generated by cmd/docgen — do not edit -->
jk plugin
Inspect and manage Jenkins plugins
jk plugin <command> [flags]Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| disable | Disable a plugin | — |
| enable | Enable a plugin | — |
| install | Install plugins via the Jenkins update center | --yes |
| ls | List installed plugins | — |
jk plugin disable
Disable a plugin
Usage
jk plugin disable <name> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk plugin enable
Enable a plugin
Usage
jk plugin enable <name> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk plugin install
Install plugins via the Jenkins update center
Usage
jk plugin install <plugin[@version]> [<plugin[@version]>...] [flags]Flags
| Flag | Short | Description |
|---|---|---|
--yes | -y | Do not prompt for confirmation |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk plugin ls
List installed plugins
Usage
jk plugin ls [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
<!-- auto-generated by cmd/docgen — do not edit -->
jk queue
Inspect the build queue
jk queue <command> [flags]Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| cancel | Cancel a queued item | — |
| ls | List queued items | — |
jk queue cancel
Cancel a queued item
Usage
jk queue cancel <id> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk queue ls
List queued items
Usage
jk queue ls [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
<!-- auto-generated by cmd/docgen — do not edit -->
jk run
Interact with job runs
jk run <command> [flags]Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| cancel | Cancel a running job | --mode |
| ls | List recent runs | --agg, --cursor, --filter, --group-by |
| params | Discover job parameter definitions | --limit-runs, --source |
| rerun | Rerun a job using the previous parameters | --follow, --follow-interval, --interval, --result |
| search | Search Jenkins jobs and runs across folders | --filter, --folder, --job-glob, --limit |
| start | Trigger a job run | --follow, --follow-interval, --fuzzy, --interval |
| view | View run details | --exit-status, --interval, --result, --summary |
jk run cancel
Cancel a running job
Usage
jk run cancel <jobPath> <buildNumber> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--mode | Termination mode: stop, term, or kill |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk run ls
List recent runs
Usage
jk run ls <jobPath> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--agg | Aggregation function for grouped results: count, first, last | |
--cursor | Cursor for pagination (use value from previous output) | |
--filter | Filter runs (repeatable): key[op]value | |
--group-by | Group results by field (e.g., param.CHART_NAME) | |
--include-queued | Include queued (not yet started) builds in output | |
--limit | Number of runs to list | |
--regex | Enable regular expression matching for filters | |
--select | Select additional fields (comma-separated) | |
--since | Filter runs since timestamp or duration (RFC3339, 72h, 7d) | |
--with-meta | Include metadata in JSON output |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
Examples
# List recent runs for a job
jk run ls Helm.Chart.Deploy
# Filter by parameter values
jk run ls Helm.Chart.Deploy --filter param.CHART_NAME~nova --filter result=SUCCESS --since 7d
# Group by chart name and return the last run per chart
jk run ls Helm.Chart.Deploy --group-by param.CHART_NAME --agg last --json
# Select specific fields for agent consumption
jk run ls Helm.Chart.Deploy --select parameters --limit 5 --json --with-metajk run params
Discover job parameter definitions
Usage
jk run params <jobPath> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--limit-runs | Number of recent runs to scan when inferring parameters | |
--source | Parameter source: auto, config, or runs |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
Examples
# Infer parameters from job configuration
jk run params Helm.Chart.Deploy --source config --json
# Auto-discover parameters using the last 20 runs
jk run params Helm.Chart.Deploy --source runs --limit-runs 20
# Combine with jk run ls for an agent workflow
jk run ls Helm.Chart.Deploy --select parameters --filter param.CHART_NAME~nova --jsonjk run rerun
Rerun a job using the previous parameters
Usage
jk run rerun <jobPath> <buildNumber> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--follow | Follow the rerun progress until completion | |
--follow-interval | Polling interval when following runs | |
--interval | Polling interval when waiting | |
--result | Output only the final build result (requires --follow) | |
--timeout | Maximum time to wait (0 = no timeout) | |
--wait | Wait for build to complete (no log streaming) |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk run search
Discover Jenkins jobs and runs without knowing exact folder paths. Combine job globs and run filters to home in on the builds you need.
Usage
jk run search [flags]Flags
| Flag | Short | Description |
|---|---|---|
--filter | Filter runs (repeatable): key[op]value | |
--folder | Folder path to search in | |
--job-glob | Job glob pattern (e.g., "/deploy-") | |
--limit | Max results to return | |
--max-scan | Max builds to scan per job | |
--regex | Enable regular expression matching for filters | |
--select | Select additional fields (comma-separated) | |
--since | Only search runs since timestamp or duration (RFC3339, 72h, 7d) | |
--with-meta | Compatibility alias; structured search output already includes metadata |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
Examples
# Discover job paths that contain "ada"
jk run search --job-glob "*ada*" --limit 5
# Find recent failed builds across a folder
jk run search --folder ci-jobs --filter result=FAILURE --limit 10
# Search for builds with specific parameter value
jk run search --job-glob "*/deploy-*" --filter param.ENVIRONMENT=production --since 7d
# Find builds by user across all jobs
jk run search --filter cause.user~john --select parameters --limit 5jk run start
Trigger a job run. If the job is not found, will automatically search for similar jobs.
Related commands: jk search --job-glob '<pattern>' Search for jobs by pattern jk job ls --folder '<folder>' List jobs in a folder
Usage
jk run start <jobPath> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--follow | Follow the run progress until completion | |
--follow-interval | Polling interval when following runs | |
--fuzzy | Enable fuzzy matching for job names | |
--interval | Polling interval when waiting | |
--non-interactive | Disable interactive selection (fail on ambiguous matches) | |
--param | -p | Build parameter key=value (use multiple -p flags for multiple params) |
--result | Output only the final build result (requires --follow) | |
--timeout | Maximum time to wait (0 = no timeout) | |
--wait | Wait for build to complete (no log streaming) |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
jk run view
View run details
Usage
jk run view <jobPath> <buildNumber> [flags]Flags
| Flag | Short | Description |
|---|---|---|
--exit-status | Exit with code based on build result | |
--interval | Polling interval when waiting | |
--result | Output only the build result (e.g., SUCCESS, FAILURE) | |
--summary | Show human-readable build summary | |
--timeout | Maximum time to wait (0 = no timeout) | |
--wait | Wait for build to complete (no log streaming) |
Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |
<!-- auto-generated by cmd/docgen — do not edit -->
jk test
Inspect test results
jk test <command> [flags]Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| report | Show aggregated test results | — |
jk test report
Show aggregated test results
Usage
jk test report <jobPath> <buildNumber> [flags]Inherited Flags
| Flag | Short | Description |
|---|---|---|
--context | -c | Active Jenkins context name (or set JK_CONTEXT env var) |
--format | Output format: json, yaml | |
--jq | Filter JSON output using jq expression (requires --json or --format=json) | |
--json | Output in JSON format when supported | |
--quiet | -q | Suppress non-essential output |
--template | -t | Format output using Go template (requires --json or --format=json) |
--yaml | Output in YAML format when supported |