Create JIRA issues (stories, bugs, epics, spikes, tasks) quickly using standardized templates and optional AI-enhanced descriptions
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
chmod +x jira_creator/rh-issue-wrapper.sh
sudo ln -s $(pwd)/jira_creator/rh-issue-wrapper.sh /usr/local/bin/rh-issue
rh-issue create story "Improve onboarding experience"
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 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 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 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
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."
List blocked issues.
-
Arguments:
--user
: Filter by assignee (username).--project
: Project key override.--component
: Component name override.
-
Example:
jira-cli blocked --user username
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"
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 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 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 from a project with various filters.
-
Arguments:
-p, --project
: Project key (uses theJIRA_PROJECT_KEY
env 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 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 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 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 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 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 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 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"
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
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 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 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 detailed information about a Jira user.
-
Arguments:
account_id
(required): The user's account ID or username.
-
Example:
jira-cli view-user username
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
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
export JIRA_AI_PROVIDER=openai
export JIRA_AI_API_KEY=sk-...
export JIRA_AI_MODEL=gpt-4 # Optional
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
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
pip install gpt4all
export JIRA_AI_PROVIDER=gpt4all
# WIP
export JIRA_AI_PROVIDER=instructlab
export JIRA_AI_URL=http://localhost:11434/api/generate
export JIRA_AI_MODEL=instructlab
# WIP
export JIRA_AI_PROVIDER=bart
export JIRA_AI_URL=http://localhost:8000/bart
# WIP
export JIRA_AI_PROVIDER=noop
pipenv install --dev
make test
make lint
make super-lint
- Loads field definitions from
.tmpl
files located in thetemplates/
directory - Uses
TemplateLoader
to generate Markdown descriptions - Optionally applies AI cleanup for improved readability and structure
- Sends issues to JIRA via REST API (or performs dry runs)
This project is licensed under the Apache License