Skip to content

kevinchwong/pyjira

Repository files navigation

Jira CLI Tool

A command-line interface for interacting with Jira, focusing on efficient issue management and querying.

Features

  • List issues with comprehensive filtering options
  • View detailed issue information
  • Search using advanced JQL queries
  • View assigned issues
  • Support for custom fields and rich formatting

Installation

# Clone the repository
git clone https://github.com/kevinchwong/pyjira.git
cd jira-cli

# Run setup script
chmod +x setup.sh
./setup.sh

Configuration

After running setup.sh, edit .env file with your Jira credentials:

JIRA_SERVER=https://your-domain.atlassian.net
[email protected]
JIRA_API_TOKEN=your-api-token  # Generate from Atlassian account settings
JIRA_DEFAULT_PROJECT=PROJ      # Optional: Your default project

Usage

# Activate virtual environment
poetry shell

# List your assigned issues
pyjira my

# List issues with filters
pyjira list \
  --project PROJ \
  --status "In Progress" \
  --type Task \
  --priority High

# View issue details
pyjira view PROJ-123

# Advanced filtering
pyjira list \
  --project PROJ \
  --status "In Progress" \
  --type Bug \
  --priority High \
  --labels "urgent,backend" \
  --created-after 2024-01-01 \
  --updated-after 2024-01-01 \
  --component "Backend" \
  --reporter "currentUser()" \
  --assignee "currentUser()" \
  --query "NOT resolution = Done"

Available Commands

List Command

Filter issues using multiple criteria:

  • --project: Project key
  • --status: Issue status
  • --type: Issue type
  • --priority: Priority level
  • --assignee: Assignee (use "currentUser()")
  • --reporter: Reporter
  • --component: Component name
  • --labels: Comma-separated labels
  • --created-after: Creation date (YYYY-MM-DD)
  • --updated-after: Last update date (YYYY-MM-DD)
  • --query: Additional JQL

View Command

pyjira view ISSUE-KEY

My Issues

pyjira my [--status STATUS]

Development

# Install dependencies
poetry install

# Run unit tests
poetry run pytest tests/test_cli.py -v

# Run E2E tests (requires .env)
poetry run pytest tests/test_e2e.py -v

# Run all tests with coverage
poetry run pytest -v

Author

Kevin Wong ([email protected])

License

MIT

About

Python Jira CLI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published