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.2.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.2-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cac_jira-0.3.2.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.2.tar.gz
Algorithm Hash digest
SHA256 2d164e5556a3c4e2ff69c793b37847a11d3b57938beba51f668a8653e2dd947c
MD5 a756e7a772631fa93d01147a4a5f234e
BLAKE2b-256 7d3df93caedc88cc72cf1a21fde244cb0a47ef070d087ff260068e80301929c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cac_jira-0.3.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a9ec7325f1ce6b7d40c2a2752486f19d6bb1fc38f36f7a0c1f08fcd7074497f
MD5 e80f91e75dc29e764cc2ee2b7f474a72
BLAKE2b-256 4501a9897c750d123c7e09a29fda5a106f7d4c77180107a02083d446f91a4d7e

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