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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cac_jira-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 db2b617650b6e38a1bbd5a39abf088dabe3f6a26b1ce4f9558b7b600793dc09c
MD5 990e638831a0827c56cd35386ff9603a
BLAKE2b-256 aaef5b521e30dea8d2e06d895cc54409569fac6b5574c804fa3c34dee7a3ffdf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cac_jira-0.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d7df606aa8a80040dfe0cf3bdb3636f58c3b6e798eb731b890f85101ffa8c90
MD5 074c2248e0445ff030ecc6f5922fd706
BLAKE2b-256 a30e1980f7acd68479cf38f0e0d2a6228ecbd14fa20541f1fe4ae467da93f00f

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