jiradc-cli
v1.0.36
Published
Command-line interface for [Jira Data Center](https://developer.atlassian.com/server/jira/platform/rest-apis/). 35 commands across 6 domains — issues, projects, boards, sprints, fields, and users.
Readme
jiradc-cli
Command-line interface for Jira Data Center. 35 commands across 6 domains — issues, projects, boards, sprints, fields, and users.
Install
npm install -g jiradc-cliSetup
export JIRA_URL="https://jira.example.com" # Base URL of your Jira instance
export JIRA_TOKEN="your-personal-access-token" # HTTP Access Token from JiraBreaking changes in this release
field optionsis removed. It called a Jira 9 endpoint and returned 404 for every field on Jira 8.x. Jira scopes a custom field's options to a context, so there is no context-free replacement — useissue createmeta --project <key> --type <name>(create screen),issue editmeta <key>(edit screen), orissue transitions <key>(transition screen).issue transitionsno longer reportsrequiredon screen fields. Jira reports field-configuration requiredness there, which cannot see the workflow validator that actually gates the transition, so it returnedfalsefor fields that then rejected the transition. Supply everything in a transition'sfieldsblock. (requiredfromcreatemeta/editmetareflects field configuration and is reliable.)issue get/issue searchreturn issue-picker custom fields as a bare key string (or an array of keys) instead of the whole nested issue.fields.customfield_NNNNN.keybecomesfields.customfield_NNNNN.issue create --custom-fieldsis now--fields, matchingissue update. The old name still works as a deprecated alias.- Argument mistakes now exit 2/3/6 (
usage/not_found/auth) instead of 1. issue transitionsnow returns a bare JSON array of transitions (previously wrapped in{ transitions: [...] }). Each transition is reduced to{ id, name, to, fields? }— verbose fields liketo.iconUrl,to.statusCategory,isGlobal,isInitial,isConditional,hasScreenare stripped.component listnow requires--project <key>instead of a positional<projectKey>argument.issue link-epicis now variadic on the issue argument:link-epic <issueKey...> --epic <epicKey>. Single-issue calls keep working.
Commands
All commands output JSON. Add --pretty to pretty-print.
issue
| Command | Description |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| jiradc issue get <key> | Get issue details (--fields to select, --expand for changelog/transitions) |
| jiradc issue search <jql> | Search issues with JQL |
| jiradc issue create | Create an issue (--project, --type, --summary, --description, --custom-fields) |
| jiradc issue update <key> | Update an issue (--summary, --description, --priority, --assignee, --labels, --components, --fix-versions, or --fields JSON) |
| jiradc issue delete <key> | Delete an issue |
| jiradc issue assign <key> <user> | Assign issue (user can be a username, me, or none to unassign) |
| jiradc issue transition <key> | Transition issue to a new status (--to accepts ID or status name, --comment to add a note) |
| jiradc issue transitions <key> | List available transitions (with any fields their screens require) |
| jiradc issue createmeta | Fields a new issue accepts, with allowed values (--project, --type) |
| jiradc issue editmeta <key> | Fields an existing issue's edit screen accepts, with allowed values |
| jiradc issue comment add <key> | Add a comment (--body) |
| jiradc issue comment edit <key> | Edit a comment (--id, --body) |
| jiradc issue comment delete <key> | Delete a comment (--id) |
| jiradc issue link <key> <targetKey> | Link two issues (--type link type name) |
| jiradc issue unlink <linkId> | Remove a link |
| jiradc issue link-types | List available link types |
| jiradc issue link-epic <keys...> | Link one or more issues to an epic (--epic <epicKey>) |
| jiradc issue worklog add <key> | Add a work log entry (--time, --comment, --started) |
| jiradc issue worklog list <key> | Get work log entries |
| jiradc issue worklog edit <key> | Update a work log entry (--id, --time, --comment, --started, --adjust-estimate, --new-estimate) |
| jiradc issue worklog delete <key> | Delete a work log entry (--id, --adjust-estimate, --new-estimate, --increase-by) |
| jiradc issue changelog <key> | Get issue changelog |
| jiradc issue batch-changelog | Get changelog for multiple issues (--keys) |
| jiradc issue clone <key> | Clone an issue with subtasks |
| jiradc issue batch-create | Create multiple issues from JSON |
| jiradc issue dev-status <key> | Get development status (branches, PRs, commits) |
issue attachment
| Command | Description |
| ------------------------------------------------------- | ------------------------------ |
| jiradc issue attachment list <key> | List attachments |
| jiradc issue attachment download <key> <attachmentId> | Download a specific attachment |
| jiradc issue attachment download-all <key> | Download all attachments |
| jiradc issue attachment upload <key> <files...> | Upload files |
| jiradc issue attachment delete <attachmentId> | Delete an attachment |
project
| Command | Description |
| ------------------------------- | --------------------------- |
| jiradc project list | List projects |
| jiradc project versions <key> | List versions for a project |
component
| Command | Description |
| ----------------------------------- | --------------------------------------------------------------------- |
| jiradc component list | List components for a project (--project <key>) |
| jiradc component get <id> | Get a component by ID |
| jiradc component create | Create a component (--project, --name, --description, --lead) |
| jiradc component update <id> | Update a component |
| jiradc component issue-count <id> | Get the number of issues using a component |
board
| Command | Description |
| ------------------------------- | ------------------------------------------------------------------ |
| jiradc board list | List boards (--project, --type: scrum/kanban/simple, --name) |
| jiradc board issues <boardId> | Get issues on a board |
sprint
| Command | Description |
| ------------------------------------------- | --------------------------------------------------- |
| jiradc sprint list <boardId> | List sprints (--state: future/active/closed) |
| jiradc sprint issues <boardId> <sprintId> | Get issues in a sprint |
| jiradc sprint create <boardId> | Create a sprint |
| jiradc sprint update <sprintId> | Update a sprint |
| jiradc sprint delete <sprintId> | Delete a sprint (returns its issues to the backlog) |
field
| Command | Description |
| ------------------------------- | ----------------------------------------------------------------------------- |
| jiradc field search <keyword> | Search for fields by name or ID (returns name + type, not allowed values) |
user
| Command | Description |
| ---------------- | --------------------- |
| jiradc user me | Get current user info |
Pagination
Search and list commands accept --limit to control page size (Jira DC caps at 50 for agile endpoints). Responses include nextPage — pass it back as --start to fetch the next page. When nextPage is null, there are no more results.
Examples
# Get an issue with default fields
jiradc issue get PROJ-123
# Get an issue with specific fields
jiradc issue get PROJ-123 --fields summary,status,assignee,customfield_10100
# Search with JQL
jiradc issue search 'project = AI AND status = "In Development" ORDER BY updated DESC'
# Create an issue
jiradc issue create --project PROJ --type Task --summary "Implement feature X" --description "Details here"
# Create with custom fields
jiradc issue create --project PROJ --type Story --summary "User login" --custom-fields '{"customfield_10100": "value"}'
# Transition by ID or by status name
jiradc issue transitions PROJ-123
jiradc issue transition PROJ-123 --to 31
jiradc issue transition PROJ-123 --to "In Review" --comment "Ready for review"
# Assign
jiradc issue assign PROJ-123 me
jiradc issue assign PROJ-123 jsmith
jiradc issue assign PROJ-123 none
# Update with shortcuts (instead of --fields JSON)
jiradc issue update PROJ-123 --summary "New title" --priority High
jiradc issue update PROJ-123 --assignee me
jiradc issue update PROJ-123 --labels backend,urgent # set mode
jiradc issue update PROJ-123 --labels +urgent,-backend # mutate mode
jiradc issue update PROJ-123 --components +Frontend
jiradc issue update PROJ-123 --fix-versions 1.0,2.0
# Link multiple issues to an epic in one call
jiradc issue link-epic PROJ-456 PROJ-457 PROJ-458 --epic PROJ-100
# Add a comment
jiradc issue comment add PROJ-123 --body "Fixed in commit abc123"
# Delete a comment
jiradc issue comment delete PROJ-123 --id 12345
# Link two issues
jiradc issue link PROJ-123 PROJ-456 --type "blocks"
# Log work
jiradc issue worklog add PROJ-123 --time "2h 30m" --comment "Code review"
# List active sprints
jiradc sprint list 42 --state active
# Get sprint issues
jiradc sprint issues 42 100
# Find a custom field key
jiradc field search --query "story points"
# Clone an issue with subtasks
jiradc issue clone PROJ-123
# Get dev status (linked branches, PRs)
jiradc issue dev-status PROJ-123
# List components for a project
jiradc component list --project PROJ