Jira CLI
A command-line interface for interacting with Jira.
This project uses UV for dependency management.
Installation
pip install cac-jira
Authentication
On first-run, you'll be prompted for a Jira API token; generate one here. This will be stored in your system credential store (e.g. Keychain on Mac OS) in an item called cac-jira.
Configuration
On first-run, a configuration file will be generated at ~/.config/cac_jira/config.yaml. In this file you'll need to replace the values of server and username with appropriate values.
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 (includes a traceback for unexpected errors)--output [table|json]: Control output format (default table)--help: Show command help
Commands exit 0 on success and non-zero on failure (invalid input, a
not-found issue/project, or a Jira API error), so they compose safely in
scripts. --help and argument parsing work offline and do not require
credentials — the Jira connection is only established when a command runs.
Examples
Issue Commands
List issues in a project:
jira issue list --project PROJ
List only issues assigned to you (and optionally include completed ones):
jira issue list --project PROJ --mine
jira issue list --project PROJ --done # include issues that are resolved
Create a new issue:
jira issue create --project PROJ --type Task --title "Fix login bug" --description "Users can't log in"
Create a new issue of a type that requires custom fields:
#
# This assumes the name of the custom fields is "Custom Field One" and "Custom Field Two";
# the field name will be swapped to lower-case, and spaces replaced with underscores
#
jira issue create --project PROJ --type Custom\ Issue\ Type --title "Issue Title" --description "Issue description" \
--field custom_field_one custom_field_value \
--field custom_field_two custom_field_value
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 block --issue ISSUE_KEY # Mark as blocked
jira issue close --issue ISSUE_KEY # Mark as complete
Delete an issue (prompts for confirmation; pass --force to skip it, e.g. in scripts):
jira issue delete --issue ISSUE_KEY
jira issue delete --issue ISSUE_KEY --force
Project Commands
List all projects:
jira project list
Filter projects by name or key (case-insensitive, partial match):
jira project list --name "Core"
jira project list --key COR
Show a single project by its key:
jira project show PROJ
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
uv sync
# Activate the venv
source .venv/bin/activate
# Run tests
uv run pytest
Project Structure
cac_jira/commands/- Command implementationsissue/- Issue-related commandsproject/- Project-related commands
cac_jira/cli/- CLI entry point and argument parsing
Adding New Commands
- Create a new action module in the appropriate command directory.
- Define a class that inherits from the command's base class.
- Implement
define_arguments()andexecute()methods.
execute() contains the command's logic and returns an exit code (0/None
for success, non-zero for validation failures). It does not need to wrap Jira
calls in try/except: the base class's run() wrapper catches client errors,
logs them, and maps them to a non-zero exit code.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cac_jira-1.0.0.tar.gz.
File metadata
- Download URL: cac_jira-1.0.0.tar.gz
- Upload date:
- Size: 118.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3162f07860a8042ad3fe336cfac7953962772caa54ef85877710301bbe432ee
|
|
| MD5 |
8c20b7bf320b95bd35d0a389427f3162
|
|
| BLAKE2b-256 |
53fb9d4daec807e9ddde1355d8c1cf67448d801dff3f27962f1110ffdb3e69e4
|
Provenance
The following attestation bundles were made for cac_jira-1.0.0.tar.gz:
Publisher:
create_artifacts_and_publish.yaml on rpunt/cac-jira
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cac_jira-1.0.0.tar.gz -
Subject digest:
d3162f07860a8042ad3fe336cfac7953962772caa54ef85877710301bbe432ee - Sigstore transparency entry: 2175175946
- Sigstore integration time:
-
Permalink:
rpunt/cac-jira@67c6a8411eeb7c5618d1b4cad1141b6460cf9990 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/rpunt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create_artifacts_and_publish.yaml@67c6a8411eeb7c5618d1b4cad1141b6460cf9990 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cac_jira-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cac_jira-1.0.0-py3-none-any.whl
- Upload date:
- Size: 33.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72f471761574af3bdd3c3cc7399c1071d0b159f2beb30ab4b3b7c2ab1532f51b
|
|
| MD5 |
67f4a321a775c2a6ed42fa6f048bc63e
|
|
| BLAKE2b-256 |
cff19a97fa52fd66219cab2b22ce306e9e6ced3dc1d047652d39e430ec88e5f6
|
Provenance
The following attestation bundles were made for cac_jira-1.0.0-py3-none-any.whl:
Publisher:
create_artifacts_and_publish.yaml on rpunt/cac-jira
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cac_jira-1.0.0-py3-none-any.whl -
Subject digest:
72f471761574af3bdd3c3cc7399c1071d0b159f2beb30ab4b3b7c2ab1532f51b - Sigstore transparency entry: 2175176078
- Sigstore integration time:
-
Permalink:
rpunt/cac-jira@67c6a8411eeb7c5618d1b4cad1141b6460cf9990 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/rpunt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create_artifacts_and_publish.yaml@67c6a8411eeb7c5618d1b4cad1141b6460cf9990 -
Trigger Event:
release
-
Statement type: