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'
Shell Completion
jira supports tab-completion of commands, actions, and options via
argcomplete.
Enabling completion
The recommended approach is per-command registration. Add the appropriate line to your shell startup file:
# bash (~/.bashrc) or zsh (~/.zshrc)
eval "$(register-python-argcomplete jira)"
Then restart your shell (or source the file). Tab-completion works
immediately:
jira <TAB> # -> issue project
jira issue <TAB> # -> assign attach begin ... show update
jira issue show --<TAB> # -> --issue --output --project --verbose
Alternative: global activation
To enable argcomplete for every marker-tagged program at once (instead of per-command), run this once and restart your shell:
activate-global-python-argcomplete
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/__init__.py- Module init: theCONFIG/JIRA_CLIENTglobals and themainconsole-script entry point (main = make_main("cac_jira", "jira", ...))cac_jira/commands/- Command implementations (auto-discovered at runtime)issue/- Issue-related commandsproject/- Project-related commands
cac_jira/core/client.py- Thin wrapper around thejiraPython client
Command discovery, argument parsing, shell completion, and dispatch are all
provided by the shared runner in cac-core
(cac_core.cli.run / make_main); this project only supplies the commands/
tree and its Jira client.
Adding New Commands
- Create a new action module in the appropriate command directory.
- Define a class that inherits from the command's base class, following the
{Command}{Action}naming convention (e.g.commands/issue/create.py→IssueCreate). - 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 shared run() template (from cac-core) catches
errors and maps them to a non-zero exit code, and JiraCommand.handle_exception
renders JIRAErrors using their human-readable Jira message.
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.1.0.tar.gz.
File metadata
- Download URL: cac_jira-1.1.0.tar.gz
- Upload date:
- Size: 119.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63fb45462f34f6a625d97344bfa0664558735d6e4cfc4a67e3c2ece2f2760511
|
|
| MD5 |
6bdbc1163ad5f23eecfca2d3537d875a
|
|
| BLAKE2b-256 |
696533dfa62dd2733ca88346d67d6c109e385c2cc4f8da18ffe4b16a7210e030
|
Provenance
The following attestation bundles were made for cac_jira-1.1.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.1.0.tar.gz -
Subject digest:
63fb45462f34f6a625d97344bfa0664558735d6e4cfc4a67e3c2ece2f2760511 - Sigstore transparency entry: 2213833338
- Sigstore integration time:
-
Permalink:
rpunt/cac-jira@011c69525d667b71d1db32f6396b02ac935f5e35 -
Branch / Tag:
refs/tags/v1.1.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@011c69525d667b71d1db32f6396b02ac935f5e35 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cac_jira-1.1.0-py3-none-any.whl.
File metadata
- Download URL: cac_jira-1.1.0-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4eaf342970b78aeb5ff11b427f2f4f411479129b1ec3e4a8aaad55b9da17019c
|
|
| MD5 |
5b74499ecb21976be2b8085bff5b9975
|
|
| BLAKE2b-256 |
11a49cf424de8b75ff47cb1adbcb48df97cb7e69d3f12a0878a20aa3e6d04a80
|
Provenance
The following attestation bundles were made for cac_jira-1.1.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.1.0-py3-none-any.whl -
Subject digest:
4eaf342970b78aeb5ff11b427f2f4f411479129b1ec3e4a8aaad55b9da17019c - Sigstore transparency entry: 2213833399
- Sigstore integration time:
-
Permalink:
rpunt/cac-jira@011c69525d667b71d1db32f6396b02ac935f5e35 -
Branch / Tag:
refs/tags/v1.1.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@011c69525d667b71d1db32f6396b02ac935f5e35 -
Trigger Event:
release
-
Statement type: