@kud/jira-cli 0.2.0

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +168 -0
  3. package/dist/index.js +1412 -0
  4. package/package.json +49 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Erwann Mest
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,168 @@
1
+ # jira-cli
2
+
3
+ Jira on the command line. Reads issues, comments and **attachments** as plain text, so you can pipe them into anything.
4
+
5
+ Black and white output, `--json` on every read, stable exit codes. No interactive prompts.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install -g @kud/jira-cli
11
+ ```
12
+
13
+ ## Setup
14
+
15
+ Only the token is a secret, so only the token comes from the environment:
16
+
17
+ ```sh
18
+ export ATLASSIAN_API_TOKEN=... # id.atlassian.com/manage-profile/security/api-tokens
19
+ jira init --base-url myorg.atlassian.net --email you@example.com
20
+ ```
21
+
22
+ That writes `~/.config/jira/config.json`. `ATLASSIAN_BASE_URL` and `ATLASSIAN_USER_EMAIL` override it when you need a second instance.
23
+
24
+ ## Attachments
25
+
26
+ The thing most Jira CLIs skip. Attachments are listed with the comment they came from, and text ones print straight to stdout:
27
+
28
+ ```sh
29
+ jira attachment list ABC-123
30
+ # ID FILENAME SIZE TYPE FROM
31
+ # 292542 error.log 22.0KB text/plain comment by Ada Lovelace
32
+ # 292731 screen.png 118KB image/png description
33
+
34
+ jira attachment read ABC-123 error.log | grep -i timeout
35
+ jira attachment get ABC-123 screen.png --output ~/Desktop/
36
+ ```
37
+
38
+ Descriptions and comments render as Markdown, with embedded files named rather than left as opaque ids:
39
+
40
+ ```sh
41
+ jira issue view ABC-123 --comments
42
+ ```
43
+
44
+ ## Using it alongside the Atlassian MCP
45
+
46
+ The Atlassian MCP returns an issue's fields and comments, but **not** the content of its attachments — it can tell you a file is there and nothing more. When the answer to a ticket is inside a screenshot, a log or a CSV, that is the gap this fills:
47
+
48
+ ```sh
49
+ jira attachment list ABC-123 # what is there, and where it came from
50
+ jira attachment read ABC-123 error.log # text, straight to stdout
51
+ jira attachment get ABC-123 shot.png -o /tmp/shot.png # then open or read it
52
+ ```
53
+
54
+ Useful for agents in particular: `get` writes a real file, so an image can then be read and reasoned about rather than skipped.
55
+
56
+ ## Issues
57
+
58
+ ```sh
59
+ jira issue list # yours, most recently updated first
60
+ jira issue list --status 'In Progress'
61
+ jira issue list --project ABC --sprint current
62
+ jira issue view ABC-123
63
+ jira issue transition ABC-123 # list what's available
64
+ jira issue transition ABC-123 'In Review'
65
+ jira issue open ABC-123
66
+ ```
67
+
68
+ Writing:
69
+
70
+ ```sh
71
+ jira issue create -p ABC -t Task -s 'Fix the thing' -b 'Longer **markdown** body'
72
+ jira issue edit ABC-123 --summary 'Better title'
73
+ jira issue assign ABC-123 me # or a name, or 'none'
74
+ jira issue comment add ABC-123 - # body from stdin
75
+ jira issue comment list ABC-123
76
+ jira issue link ABC-1 Blocks ABC-2
77
+ jira issue watch add ABC-123
78
+ jira issue worklog add ABC-123 '2h 30m'
79
+ jira issue history ABC-123
80
+ ```
81
+
82
+ Bodies accept Markdown — paragraphs, headings, lists, fenced code, links and code spans are converted to ADF.
83
+
84
+ ## Projects, boards and sprints
85
+
86
+ ```sh
87
+ jira project list
88
+ jira project versions ABC
89
+ jira project components ABC
90
+ jira project statuses ABC
91
+
92
+ jira board list
93
+ jira board issues 42
94
+ jira board backlog 42
95
+ jira board epics 42
96
+ jira epic ABC-100
97
+
98
+ jira sprint list 42 --state active
99
+ jira sprint issues 1234
100
+ ```
101
+
102
+ ## Knowing what this instance supports
103
+
104
+ ```sh
105
+ jira whoami
106
+ jira meta issuetypes # also: priorities, statuses, resolutions, linktypes
107
+ jira meta labels
108
+ jira meta filters
109
+ jira meta permissions ABC
110
+ jira meta server
111
+ jira count 'project = ABC AND status = Done'
112
+ ```
113
+
114
+ ## Scripting
115
+
116
+ Every read command takes `--json`:
117
+
118
+ ```sh
119
+ jira issue list --mine --json | jq -r '.[].key'
120
+ jira search 'project = ABC AND created >= -7d' --json
121
+ ```
122
+
123
+ Exit codes:
124
+
125
+ | Code | Means |
126
+ | ---- | --------------------------------------- |
127
+ | `0` | success |
128
+ | `1` | Jira rejected the request, or bad usage |
129
+ | `2` | the environment is not set up |
130
+ | `4` | not authenticated |
131
+
132
+ Colour is disabled automatically when stdout is not a TTY, and when `NO_COLOR` is set.
133
+
134
+ ## Custom fields
135
+
136
+ Jira instances differ. Find yours, then name the ones you care about:
137
+
138
+ ```sh
139
+ jira fields points
140
+ # ID NAME TYPE
141
+ # customfield_10784 Offshore Story Points string
142
+ # customfield_10002 Story Points number
143
+ ```
144
+
145
+ ```json
146
+ {
147
+ "baseUrl": "myorg.atlassian.net",
148
+ "email": "you@example.com",
149
+ "customFields": [{ "id": "customfield_10002", "label": "points" }],
150
+ "sprintField": "customfield_10020",
151
+ "defaultProject": "ABC"
152
+ }
153
+ ```
154
+
155
+ Named fields are requested on every search and shown in `issue view`.
156
+
157
+ ## Escape hatch
158
+
159
+ Anything not covered:
160
+
161
+ ```sh
162
+ jira api /rest/api/3/myself
163
+ jira api /rest/api/3/issue/ABC-123/watchers -X POST -d '{"accountId":"..."}'
164
+ ```
165
+
166
+ ## Licence
167
+
168
+ MIT