Jira CLI

Agents

The JSON output contract and safety flags for coding agents.

Jira CLI is built to be driven by coding agents as well as humans. It works with Claude Code, OpenAI Codex, Cursor, or any coding agent or agent harness that can run shell commands.

The output contract

  • Add -o json (or -o yaml) to any list/get command for machine-readable output.
  • stdout carries only the requested data. stderr carries informational lines ("Created ABC-1", the JQL that issue list built, warnings). Parse stdout; log stderr.
  • Non-zero exit codes signal failure; API errors preserve the upstream HTTP status.

Safety flags

FlagEnvEffect
--read-onlyJIRA_READ_ONLY=1Blocks every write command (create/edit/delete/transition/...)
--no-inputJIRA_NO_INPUT=1Disables all interactive prompts; fails instead of prompting
--quietJIRA_QUIET=1Suppresses informational stderr output
# Safe, non-interactive read for an agent
JIRA_READ_ONLY=1 JIRA_NO_INPUT=1 jira issue search "project = ABC" -o json

Duplicate-safe issue creation

jira issue create is safe to rerun by default. Before writing, it looks for an issue created by the current user in the same project during the last 10 minutes with the exact issue type, summary, and parent. A match is returned instead of creating another issue, even if the description was reformatted between agent attempts.

Use --allow-duplicate only when two otherwise identical issues are intentional:

jira issue create -p ABC --type Task --summary "Repeated title" --allow-duplicate

Configuration via environment

No auth login step is needed. Set credentials directly:

export JIRA_SITE=https://acme.atlassian.net
export JIRA_EMAIL=me@acme.com
export JIRA_TOKEN=xxxx
jira whoami -o json

Claude Code skill

A ready-to-use skill lives at jira/SKILL.md, with command and API references under jira/references/.

On this page