A command-line tool for Jira workflow management. Quickly select issues, track your current work, and generate consistent branch names.
- Interactive issue selection - Browse and select from your assigned "In Progress" issues
- Direct issue selection - Select any issue by its key
- Current issue tracking - Keep track of what you're working on
- Branch name generation - Generate consistent, readable branch names from issue keys and summaries
- XDG-compliant configuration - Config stored in
~/.config/jcli/
git clone https://github.com/dk/jcli.git
cd jcli
go build -o jcli .
sudo mv jcli /usr/local/bin/go install github.com/dk/jcli@latestjcli uses a YAML configuration file located at ~/.config/jcli/config.yaml.
- Set your Jira credentials:
jcli config credentialsThis will interactively prompt for:
- Jira URL (e.g.,
https://yourcompany.atlassian.net) - Email address
- API token
- Set your default project:
jcli config project YOUR_PROJECT_KEY- Optionally, change the default status filter:
jcli config status "In Progress"- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Click "Create API token"
- Give it a name (e.g., "jcli")
- Copy the generated token
jira:
url: https://yourcompany.atlassian.net
email: your.email@company.com
api_token: your_api_token_here
defaults:
project: PROJ
status: In ProgressYou can override the API token using an environment variable:
export JIRA_API_TOKEN=your_api_token_hereInteractive selection - Shows your assigned issues with "In Progress" status:
jcli issue selectUse arrow keys to navigate and Enter to select.
Direct selection - Select a specific issue by key:
jcli issue select PROJ-123Display the currently selected issue:
jcli issue currentOutput:
Current issue: PROJ-123
Summary: Implement user authentication
Selected at: 2024-01-15 10:30:00
Generate a branch name for the current issue:
jcli issue branchOutput:
PROJ-123-implement-user-authentication-847291
The branch name format is: <ISSUE-KEY>-<normalized-summary>-<random-number>
- Issue key is preserved in original case (uppercase)
- Summary is converted to lowercase
- Special characters are replaced with hyphens
- Multiple hyphens are collapsed
- Long summaries are truncated at 50 characters
- Random number (0-999999) ensures uniqueness
Combine with git to create and checkout a new branch:
git checkout -b $(jcli issue branch)| Command | Description |
|---|---|
jcli help |
Show help message |
jcli version |
Print version information |
| Command | Description |
|---|---|
jcli issue select |
Interactive selection from assigned "In Progress" issues |
jcli issue select <KEY> |
Select a specific issue by key |
jcli issue current |
Show currently selected issue |
jcli issue branch |
Generate branch name for current issue |
| Command | Description |
|---|---|
jcli config credentials |
Set Jira credentials interactively |
jcli config project <KEY> |
Set default project key |
jcli config status <NAME> |
Set default status filter |
# One-time setup
jcli config credentials
jcli config project MYPROJ
# Daily workflow
jcli issue select # Pick an issue to work on
jcli issue current # Verify selection
git checkout -b $(jcli issue branch) # Create feature branch
# Or select and branch in one go
jcli issue select MYPROJ-456
git checkout -b $(jcli issue branch)| File | Location | Purpose |
|---|---|---|
| Config | ~/.config/jcli/config.yaml |
Jira credentials and defaults |
| State | ~/.local/state/jcli/state.json |
Current issue tracking |
- Go 1.21 or later
make buildmake testmake lintMIT