Skip to main content

A command-line interface for interacting with Jira

Project description

Jira CLI

A command-line interface for interacting with Jira.

Installation

This project uses Poetry for dependency management.

Steps to Install

pip install cac-jira

Configuration

Create a configuration file at ~/.config/cac_jira/config.yaml:

server: https://your-jira-instance.atlassian.net
project: YOUR_PROJECT_KEY  # Optional default project
username: your.email@example.com

Usage

The Jira CLI follows a command-action pattern for all operations:

jira <command> <action> [options]

Global Options

  • --verbose: Enable debug output
  • --output [table|json]: Control output format (default table)
  • --help: Show command help

Examples

Issue Commands

List issues in a project:

jira issue list --project PROJ

List issues with additional filtering:

jira issue list --project PROJ

Create a new issue:

jira issue create --project PROJ --type Task --title "Fix login bug" --description "Users can't log in"

Create and assign to yourself:

jira issue create --project PROJ --type Bug --title "Server crash" --assign

Create and immediately start work:

jira issue create --project PROJ --type Story --title "Add login feature" --begin

Add an issue to an epic:

jira issue create --project PROJ --type Task --title "Subtask" --epic PROJ-100

Label an issue:

jira issue label --issue ISSUE_KEY --labels label1,label2

Transition an issue:

jira issue begin --issue ISSUE_KEY    # Start work
jira issue close --issue ISSUE_KEY    # Mark as complete

Project Commands

List all projects:

jira project list

Show a project:

jira project show --name PROJ-123

Advanced Examples

Update an issue's title or description:

jira issue update --issue ISSUE_KEY --title "New issue title" --description "new issue description"

Add a comment to an issue:

jira issue comment --issue ISSUE_KEY --comment "This is a comment."

List all issue IDs matching a label:

jira issue list --output json | jq -r '.[] | select(.Labels | contains("production")) | .ID'

Development

Setup Development Environment

# Install dependencies including dev dependencies
poetry install

# Run tests
poetry run pytest

Please note that tests are still WIP

Project Structure

  • cac_jira/commands/ - Command implementations
    • issue/ - Issue-related commands
    • project/ - Project-related commands
  • cac_jira/cli/ - CLI entry point and argument parsing

Adding New Commands

  1. Create a new action module in the appropriate command directory.
  2. Define a class that inherits from the command's base class.
  3. Implement define_arguments() and execute() methods.

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

cac_jira-0.3.3.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

cac_jira-0.3.3-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file cac_jira-0.3.3.tar.gz.

File metadata

  • Download URL: cac_jira-0.3.3.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.4.0

File hashes

Hashes for cac_jira-0.3.3.tar.gz
Algorithm Hash digest
SHA256 dfe0bd65de9083a93c10167924202b4a841bddd5092b7a9c1a398a01d0d18d41
MD5 4ef4d9cfe7f76b91e464a6e558a7ba15
BLAKE2b-256 da6e8fc568cef1439d105a16a19ef1f59a8224665581e7d662675e24bb980408

See more details on using hashes here.

File details

Details for the file cac_jira-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: cac_jira-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.4.0

File hashes

Hashes for cac_jira-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8ab6490ed2e1d3def6a2778b7ba1814091fb2301dc00e5f9db109a8773fc340c
MD5 2cc21c2e4842928db48666c58067bcf1
BLAKE2b-256 b9bddab166a47d1b64e6bc24d29cf943036ea514ceb0fe843485f5efe335ff1b

See more details on using hashes here.

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