Comprehensive Jira API client and CLI tool
Project description
Jira Tool
A comprehensive Jira API client and CLI tool for interacting with Jira Cloud instances. Useful to automate workflows, create rich ADF content, and analyze workflow state durations. Use it in your agents / prompts / instructions for AI agents, or build automation scripts.
Table of Contents
- Features
- Quick Start
- CLI Commands
- Claude Code Integration
- Python API
- Documentation
- Development
- Requirements
Features
Built for AI agents and automation workflows:
- Agent-First Design - Enable AI agents to retrieve tickets, parse requirements, and create implementation plans
- Jira API Client - Python and CLI interface to Jira Cloud REST API v3
- Structured Data Export - Export issues in JSON, JSONL, CSV formats optimized for agent processing
- Document Builder - Programmatically create ADF-formatted issues and epics with proper structure
- Workflow Analysis - Analyze state durations and bottlenecks for retrospectives
- Epic & Sprint Management - Retrieve epics with children, filter by sprint, group by assignee/status
- JQL Support - Advanced filtering for complex queries and batch operations
- Claude Code Integration - Skills, slash commands, and prompts for AI-assisted workflows
Quick Start
Installation
Option 1: System-wide installation (recommended)
Install globally so jira-tool is available anywhere:
# Clone the repository
git clone <repository-url>
cd jira-tool
# Build and install
./scripts/build_and_install.sh
# Verify installation
jira-tool --help
Option 2: Development installation
For development or testing:
# Install with uv (recommended)
uv sync
# Run commands
uv run jira-tool --help
See scripts/README.md for more installation options.
Configuration
Run the interactive setup wizard:
jira-tool setup
This will guide you through:
- Entering your Jira URL
- Your email address
- API token (get one at https://id.atlassian.com/manage-profile/security/api-tokens)
- Optional default project
Configuration is saved to ~/.config/jira-tool/config.yaml.
Alternative: Set environment variables in your shell profile:
export JIRA_BASE_URL="https://your-company.atlassian.net"
export JIRA_USERNAME="your-email@example.com"
export JIRA_API_TOKEN="your-api-token"
See Getting Started for detailed setup instructions.
First Commands
# Get issue details
jira-tool get PROJ-123
# Search for issues
jira-tool search "project = PROJ AND status = Open"
# Create a task
jira-tool create --project PROJ --type Task --summary "Fix login bug"
# Export to CSV
jira-tool export --project PROJ --format csv -o tickets.csv
# View your active work
jira-tool export --assignee "me" --status "In Progress"
CLI Commands
| Command | Description |
|---|---|
setup |
Interactive setup wizard |
config |
View and manage configuration |
get |
Get details of a Jira issue |
search |
Search for issues using JQL |
create |
Create a new issue with ADF formatting |
update |
Update issue fields or transition status |
comment |
Add a comment to an issue |
transitions |
Show available status transitions |
epics |
List all epics in a project |
epic-details |
Get epic details with child issues |
export |
Export issues with filtering (JSON, CSV, JSONL) |
analyze |
Analyze workflow state durations |
Examples:
jira-tool get PROJ-123 # Get issue details
jira-tool search "status = 'In Progress'" # Search with JQL
jira-tool create --project PROJ --type Epic --summary "New feature"
jira-tool update PROJ-123 --status "Done" # Transition status
jira-tool export --assignee "me" --format csv # Export your tickets
jira-tool analyze state-durations issues.json # Workflow analysis
See: CLI Reference for all commands and Usage Guide for workflows.
Claude Code Integration
This project includes full Claude Code support with slash commands, skills, and prompts for AI-assisted Jira workflows.
Slash Commands
Available in .claude/commands/ - use with /command-name in Claude Code:
| Command | Description |
|---|---|
/get PROJ-123 |
Get ticket details |
/search "JQL query" |
Search with JQL |
/create --project PROJ ... |
Create an issue |
/update PROJ-123 --status "Done" |
Update an issue |
/comment PROJ-123 "message" |
Add a comment |
/export --project PROJ ... |
Export issues |
/epics --project PROJ |
List epics |
/epic-details PROJ-123 |
Epic with children |
/transitions PROJ-123 |
Show transitions |
Skills
Available in .claude/skills/ - reference guides for Claude:
| Skill | Description |
|---|---|
jira-api |
Jira REST API v3 documentation, endpoints, JQL patterns |
jira-builders |
CLI usage guide and best practices |
build-jira-document-format |
ADF builder patterns with EpicBuilder/IssueBuilder |
work-with-adf |
Atlassian Document Format creation and validation |
Prompts
GitHub Copilot-style prompts in .github/prompts/ for complex workflows:
| Prompt | Description |
|---|---|
jira-ticket-retriever |
Fetch and archive tickets to artifact directories |
jira-task-parser |
Transform tickets into implementation plans |
jira-orchestration-lead |
Coordinate retrieval, parsing, and planning |
Workflow Guide: See .github/instructions/jira-workflow-guide.instructions.md for when to use each prompt.
Python API
The Python API provides JiraClient for all Jira operations, document builders (IssueBuilder, EpicBuilder, JiraDocumentBuilder) for creating ADF-formatted content, and StateDurationAnalyzer for workflow analysis.
Quick example:
from jira_tool import JiraClient, IssueBuilder
# Get issues and create structured content
client = JiraClient()
issue = client.get_issue("PROJ-123")
builder = IssueBuilder(title="New feature", story_points=8)
builder.add_description("Feature description")
builder.add_acceptance_criteria(["Criteria 1", "Criteria 2"])
client.create_issue({
"project": {"key": "PROJ"},
"summary": "New feature",
"issuetype": {"name": "Task"},
"description": builder.build()
})
See: Python API Guide for complete API documentation.
Documentation
Guides
- Getting Started - Quick 5-minute setup and first commands
- Setup Guide - Detailed configuration, API tokens, troubleshooting
- Usage Guide - Common workflows, sprint planning, data export
- Python API Guide - Complete API reference with examples
- Formatting Guide - Create rich ADF content
Reference
- CLI Reference - Complete command documentation
- ADF Reference - Atlassian Document Format structure
Examples
- examples/create_issue_with_proper_formatting.py - IssueBuilder and EpicBuilder examples
Development
Setup Development Environment
# Install dependencies
uv sync
# Run tests
uv run pytest
# Run tests with coverage
uv run pytest --cov=jira_tool
# Format code
uv run black src/ tests/
# Lint code
uv run ruff src/ tests/
# Type check
uv run mypy src/
Project Structure
jira-tool/
├── src/jira_tool/ # Main package
│ ├── client.py # JiraClient API
│ ├── formatter.py # Document builders
│ ├── cli.py # CLI commands
│ └── analysis/ # State analysis
├── .claude/ # Claude Code integration
│ ├── commands/ # Slash commands (/get, /search, etc.)
│ └── skills/ # Reference skills (jira-api, etc.)
├── .github/ # GitHub integration
│ ├── prompts/ # AI prompts for workflows
│ └── instructions/ # Workflow guides
├── docs/ # Documentation
│ ├── guides/ # User guides
│ └── reference/ # API reference
├── examples/ # Example scripts
├── tests/ # Test suite
└── scripts/ # Build and install scripts
Code Quality
The project enforces:
- Black for code formatting
- Ruff for linting
- MyPy for type checking (strict mode)
- Pytest for testing
# Format, lint, and test
uv run black src/ tests/
uv run ruff src/ tests/
uv run pytest
Requirements
- Python 3.11+
- Jira Cloud (REST API v3)
- Valid Jira API token
License
This project is distributed as-is without a specific license.
Support
For issues and questions:
- Check the documentation
- Review the examples
- Create an issue in the repository
Quick Links:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file temet_jira-0.1.0a1.tar.gz.
File metadata
- Download URL: temet_jira-0.1.0a1.tar.gz
- Upload date:
- Size: 296.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27ad54b8c081bf44e976bd8eea17f744b2e9179022894d03502eab5dd88cff7c
|
|
| MD5 |
aafa91bd388b69c60294650095d0518b
|
|
| BLAKE2b-256 |
e04ed0c703e8ac48205ed85cff0f2a985010c9cebc10445ae3d675d8acb2e88f
|
Provenance
The following attestation bundles were made for temet_jira-0.1.0a1.tar.gz:
Publisher:
publish.yml on temet-ai/temet-jira
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
temet_jira-0.1.0a1.tar.gz -
Subject digest:
27ad54b8c081bf44e976bd8eea17f744b2e9179022894d03502eab5dd88cff7c - Sigstore transparency entry: 1518461749
- Sigstore integration time:
-
Permalink:
temet-ai/temet-jira@716d3f57e66c2dc85c6a0a17a64aa72dc54a2505 -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/temet-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@716d3f57e66c2dc85c6a0a17a64aa72dc54a2505 -
Trigger Event:
push
-
Statement type:
File details
Details for the file temet_jira-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: temet_jira-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 69.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cade4adab2efc0c17e2c2442b74e0f0ddbb781c4b3b0e2c2fbc0da6ea794cae
|
|
| MD5 |
caa8d8b37d46129ee3c536f58928e903
|
|
| BLAKE2b-256 |
674c26d4e5f51274e06b500237aacf5d34de66e1994f463cd22fe8eff24a449c
|
Provenance
The following attestation bundles were made for temet_jira-0.1.0a1-py3-none-any.whl:
Publisher:
publish.yml on temet-ai/temet-jira
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
temet_jira-0.1.0a1-py3-none-any.whl -
Subject digest:
0cade4adab2efc0c17e2c2442b74e0f0ddbb781c4b3b0e2c2fbc0da6ea794cae - Sigstore transparency entry: 1518461758
- Sigstore integration time:
-
Permalink:
temet-ai/temet-jira@716d3f57e66c2dc85c6a0a17a64aa72dc54a2505 -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/temet-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@716d3f57e66c2dc85c6a0a17a64aa72dc54a2505 -
Trigger Event:
push
-
Statement type: