jiradc-cli 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +143 -0
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# jiradc-cli
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g jiradc-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
export JIRA_URL="https://jira.example.com" # Base URL of your Jira instance
|
|
15
|
+
export JIRA_TOKEN="your-personal-access-token" # HTTP Access Token from Jira
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Commands
|
|
19
|
+
|
|
20
|
+
All commands output JSON. Add `--pretty` to pretty-print.
|
|
21
|
+
|
|
22
|
+
### issue
|
|
23
|
+
|
|
24
|
+
| Command | Description |
|
|
25
|
+
|---------|-------------|
|
|
26
|
+
| `jiradc issue get <key>` | Get issue details (`--fields` to select, `--expand` for changelog/transitions) |
|
|
27
|
+
| `jiradc issue search <jql>` | Search issues with JQL |
|
|
28
|
+
| `jiradc issue create` | Create an issue (`--project`, `--type`, `--summary`, `--description`, `--custom-fields`) |
|
|
29
|
+
| `jiradc issue update <key>` | Update an issue |
|
|
30
|
+
| `jiradc issue delete <key>` | Delete an issue |
|
|
31
|
+
| `jiradc issue transition <key> <transitionId>` | Transition issue to a new status |
|
|
32
|
+
| `jiradc issue transitions <key>` | List available transitions |
|
|
33
|
+
| `jiradc issue comment <key>` | Add a comment |
|
|
34
|
+
| `jiradc issue comment-edit <key> <commentId>` | Edit a comment |
|
|
35
|
+
| `jiradc issue link <key> <targetKey>` | Link two issues (`--type` link type name) |
|
|
36
|
+
| `jiradc issue unlink <linkId>` | Remove a link |
|
|
37
|
+
| `jiradc issue link-types` | List available link types |
|
|
38
|
+
| `jiradc issue link-epic <epicKey> <issueKey>` | Link an issue to an epic |
|
|
39
|
+
| `jiradc issue worklog <key>` | Add a work log entry |
|
|
40
|
+
| `jiradc issue get-worklog <key>` | Get work log entries |
|
|
41
|
+
| `jiradc issue changelog <key>` | Get issue changelog |
|
|
42
|
+
| `jiradc issue batch-changelog` | Get changelog for multiple issues (`--keys`) |
|
|
43
|
+
| `jiradc issue clone <key>` | Clone an issue with subtasks |
|
|
44
|
+
| `jiradc issue batch-create` | Create multiple issues from JSON |
|
|
45
|
+
| `jiradc issue dev-status <key>` | Get development status (branches, PRs, commits) |
|
|
46
|
+
|
|
47
|
+
#### issue attachment
|
|
48
|
+
|
|
49
|
+
| Command | Description |
|
|
50
|
+
|---------|-------------|
|
|
51
|
+
| `jiradc issue attachment list <key>` | List attachments |
|
|
52
|
+
| `jiradc issue attachment download <key> <attachmentId>` | Download a specific attachment |
|
|
53
|
+
| `jiradc issue attachment download-all <key>` | Download all attachments |
|
|
54
|
+
| `jiradc issue attachment upload <key> <files...>` | Upload files |
|
|
55
|
+
| `jiradc issue attachment delete <attachmentId>` | Delete an attachment |
|
|
56
|
+
|
|
57
|
+
### project
|
|
58
|
+
|
|
59
|
+
| Command | Description |
|
|
60
|
+
|---------|-------------|
|
|
61
|
+
| `jiradc project list` | List projects |
|
|
62
|
+
| `jiradc project versions <key>` | List versions for a project |
|
|
63
|
+
| `jiradc project components <key>` | List components for a project |
|
|
64
|
+
|
|
65
|
+
### board
|
|
66
|
+
|
|
67
|
+
| Command | Description |
|
|
68
|
+
|---------|-------------|
|
|
69
|
+
| `jiradc board list` | List boards (`--project`, `--type`: scrum/kanban/simple, `--name`) |
|
|
70
|
+
| `jiradc board issues <boardId>` | Get issues on a board |
|
|
71
|
+
|
|
72
|
+
### sprint
|
|
73
|
+
|
|
74
|
+
| Command | Description |
|
|
75
|
+
|---------|-------------|
|
|
76
|
+
| `jiradc sprint list <boardId>` | List sprints (`--state`: future/active/closed) |
|
|
77
|
+
| `jiradc sprint issues <boardId> <sprintId>` | Get issues in a sprint |
|
|
78
|
+
| `jiradc sprint create <boardId>` | Create a sprint |
|
|
79
|
+
| `jiradc sprint update <sprintId>` | Update a sprint |
|
|
80
|
+
|
|
81
|
+
### field
|
|
82
|
+
|
|
83
|
+
| Command | Description |
|
|
84
|
+
|---------|-------------|
|
|
85
|
+
| `jiradc field search` | Search for fields (`--query`, `--type`: custom/system) |
|
|
86
|
+
| `jiradc field options <fieldKey>` | Get allowed values for a field (`--project`, `--issue-type`) |
|
|
87
|
+
|
|
88
|
+
### user
|
|
89
|
+
|
|
90
|
+
| Command | Description |
|
|
91
|
+
|---------|-------------|
|
|
92
|
+
| `jiradc user me` | Get current user info |
|
|
93
|
+
|
|
94
|
+
## Pagination
|
|
95
|
+
|
|
96
|
+
Search and list commands accept `--max` to control page size (Jira DC caps at 50 for agile endpoints). Responses include `nextPage` — pass it back as `--start-at` to fetch the next page. When `nextPage` is `null`, there are no more results.
|
|
97
|
+
|
|
98
|
+
## Examples
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Get an issue with default fields
|
|
102
|
+
jiradc issue get AI-123
|
|
103
|
+
|
|
104
|
+
# Get an issue with specific fields
|
|
105
|
+
jiradc issue get AI-123 --fields summary,status,assignee,customfield_10100
|
|
106
|
+
|
|
107
|
+
# Search with JQL
|
|
108
|
+
jiradc issue search 'project = AI AND status = "In Development" ORDER BY updated DESC'
|
|
109
|
+
|
|
110
|
+
# Create an issue
|
|
111
|
+
jiradc issue create --project AI --type Task --summary "Implement feature X" --description "Details here"
|
|
112
|
+
|
|
113
|
+
# Create with custom fields
|
|
114
|
+
jiradc issue create --project AI --type Story --summary "User login" --custom-fields '{"customfield_10100": "value"}'
|
|
115
|
+
|
|
116
|
+
# Transition an issue (find transition ID first)
|
|
117
|
+
jiradc issue transitions AI-123
|
|
118
|
+
jiradc issue transition AI-123 31
|
|
119
|
+
|
|
120
|
+
# Add a comment
|
|
121
|
+
jiradc issue comment AI-123 --body "Fixed in commit abc123"
|
|
122
|
+
|
|
123
|
+
# Link two issues
|
|
124
|
+
jiradc issue link AI-123 AI-456 --type "blocks"
|
|
125
|
+
|
|
126
|
+
# Log work
|
|
127
|
+
jiradc issue worklog AI-123 --time "2h 30m" --comment "Code review"
|
|
128
|
+
|
|
129
|
+
# List active sprints
|
|
130
|
+
jiradc sprint list 42 --state active
|
|
131
|
+
|
|
132
|
+
# Get sprint issues
|
|
133
|
+
jiradc sprint issues 42 100
|
|
134
|
+
|
|
135
|
+
# Find a custom field key
|
|
136
|
+
jiradc field search --query "story points"
|
|
137
|
+
|
|
138
|
+
# Clone an issue with subtasks
|
|
139
|
+
jiradc issue clone AI-123
|
|
140
|
+
|
|
141
|
+
# Get dev status (linked branches, PRs)
|
|
142
|
+
jiradc issue dev-status AI-123
|
|
143
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jiradc-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"publish": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"commander": "^13.1.0",
|
|
15
|
-
"jira-data-center-client": "1.0.
|
|
15
|
+
"jira-data-center-client": "1.0.30"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/node": "24.10.4",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"tsx": "^4.19.2",
|
|
23
23
|
"typescript": "^5.7.2",
|
|
24
24
|
"vitest": "^4.0.16",
|
|
25
|
-
"config-
|
|
26
|
-
"config-
|
|
25
|
+
"config-eslint": "0.0.0",
|
|
26
|
+
"config-typescript": "0.0.0"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=22.0.0"
|