# jira-commands

> **jirac** is an independent CLI tool for working with Jira from the terminal.
> It is **not** affiliated with, endorsed by, or sponsored by Atlassian.

`jira-commands` is the CLI crate in the `mulhamna/jira-commands` workspace. It ships the `jirac` binary, interactive issue workflows, bulk operations, and the TUI.

[![CI](https://github.com/mulhamna/jira-commands/actions/workflows/ci.yml/badge.svg)](https://github.com/mulhamna/jira-commands/actions/workflows/ci.yml)
[![Crates.io](https://img.shields.io/crates/v/jira-commands.svg)](https://crates.io/crates/jira-commands)
[![License: MIT%20OR%20Apache--2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](../../LICENSE)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/12742/badge)](https://www.bestpractices.dev/projects/12742)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)

## Install

```bash
# Cargo (crates.io)
cargo install jira-commands       # jirac CLI
cargo install jira-mcp            # jirac-mcp MCP server (optional)

# From a local checkout
cargo install --path crates/jira --locked
cargo install --path crates/jira-mcp --locked
```

Or use one of the workspace-level install options from the root README:
- Homebrew (`brew tap mulhamna/tap && brew install jira-commands jira-mcp`)
- npm (`npm install -g @mulham28/jirac` / `@mulham28/jirac-mcp`)
- Scoop (`scoop bucket add mulhamna https://github.com/mulhamna/scoop-bucket && scoop install mulhamna/jirac mulhamna/jirac-mcp`)
- shell installer on macOS/Linux
- PowerShell installer on Windows
- GitHub Releases archives and packaged binaries

## What this crate provides

- `jirac` primary CLI binary
- issue listing, viewing, create, update, transition, delete, clone
- worklog, attachment, bulk-update, bulk-transition, archive, batch, and bulk-create flows
- interactive TUI flows, including split master-detail, saved JQL picker, theme picker, searchable assignee picker, project-scoped component picker, server summary, config summary, and saved column settings — fully usable with mouse (click rows, tabs, picker options; scroll wheel; click outside popup to dismiss)
- raw Jira REST API passthrough
- shared config with multi-profile auth support

## Quick start

```bash
jirac auth login
jirac auth profiles
jirac issue list
jirac issue view MYPROJ-123
jirac issue view MYPROJ-123 --versions
jirac MYPROJ-123 --web
jirac issue versions -p MYPROJ --version "v1.2.0"
jirac issue create -p MYPROJ
jirac issue render --input desc.md
jirac tui -p MYPROJ
jirac mcp doctor
jirac mcp install
```

## Config and auth

The CLI reads the shared Jira config from:
- `~/.config/jira/config.toml`
- `JIRA_PROFILE`
- `JIRA_URL`
- `JIRA_EMAIL`
- `JIRA_TOKEN`

Typical multi-profile flow:

```bash
jirac auth login --profile work-cloud
jirac auth login --profile client-dc
jirac auth profiles
jirac auth use client-dc
```

## Migration note

The supported CLI binary is `jirac`.

If you still have old scripts, aliases, or local wrappers that call `jira`, update them to use `jirac` before upgrading.

## Claude Code plugin

If you want Claude Code integration, install the plugin from the main workspace docs:

```text
/plugin marketplace add mulhamna/jira-commands
/plugin install jira@jira-commands
```

The plugin/package is the right discovery surface for ClawHub or Claude Code marketplace flows. Keep the `jirac` binary installation on the normal CLI distribution paths.

Useful skills include:
- `/jira:list-issues`
- `/jira:view-issue`
- `/jira:create-issue`
- `/jira:update-issue`
- `/jira:transition`
- `/jira:fields`
- `/jira:comment`
- `/jira:worklog`
- `/jira:bulk-transition`
- `/jira:attach`
- `/jira:jql`
- `/jira:api`

## MCP helper

If you also installed `jirac-mcp`, `jirac` can register the MCP server into supported clients for you.

Interactive (recommended):

```bash
jirac mcp doctor          # check prereqs only
jirac mcp install         # verifies prereqs, then shows a client picker
```

Non-interactive (pass `--client` for scripts):

```bash
jirac mcp install --client claude-code
jirac mcp install --client claude-desktop
jirac mcp install --client cursor
jirac mcp install --client gemini-cli
jirac mcp install --client codex
jirac mcp install --client opencode
jirac mcp install --client generic-json
```

Notes:
- `claude-code` writes user-level `~/.claude.json` (`mcpServers`); the project-scoped `<repo>/.mcp.json` is not written by this helper
- `claude-desktop` writes the platform support directory (`claude_desktop_config.json`) on macOS/Windows/Linux
- `gemini-cli` and `codex` delegate to their native CLI `mcp add` flows; `opencode` writes `~/.config/opencode/opencode.jsonc` directly
- `generic-json` prints a portable JSON snippet instead of writing a file
- `cursor` remains provisional until verified in a real Cursor install

## More docs

See the root README and `INSTALL.md` for full installation, TUI shortcuts, MCP usage, release artifacts, and examples.
