Skip to main content

Modular Jira CLI tool for issue listing, filtering, and management

Project description

Jira CLI

Modular, class-based Jira command-line tool for issue listing, searching, and management.

Features

  • List issues by project with optional filtering (status, assignee, labels)
  • Search with custom JQL queries
  • Find issues by text in summary/description
  • View issue details with comments
  • Assign issues to users
  • Transition issues to new status
  • Multiple output formats: table, JSON, CSV, Markdown
  • dotenv support: Load credentials from .env or local.env in CWD or parent directories

Installation

Via uv (local development)

cd colenio/tools/jira-cli
uv sync
uv run jira-cli list --help

Via uvx (remote/published)

uvx colenio-jira-cli list --project PROJ

Setup

Create a .env or local.env file in your working directory:

# Required
JIRA_URL=https://company.atlassian.net
JIRA_EMAIL=user@example.com
JIRA_API_TOKEN=your_api_token_here

# Optional
JIRA_PROJECT=PROJ      # Default project for list/find
JIRA_PROJECT_KEY=PROJ  # Backward-compatible fallback

Getting your Jira API Token

  1. Log in to your Jira Cloud instance
  2. Go to Account Settings → Security
  3. Click "Create API Token"
  4. Copy the token and save to .env

Usage

List issues

# Basic listing
jira-cli list --project PROJ

# With filters
jira-cli list --project PROJ --status "In Progress" --assignee "john@example.com"

# With custom JQL
jira-cli list --project PROJ --jql 'priority = High'

# Different output formats
jira-cli list --project PROJ --format json
jira-cli list --project PROJ --format csv > issues.csv
jira-cli list --project PROJ --format md

Search with JQL

jira-cli search 'project = PROJ AND status = "To Do" AND assignee is EMPTY'
jira-cli search 'text ~ "urgent"' --format json

Find by text

jira-cli find --project PROJ "database migration"
jira-cli find --project PROJ "performance issue" --max-results 100

View issue details

jira-cli view PROJ-123
jira-cli view PROJ-456 --comments

Assign issue

jira-cli assign PROJ-789 john@example.com

Transition issue

jira-cli transition PROJ-999 "In Progress" --comment "Starting work"
jira-cli transition PROJ-999 "Done"

Architecture

  • client.py: JiraClient class for REST API calls, auth, and endpoints
  • query.py: JiraQuery class for JQL building and search logic
  • render.py: JiraRenderer class for output formatting (table, JSON, CSV, Markdown)
  • models.py: Pydantic models for Jira structures (JiraIssue, JiraSearchResult, IssueRow)
  • dotenv.py: DotEnv class for robust .env/local.env loading
  • cli.py: Click CLI commands (list, search, find, view, assign, transition)

All code uses proper classes, no helper functions. Follows informix-migration patterns.

Development

# Install dev dependencies
uv sync --all-groups

# Run tests
uv run pytest

# Format and lint
uv run black jira_cli
uv run ruff check jira_cli

Distribution

This tool is designed for publishing via uvx (like helmrelease-verifier):

  1. Push to GitHub at colenio/jira-cli
  2. Configure PyPI Trusted Publisher for this repository
  3. Tag with version: git tag v0.1.0 and push tag (git push origin v0.1.0)
  4. GitHub Action .github/workflows/release.yml builds, tests, and publishes to PyPI
  5. Package can be invoked anywhere with: uvx colenio-jira-cli list --project PROJ

PowerShell Integration

Add to $PROFILE (e.g., via dotfiles/aliases.ps1):

function jira-cli {
    uvx colenio-jira-cli @args
}

# Or use directly
alias jira = 'uvx colenio-jira-cli'

Then:

jira list --project PROJ

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colenio_jira_cli-0.1.2.tar.gz (40.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colenio_jira_cli-0.1.2-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file colenio_jira_cli-0.1.2.tar.gz.

File metadata

  • Download URL: colenio_jira_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 40.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for colenio_jira_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6e99ab1fa1b89fe85329a12511712aa44a91dcfd6d7e4b98e2746eeae73ba299
MD5 3df3a4e1141df9d959d307829346987e
BLAKE2b-256 c5fd4225c75fd595e8b004b4139baf3ca403ecaa08d04ef3fa18cc5d8d07b893

See more details on using hashes here.

Provenance

The following attestation bundles were made for colenio_jira_cli-0.1.2.tar.gz:

Publisher: release.yml on colenio/jira-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colenio_jira_cli-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for colenio_jira_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b1fdd1321903a79f9e8bfa5c9ab02d3e43578ff61c32e9edab22fa4191dd5e82
MD5 175edf21fe91f924c1a5f84c3d613cf7
BLAKE2b-256 320a00666b62e5f539b4dcf2fe424de5aa3e7aaf38f198919ba69711b2874dbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for colenio_jira_cli-0.1.2-py3-none-any.whl:

Publisher: release.yml on colenio/jira-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page