jirab me jirab search "assignee = currentUser() AND statusCategory != done ORDER BY updated DESC" --limit 10 echo"project = DEMO AND status = Open" | jirab search - jirab issue DEMO-28645 jirab issue DEMO-28645 --comments --comments-limit 20 jirab comments DEMO-28645 --limit 20 --format csv jirab worklog DEMO-28645 --limit 20 --format json jirab transitions DEMO-28645 jirab attachments DEMO-28645 jirab attachment 42301 --out ./downloads/ jirab doctor --format json
开发
npm test# 运行测试套件(65 个测试) npm run typecheck # tsc --noEmit npm run build # 编译到 dist/
许可证
ISC
jirab — read-only Jira CLI for humans and AI agents
A small, dependency-light command-line client for Jira Server / Data Center. Read-only by design: no create, update, transition, or delete commands. Built to be called by humans in a terminal and by AI agents in a pipeline.
Install
npm install -g .
Requires Node.js >= 20.12 (uses native fetch and node:util.parseArgs).
Commands
Command
Description
search <jql|->
Run a JQL search (pass JQL, - for stdin, or --file)
issue <KEY>
Show one issue (alias: get)
comments <KEY>
List comments on an issue
worklog <KEY>
List worklogs (time tracking) on an issue
transitions <KEY>
List available workflow transitions
attachments <KEY>
List attachments on an issue
attachment <ID>
Download one attachment by id
me
Show the Jira account in use
doctor
Check config, connectivity and authentication
config path
Print the config file in use
completion <shell>
Print shell completion script (bash, zsh, fish)
Configuration
jirab resolves credentials from four sources, in priority order:
Environment variables — JIRAB_BASE_URL, JIRAB_TOKEN (or JIRAB_USERNAME + JIRAB_PASSWORD). Legacy JIRA_* variables are accepted as fallback.
Local config file — ./jirab.config.json in the current directory.
~/.zcode/cli/config.json — reads mcp.servers.jira.env as a fallback.
%APPDATA%\dock\config.json — reads the MCP app named “Jira” as a last resort.
.env in the current directory is loaded automatically.
Config file format
See jirab.config.example.json. The file is a flat JSON object:
tokenEnv / usernameEnv / passwordEnv reference environment variable names rather than embedding secrets in the file.
No profiles support
jirab deliberately does not support a profiles key in the config file. If you need multiple environments, use --config <path> or set JIRAB_CONFIG to point at a different config file per environment.
Config discovery order
--config <path> > $JIRAB_CONFIG > ./jirab.config.json > user config
User config location:
Windows: %APPDATA%\jirab\config.json
Linux/macOS: $XDG_CONFIG_HOME/jirab/config.json or ~/.config/jirab/config.json
Output formats
--format auto|table|json|csv|tsv (default: auto)
auto — table when stdout is a TTY, JSON otherwise.
table — aligned columns for list commands, labeled detail for single issues.
csv / tsv — delimited output, only valid for list commands.
--json-compact — emit JSON as a single line with no indentation. Saves tokens when the output is consumed by AI agents in a pipeline. Only affects --format json.
JSON is the recommended format for AI agent consumption.
Search expansion
--expand <fields> — pass Jira expand parameters to the search endpoint. Example: jirab search "key = DEMO-1" --expand changelog returns issue change history.
Audit log rotation
audit.maxBytes (default: 10 MB, 0 = never rotate) — when the audit log exceeds this size, it is rotated to <path>.1 before the next record is written, keeping a single generation of history.
Exit codes
Code
Meaning
0
Success
1
Jira request failed
2
Usage / config error
3
Connection error
4
Timeout
130
Interrupted (SIGINT)
Examples
jirab me jirab search "assignee = currentUser() AND statusCategory != done ORDER BY updated DESC" --limit 10 echo"project = DEMO AND status = Open" | jirab search - jirab issue DEMO-28645 jirab issue DEMO-28645 --comments --comments-limit 20 jirab comments DEMO-28645 --limit 20 --format csv jirab worklog DEMO-28645 --limit 20 --format json jirab transitions DEMO-28645 jirab attachments DEMO-28645 jirab attachment 42301 --out ./downloads/ jirab doctor --format json
Development
npm test# run the test suite (65 tests) npm run typecheck # tsc --noEmit npm run build # compile to dist/