CLI and tools to automate JIRA issue creation
Project description
jira-creator
Create JIRA issues (stories, bugs, epics, spikes, tasks) quickly using standardized templates and optional AI-enhanced descriptions
⚡ Quick Start (Under 30 Seconds)
1. Create your config file and enable autocomplete
mkdir -p ~/.bashrc.d
cat <<EOF > ~/.bashrc.d/jira.sh
export JIRA_JPAT="your_jira_personal_access_token"
export JIRA_AI_PROVIDER=openai
export JIRA_AI_API_KEY=sk-...
export JIRA_AI_MODEL="gpt-4o-mini"
export JIRA_URL="https://issues.redhat.com"
export JIRA_PROJECT_KEY="AAP"
export JIRA_AFFECTS_VERSION="aa-latest"
export JIRA_COMPONENT_NAME="analytics-hcc-service"
export JIRA_PRIORITY="Normal"
export JIRA_BOARD_ID=21125
export JIRA_EPIC_FIELD="customfield_12311140"
export JIRA_ACCEPTANCE_CRITERIA_FIELD="customfield_12315940"
export JIRA_BLOCKED_FIELD="customfield_12316543"
export JIRA_BLOCKED_REASON_FIELD="customfield_12316544"
export JIRA_STORY_POINTS_FIELD="customfield_12310243"
export JIRA_SPRINT_FIELD="customfield_12310940"
export JIRA_VOSK_MODEL="/home/daoneill/.vosk/vosk-model-small-en-us-0.15"
# Enable autocomplete
eval "$(/usr/local/bin/rh-issue --_completion | sed 's/rh_jira.py/rh-issue/')"
EOF
source ~/.bashrc.d/jira.sh
2. Link the command-line tool wrapper
chmod +x jira_creator/rh-issue-wrapper.sh
sudo ln -s $(pwd)/jira_creator/rh-issue-wrapper.sh /usr/local/bin/rh-issue
3. Run it
rh-issue create story "Improve onboarding experience"
🧪 Usage & Commands
Commands
add-comment
Add a comment to a Jira issue.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).-t, --text: Comment text. If not provided, an editor will open for you to enter your comment.--no-ai: Skip AI text improvement.
-
Example:
jira-cli add-comment PROJ-123 -t "This issue is resolved."
add-flag
Add a flag to a Jira issue.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).
-
Example:
jira-cli add-flag PROJ-123
add-to-sprint
Add an issue to a sprint and optionally assign it.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).sprint_name(required): The name of the sprint.-a, --assignee: Assignee username. Defaults to the current user if not specified.
-
Example:
jira-cli add-to-sprint PROJ-123 "Sprint 1" -a username
assign
Assign a Jira issue to a user.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).assignee(required): Username of the person to assign the issue to.
-
Example:
jira-cli assign PROJ-123 username
block
Mark a Jira issue as blocked.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).reason(required): The reason for blocking the issue.
-
Example:
jira-cli block PROJ-123 "Waiting for approval."
blocked
List blocked issues.
-
Arguments:
--user: Filter by assignee (username).--project: Project key override.--component: Component name override.
-
Example:
jira-cli blocked --user username
change
Change issue type.
-
Arguments:
issue_key(required): The Jira issue id/key.new_type(required): New issue type.
-
Example:
jira-cli change PROJ-123 "Bug"
clone-issue
Create a copy of an existing Jira issue.
-
Arguments:
issue_key(required): The Jira issue key to clone (e.g.,PROJ-123).-s, --summary-suffix: Suffix to add to the cloned issue summary (default: ' (Clone)').
-
Example:
jira-cli clone-issue PROJ-123 -s " (Clone)"
create-issue
Create a new Jira issue using templates.
-
Arguments:
type(required): Type of issue to create.summary(required): Issue summary/title.-e, --edit: Open editor to modify the description before submission.--dry-run: Preview the issue without creating it.--no-ai: Skip AI text improvement.
-
Example:
jira-cli create-issue "Task" "Implement new feature" --edit
edit-issue
Edit a Jira issue description.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).--no-ai: Skip AI text improvement.--lint: Run interactive linting on the description.
-
Example:
jira-cli edit-issue PROJ-123 --lint
list-issues
List issues from a project with various filters.
-
Arguments:
-p, --project: Project key (uses theJIRA_PROJECT_KEYenv if not specified).-c, --component: Filter by component name.-a, --assignee: Filter by assignee username.-r, --reporter: Filter by reporter username.-s, --status: Filter by status.--summary: Filter by summary containing text.--blocked: Show only blocked issues.--unblocked: Show only unblocked issues.--sort: Sort by field(s), comma-separated.-m, --max-results: Maximum number of results (default: 100).
-
Example:
jira-cli list-issues -p "PROJ" --status "Open" --sort "priority"
open-issue
Open a Jira issue in your web browser.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).
-
Example:
jira-cli open-issue PROJ-123
remove-flag
Remove a flag from a Jira issue.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).
-
Example:
jira-cli remove-flag PROJ-123
search
Search for issues using JQL (Jira Query Language).
-
Arguments:
jql(required): JQL query string (e.g.,'project = ABC AND status = Open').-m, --max-results: Maximum number of results to return (default: 50).
-
Example:
jira-cli search "project = ABC AND status = Open" -m 20
set-acceptance-criteria
Set the acceptance criteria for a Jira issue.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).acceptance_criteria(required): The acceptance criteria (can be multiple words).
-
Example:
jira-cli set-acceptance-criteria PROJ-123 "Acceptance criteria must be met."
set-priority
Set the priority of a Jira issue.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).priority(required): Priority level to set.
-
Example:
jira-cli set-priority PROJ-123 "High"
set-status
Set the status of a Jira issue.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).status(required): The status to transition to.
-
Example:
jira-cli set-status PROJ-123 "In Progress"
set-summary
Set the summary of a Jira issue.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).summary(required): The new summary text for the issue.
-
Example:
jira-cli set-summary PROJ-123 "Updated issue summary"
unassign
Remove the assignee from a Jira issue.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).
-
Example:
jira-cli unassign PROJ-123
unblock
Remove the blocked status from a Jira issue.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).
-
Example:
jira-cli unblock PROJ-123
validate-issue
Validate a Jira issue against quality standards.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).--no-ai: Skip AI-powered quality checks.--no-cache: Skip cache and force fresh validation.
-
Example:
jira-cli validate-issue PROJ-123 --no-ai
view-issue
View detailed information about a Jira issue.
-
Arguments:
issue_key(required): The Jira issue key (e.g.,PROJ-123).
-
Example:
jira-cli view-issue PROJ-123
view-user
View detailed information about a Jira user.
-
Arguments:
account_id(required): The user's account ID or username.
-
Example:
jira-cli view-user username
vote-story-points
Vote on story points.
-
Arguments:
issue_key(required): The Jira issue id/key.points(required): Number of story points to vote.
-
Example:
jira-cli vote-story-points PROJ-123 5
🤖 AI Provider Support
You can integrate different AI providers by setting the JIRA_AI_PROVIDER environment variable.
For model management, you can use Ollama:
mkdir -vp ~/.ollama-models
docker run -d -v ~/.ollama-models:/root/.ollama -p 11434:11434 ollama/ollama
✅ OpenAI
export JIRA_AI_PROVIDER=openai
export JIRA_AI_API_KEY=sk-...
export JIRA_AI_MODEL=gpt-4 # Optional
🦙 LLama3
docker compose exec ollama ollama pull LLama3
export JIRA_AI_PROVIDER=LLama3
export JIRA_AI_URL=http://localhost:11434/api/generate
export JIRA_AI_MODEL=LLama3
🧠 DeepSeek
docker compose exec ollama ollama pull deepseek-r1:7b
export JIRA_AI_PROVIDER=deepseek
export JIRA_AI_URL=http://localhost:11434/api/generate
export JIRA_AI_MODEL=http://localhost:11434/api/generate
🖥 GPT4All
pip install gpt4all
export JIRA_AI_PROVIDER=gpt4all
# WIP
🧪 InstructLab
export JIRA_AI_PROVIDER=instructlab
export JIRA_AI_URL=http://localhost:11434/api/generate
export JIRA_AI_MODEL=instructlab
# WIP
🧠 BART
export JIRA_AI_PROVIDER=bart
export JIRA_AI_URL=http://localhost:8000/bart
# WIP
🪫 Noop
export JIRA_AI_PROVIDER=noop
🛠 Dev Setup
pipenv install --dev
Testing & Linting
make test
make lint
make super-lint
⚙️ How It Works
- Loads field definitions from
.tmplfiles located in thetemplates/directory - Uses
TemplateLoaderto generate Markdown descriptions - Optionally applies AI cleanup for improved readability and structure
- Sends issues to JIRA via REST API (or performs dry runs)
📜 License
This project is licensed under the Apache License
Project details
Release history Release notifications | RSS feed
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 jira_creator-1.0.9.tar.gz.
File metadata
- Download URL: jira_creator-1.0.9.tar.gz
- Upload date:
- Size: 120.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b418aac408a8ec951362207bfd7fe839300c78435fcd97c7d22caceae8beb83
|
|
| MD5 |
527b3443e61e97c2dd641007c911e3bb
|
|
| BLAKE2b-256 |
b94cae71eee121f29f87a65292d83225bfe7629b713077da49cd520bcd93fc61
|
File details
Details for the file jira_creator-1.0.9-py3-none-any.whl.
File metadata
- Download URL: jira_creator-1.0.9-py3-none-any.whl
- Upload date:
- Size: 204.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a02abc0cba8b9b47109df5ec5228af028a24be726f7218f68ad2a1c4b182d68
|
|
| MD5 |
9808298cdc1bcc77bcbae6b1dc00c50a
|
|
| BLAKE2b-256 |
e60b5d4c7044ae43db2688b8c7641f826bb9efc8fb68db4b33dd8c4ec498848b
|