jira-pilot 2.0.5 → 2.1.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 (34) hide show
  1. package/README.md +207 -158
  2. package/bin/{jira.js → jira.ts} +10 -1
  3. package/dist/bin/jira.js +64 -0
  4. package/package.json +14 -7
  5. package/src/commands/ai-actions/{plan.js → plan.ts} +9 -9
  6. package/src/commands/ai-actions/{review.js → review.ts} +2 -2
  7. package/src/commands/ai-actions/{standup.js → standup.ts} +4 -4
  8. package/src/commands/{ai.js → ai.ts} +11 -11
  9. package/src/commands/{board.js → board.ts} +5 -5
  10. package/src/commands/bulk.ts +230 -0
  11. package/src/commands/{config.js → config.ts} +57 -8
  12. package/src/commands/dashboard.ts +222 -0
  13. package/src/commands/filter.ts +84 -0
  14. package/src/commands/{git.js → git.ts} +4 -4
  15. package/src/commands/issue-attach.ts +44 -0
  16. package/src/commands/issue-pr.ts +87 -0
  17. package/src/commands/issue-worklog.ts +90 -0
  18. package/src/commands/{issue.js → issue.ts} +348 -57
  19. package/src/commands/{mcp.js → mcp.ts} +2 -2
  20. package/src/commands/{project.js → project.ts} +5 -5
  21. package/src/commands/{sprint.js → sprint.ts} +125 -9
  22. package/src/server/{mcp-server.js → mcp-server.ts} +235 -8
  23. package/src/services/{ai-service.js → ai-service.ts} +16 -16
  24. package/src/services/{api-service.js → api-service.ts} +33 -9
  25. package/src/services/config-service.ts +21 -0
  26. package/src/types.ts +68 -0
  27. package/src/utils/{adf-parser.js → adf-parser.ts} +12 -12
  28. package/src/utils/{config-store.js → config-store.ts} +18 -5
  29. package/src/utils/{config.js → config.ts} +12 -8
  30. package/src/utils/{error-handler.js → error-handler.ts} +2 -1
  31. package/src/utils/{text-to-adf.js → text-to-adf.ts} +1 -1
  32. package/src/utils/{validators.js → validators.ts} +4 -4
  33. package/src/commands/bulk.js +0 -108
  34. package/src/commands/dashboard.js +0 -90
package/README.md CHANGED
@@ -1,11 +1,16 @@
1
1
  # Jira Pilot ✈️
2
2
 
3
+ [![CI](https://github.com/Aarul5/jira-pilot/actions/workflows/ci.yml/badge.svg)](https://github.com/Aarul5/jira-pilot/actions/workflows/ci.yml)
4
+ [![NPM Version](https://img.shields.io/npm/v/jira-pilot.svg)](https://www.npmjs.com/package/jira-pilot)
5
+ [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
6
+ [![Snyk Security](https://snyk.io/test/github/Aarul5/jira-pilot/badge.svg)](https://snyk.io/test/github/Aarul5/jira-pilot)
7
+
3
8
  **The AI-Powered Jira CLI and MCP Server for Humans and Agents.**
4
9
 
5
10
  `jira-pilot` is a next-generation CLI that combines traditional developer tools with modern AI capabilities.
6
11
 
7
12
  - **For Humans:** A beautiful, interactive CLI to manage issues, sprints, boards, and code. Now with **AI Code Reviews**, **Epic Planning**, **Daily Standups**, and **Natural Language JQL**.
8
- - **For Agents:** A fully compliant **Model Context Protocol (MCP)** server with 8 tools that lets AI assistants (like Claude Desktop or Gemini) interact with your Jira instance safely.
13
+ - **For Agents:** A fully compliant **Model Context Protocol (MCP)** server with **14 tools** that lets AI assistants (like Claude Desktop, Cursor, or Gemini) interact with your Jira instance safely.
9
14
 
10
15
  ---
11
16
 
@@ -15,28 +20,22 @@
15
20
  | Feature | Description |
16
21
  |---------|-------------|
17
22
  | **Issue Management** | Create, edit, view, list, transition, assign, and comment on issues |
18
- | **Power Tools** | Bulk transition, issue linking, watching, and quick search |
23
+ | **Work & Time** | **New:** Log work (`2h 30m`), manage sprints (start/complete), and subtasks |
24
+ | **Developer Tools** | **New:** Open PRs, save local filters, git branch integration |
25
+ | **Power Tools** | **New:** Bulk assign, bulk label, bulk transition matching JQL |
26
+ | **Advanced Data** | **New:** Upload attachments, manage custom fields by alias |
27
+ | **AI Copilot** | Summarize, draft descriptions, suggest actions, review code, plan epics, standup reports |
19
28
  | **Interactive Wizards** | Step-by-step prompts with `enquirer` — no flags required |
20
- | **Board & Sprint Management** | List boards, view active sprint issues |
21
- | **Git Integration** | Create feature branches from issues with smart naming |
22
- | **AI Copilot** | **Pro:** Code review, epic breakdown (plan), standups.<br>**Standard:** Summarize, draft, suggest, NL JQL. |
23
29
  | **Rich Visualization** | Dashboard overview, spinners, and formatted output |
24
30
  | **Export** | Output to JSON or Markdown files, pipeable JSON output |
25
31
 
26
32
  ### 🤖 Agentic Features (MCP)
27
33
  | Feature | Description |
28
34
  |---------|-------------|
29
- | **8 MCP Tools** | list_issues, get_issue, create_issue, transition_issue, assign_issue, add_comment, list_projects, list_sprints |
35
+ | **14 MCP Tools** | list_issues, get_issue, create_issue, update_issue, transition_issue, assign_issue, add_comment, add_worklog, create_subtask, add_attachment, search_users, myself, list_projects, list_sprints |
30
36
  | **LLM-Optimized** | Clean, structured JSON responses for efficient token usage |
31
37
  | **Stdio Transport** | Standard MCP stdio server — works with any MCP client |
32
38
 
33
- ### 🧠 Multi-Provider AI
34
- | Provider | Model |
35
- |----------|-------|
36
- | **OpenAI** | GPT-4o |
37
- | **Google Gemini** | gemini-2.0-flash |
38
- | **Anthropic** | claude-sonnet (claude-sonnet-4-20250514) |
39
-
40
39
  ---
41
40
 
42
41
  ## 🚀 Installation
@@ -70,39 +69,79 @@ You will be prompted for:
70
69
  5. **AI Provider** — Choose between `openai`, `gemini`, or `anthropic`
71
70
  6. **AI API Key** — Your API key for the selected provider
72
71
 
73
- ### View / Clear Configuration
72
+ ### Profiles & Management
73
+ Manage credentials for multiple environments (e.g., Work vs. Personal, Prod vs. Dev).
74
+
74
75
  ```bash
75
- jira config view # Show current configuration (keys are masked)
76
- jira config clear # Remove all stored credentials
76
+ jira config view # Show current configuration (keys are masked)
77
+ jira config save work # Save current creds as profile 'work'
78
+ jira config use personal # Switch to profile 'personal'
79
+ jira config profiles # List all saved profiles
80
+ jira config delete-profile work
81
+ jira config clear # Remove all stored credentials
77
82
  ```
78
83
 
79
- ### Config Profiles
80
- Manage credentials for multiple environments (e.g., Work vs. Personal, Prod vs. Dev).
84
+ ### Custom Field Aliases
85
+ Define aliases for custom field IDs to make commands easier:
86
+ ```bash
87
+ jira config field set points customfield_10011
88
+ jira config field list
89
+ ```
90
+
91
+ ---
92
+
93
+ ## ✨ Interactive Experience
94
+
95
+ Jira Pilot is designed to be fully interactive. You don't need to remember complex flags.
96
+
97
+ **Just run the command, and we'll guide you:**
81
98
 
99
+ 1. **Selection**: Use arrow keys `↑` `↓` to navigate lists (Projects, Issue Types, Priorities).
100
+ 2. **Filtering**: Start typing to filter long lists (e.g., finding a specific assignee).
101
+ 3. **Wizards**: Complex flows like creating an issue are broken down into simple steps.
102
+ 4. **Confirmation**: Destructive actions prompt for confirmation (y/N).
103
+
104
+ Example:
82
105
  ```bash
83
- jira config save work # Save current creds as profile 'work'
84
- jira config use personal # Switch to profile 'personal'
85
- jira config profiles # List all saved profiles
86
- jira config delete-profile work
106
+ jira issue create
107
+ ? Select Project: PROJ - My Project
108
+ ? Select Issue Type: Bug
109
+ ? Summary: Login page crashes
110
+ ? Priority: High
111
+ ? Assignee: Me
87
112
  ```
88
113
 
89
- > **Note:** Credentials are stored securely using a custom `ConfigStore` in your system's config directory.
114
+ ---
115
+
116
+ ## 📊 My Dashboard
117
+
118
+ Start your day with a high-level overview of what's on your plate.
119
+
120
+ ```bash
121
+ jira dashboard
122
+ ```
123
+
124
+ **What you'll see:**
125
+ * **👋 Welcome Message**: Personalized greeting.
126
+ * **🔥 High Priority**: Issues assigned to you that need immediate attention.
127
+ * **📋 Recent Activity**: Your recently viewed or updated issues.
128
+ * **🚀 Sprint Status**: (If applicable) Active sprint progress.
90
129
 
91
130
  ---
92
131
 
93
- ## 📖 Usage
132
+ ## 📖 Usage Guide
94
133
 
95
134
  ### 📋 Issue Management
96
135
 
97
136
  #### List Issues
98
137
  ```bash
99
- # List issues assigned to you in active sprints
138
+ # List issues assigned to you in active sprints (interactive)
100
139
  jira issue list
101
140
 
102
141
  # List with custom JQL
103
142
  jira issue list --jql "project = PROJ AND priority = High"
104
143
 
105
- # Filter by project, assignee, or status
144
+ # Filter by project, assignee, or status via flags
106
145
  jira issue list --project PROJ --assignee "john.doe" --status "In Progress"
107
146
 
108
147
  # Limit results
@@ -126,41 +165,36 @@ jira issue search "login bug"
126
165
  jira issue search "error 500" --project PROJ
127
166
  ```
128
167
 
129
- #### Dashboard Overview
130
- Get a high-level view of your work:
131
- ```bash
132
- jira dashboard # Shows your open issues (by priority) and recent activity
133
- ```
134
-
135
168
  #### View Issue Details
136
169
  ```bash
137
170
  jira issue view PROJ-123
138
171
  ```
139
- Displays: summary, status, priority, assignee, description, and recent comments.
172
+ Displays: summary, status, priority, assignee, description, components, labels, dates, versions, and recent comments.
140
173
 
141
174
  #### Create Issue
142
175
  ```bash
143
176
  # Interactive wizard (recommended)
144
177
  jira issue create
145
178
 
146
- # Non-interactive with flags
179
+ # Non-interactive with flags for speed
147
180
  jira issue create -p PROJ -s "Fix login bug"
148
181
  jira issue create -p PROJ -t Bug -s "Crash on save" --priority High
149
182
  jira issue create -p PROJ -t Story -s "Add dark mode" -d "Users want a dark theme" -a me
150
- jira issue create -p PROJ -s "New feature" -a me
151
183
 
152
- # Edit Issue
153
- jira issue edit PROJ-123 -s "New Summary" --priority High
154
- jira issue edit PROJ-123 # Interactive field picker
184
+ # With Custom Fields (using Alias or ID)
185
+ jira issue create -p PROJ -s "Story" --custom "points=5" --custom "customfield_10022=DevOps"
155
186
  ```
156
187
 
157
- **Interactive Wizard Steps:**
158
- 1. **Select Project** — Choose from your accessible projects
159
- 2. **Select Issue Type** — Bug, Story, Task, Epic, etc.
160
- 3. **Enter Summary** — Required issue title
161
- 4. **Enter Description** — Optional, converted to Jira ADF format
162
- 5. **Select Priority** — High, Medium, Low, etc.
163
- 6. **Assign** Myself, Unassigned, or search by name/email
188
+ #### Edit Issue
189
+ ```bash
190
+ # Interactive Field Picker
191
+ jira issue edit PROJ-123
192
+
193
+ # Quick Edits
194
+ jira issue edit PROJ-123 -s "New Summary" --priority High
195
+ jira issue edit PROJ-123 -d "New description"
196
+ jira issue edit PROJ-123 --custom "points=8"
197
+ ```
164
198
 
165
199
  #### Transition Issue Status
166
200
  ```bash
@@ -172,7 +206,7 @@ jira issue transition PROJ-123 --status "In Progress"
172
206
  jira issue transition PROJ-123 -s Done
173
207
  ```
174
208
 
175
- #### Assign / Reassign Issue
209
+ #### Assign / Reassign
176
210
  ```bash
177
211
  # Interactive — choose Myself, Unassign, or Search
178
212
  jira issue assign PROJ-123
@@ -191,75 +225,146 @@ jira issue comment PROJ-123
191
225
  jira issue comment PROJ-123 -m "Fixed in latest build"
192
226
  ```
193
227
 
194
- #### Link, Watch, & Bulk
228
+ #### Other Actions
195
229
  ```bash
196
230
  # Link Issues
197
- jira issue link PROJ-123 PROJ-456 # Link two issues (interactive type)
198
231
  jira issue link PROJ-123 PROJ-456 -t Blocks
199
232
 
200
233
  # Watchers
201
- jira issue watch PROJ-123 # Start watching
202
- jira issue unwatch PROJ-123 # Stop watching
234
+ jira issue watch PROJ-123
235
+ jira issue unwatch PROJ-123
203
236
 
204
- # Bulk Transition
205
- jira bulk transition -j "project = PROJ AND status = Validated" -s Closed
237
+ # Attachments
238
+ jira issue attach PROJ-123 ./logs/server.log
206
239
  ```
207
240
 
208
241
  ---
209
242
 
210
- ### 📂 Projects & Boards
243
+ ### ⏱️ Work & Time
211
244
 
212
- #### List Projects
245
+ #### Worklogs
246
+ Track time naturally against issues.
213
247
  ```bash
214
- jira project list
248
+ # Add worklog
249
+ jira issue worklog add PROJ-123 2h "Researching API"
250
+ jira issue worklog add PROJ-123 30m "Daily standup"
251
+ jira issue worklog add PROJ-123 1d "Implementation"
252
+
253
+ # List worklogs
254
+ jira issue worklog list PROJ-123
215
255
  ```
216
- Displays: project key, name, lead, and style in a formatted table.
217
256
 
218
- #### List Boards
257
+ #### Subtasks
219
258
  ```bash
220
- # List all boards
221
- jira board list
259
+ # Interactive subtask creation
260
+ jira issue subtask PARENT-123
222
261
 
223
- # Filter by project
224
- jira board list -p PROJ
225
-
226
- # Filter by type
227
- jira board list -t scrum
228
- jira board list -t kanban
262
+ # Quick subtask
263
+ jira issue subtask PARENT-123 -s "Implement backend logic" --assignee me
229
264
  ```
230
265
 
231
- #### List Sprints
266
+ #### Sprint Management
267
+ Manage your Agile boards directly.
232
268
  ```bash
233
- # List active and future sprints
234
- jira sprint list --board 5
235
-
236
- # List by board name
237
- jira sprint list --board "My Team Board"
269
+ # List sprints
270
+ jira sprint list --board "My Board"
271
+ jira sprint list --board 5 --state active
238
272
 
239
273
  # List issues in active sprint
240
- jira sprint issues --board "My Team Board"
241
- jira sprint issues --board 123 --output json
274
+ jira sprint issues --board 5
242
275
 
243
- # Filter by state
244
- jira sprint list --board 5 --state active
245
- jira sprint list --board 5 --state closed
276
+ # Start/Complete Sprints
277
+ jira sprint start 123 --start-date 2023-10-01 --end-date 2023-10-15
278
+ jira sprint complete 123
246
279
  ```
247
280
 
248
281
  ---
249
282
 
250
- ### 🌿 Git Integration
283
+ ### 👨‍💻 Developer Workflow
284
+
285
+ #### Pull Requests
286
+ Open a GitHub PR with title and body pre-filled from the Jira issue.
287
+ ```bash
288
+ jira issue pr PROJ-123
289
+ # Requires 'gh' CLI to be installed and authenticated
290
+ ```
251
291
 
252
- Create feature branches automatically named from the issue summary:
292
+ #### Git Integration
293
+ Create feature branches automatically named from the issue summary.
253
294
  ```bash
254
295
  jira git branch PROJ-123
255
- # Output: Switched to a new branch 'feature/PROJ-123-fix-login-modal'
296
+ # Creates: feature/PROJ-123-issue-summary-slug
297
+ ```
298
+
299
+ #### Saved Filters
300
+ Save complex JQL queries locally for quick access.
301
+ ```bash
302
+ # Save a filter
303
+ jira filter save "My Bugs" "assignee = currentUser() AND issuetype = Bug AND status != Done"
304
+
305
+ # List saved filters
306
+ jira filter list
307
+
308
+ # Use a saved filter
309
+ jira issue list --filter "My Bugs"
310
+
311
+ # Delete a filter
312
+ jira filter delete "My Bugs"
313
+ ```
314
+
315
+ ---
316
+
317
+ ### ⚡ Power Tools (Bulk Actions)
318
+
319
+ Perform actions on multiple issues matching a JQL query. Great for cleanups or mass updates.
320
+
321
+ #### Bulk Transition
322
+ Move multiple issues to a new status.
323
+ ```bash
324
+ jira bulk transition -j "project = PROJ AND status = 'To Do'" -s "In Progress"
325
+ # Optional: -y to skip confirmation
326
+ ```
327
+
328
+ #### Bulk Assign
329
+ Assign a set of issues to a user.
330
+ ```bash
331
+ jira bulk assign -j "priority = High AND assignee is EMPTY" --assignee me
332
+ ```
333
+
334
+ #### Bulk Label
335
+ Add or remove labels from a set of issues.
336
+ ```bash
337
+ jira bulk label -j "fixVersion = 1.0" --add "release-candidate" --remove "wip"
338
+ ```
339
+
340
+ ---
341
+
342
+ ### 📂 Projects & Boards
343
+
344
+ #### List Projects
345
+ ```bash
346
+ jira project list
347
+ # Displays: project key, name, lead, and style in a formatted table.
348
+ ```
349
+
350
+ #### List Boards
351
+ ```bash
352
+ # List all boards
353
+ jira board list
354
+
355
+ # Filter by project
356
+ jira board list -p PROJ
357
+
358
+ # Filter by type
359
+ jira board list -t scrum
360
+ jira board list -t kanban
256
361
  ```
257
362
 
258
363
  ---
259
364
 
260
365
  ### 🤖 AI Features
261
366
 
262
- > **Requires:** AI features must be enabled via `jira config setup` with a valid API key for your chosen provider (OpenAI, Gemini, or Anthropic).
367
+ > **Requires:** AI enabled in `config setup`.
263
368
 
264
369
  #### Summarize an Issue
265
370
  Get an AI-generated TL;DR of long issue threads with comments:
@@ -316,29 +421,34 @@ Outputs: **Yesterday**, **Today**, **Blockers**.
316
421
  jira mcp
317
422
  ```
318
423
 
319
- ### Available MCP Tools
424
+ ### Available MCP Tools (14)
425
+ Everything you need to build a fully autonomous Jira agent:
320
426
 
321
- | Tool | Description | Required Args |
322
- |------|-------------|---------------|
323
- | `jira_list_issues` | Search issues via JQL | `jql` |
324
- | `jira_get_issue` | Get full issue details | `issueKey` |
325
- | `jira_create_issue` | Create a new issue (ADF) | `projectKey`, `summary` |
326
- | `jira_transition_issue` | List or execute transitions | `issueKey` |
327
- | `jira_assign_issue` | Assign/unassign an issue | `issueKey` |
328
- | `jira_add_comment` | Add a comment (ADF) | `issueKey`, `body` |
329
- | `jira_list_projects` | List accessible projects | — |
330
- | `jira_list_sprints` | List sprints for a board | `boardId` |
427
+ 1. `jira_list_issues`: Search via JQL (supports limit)
428
+ 2. `jira_get_issue`: Get full details
429
+ 3. `jira_create_issue`: Create new issue (ADF support)
430
+ 4. `jira_update_issue`: Update summary, desc, priority, assignee
431
+ 5. `jira_transition_issue`: Change status
432
+ 6. `jira_assign_issue`: Change assignee
433
+ 7. `jira_add_comment`: Add comment
434
+ 8. `jira_add_worklog`: Log time
435
+ 9. `jira_create_subtask`: Create subtask
436
+ 10. `jira_add_attachment`: Upload file (absolute path)
437
+ 11. `jira_search_users`: Search for users
438
+ 12. `jira_myself`: Get current user details
439
+ 13. `jira_list_projects`: List accessible projects
440
+ 14. `jira_list_sprints`: List sprints for a board
331
441
 
332
- ### Claude Desktop Configuration
442
+ ### Agent Configuration (Claude Desktop)
333
443
 
334
- Add the following to your `claude_desktop_config.json`:
444
+ Add to your `claude_desktop_config.json`:
335
445
 
336
446
  ```json
337
447
  {
338
448
  "mcpServers": {
339
449
  "jira": {
340
- "command": "node",
341
- "args": ["/absolute/path/to/jira-pilot/bin/jira.js", "mcp"]
450
+ "command": "npx",
451
+ "args": ["-y", "jira-pilot", "mcp"]
342
452
  }
343
453
  }
344
454
  }
@@ -359,34 +469,12 @@ Add to your `.vscode/mcp.json` or equivalent:
359
469
  }
360
470
  ```
361
471
 
362
- ### Example Agent Prompts
363
- Once connected, you can ask your AI assistant things like:
364
- - *"Show me my high-priority Jira issues"*
365
- - *"Create a bug for the login crash on mobile in project PROJ"*
366
- - *"Transition PROJ-123 to In Progress and assign it to me"*
367
- - *"Add a comment to PROJ-456 saying the fix is deployed"*
368
- - *"What sprints are active on board 5?"*
369
-
370
- ---
371
-
372
- ## 🧪 Testing & Verification
373
-
374
- ### Testing the MCP Server
375
- You can test the MCP server functionality using the official [MCP Inspector](https://github.com/modelcontextprotocol/inspector):
376
-
377
- ```bash
378
- npx @modelcontextprotocol/inspector node ./bin/jira.js mcp
379
- ```
380
-
381
- This will launch a web interface where you can:
382
- 1. View all 8 available tools and their schemas
383
- 2. Execute tools with custom arguments
384
- 3. Inspect request/response logs
385
-
386
472
  ---
387
473
 
388
474
  ## 📦 CLI Command Reference
389
475
 
476
+ Run `jira help` or `jira [command] help` to see all options.
477
+
390
478
  ```
391
479
  jira [command]
392
480
 
@@ -401,45 +489,6 @@ Commands:
401
489
  git Git integration for Jira
402
490
  ai AI Helper commands
403
491
  mcp Start MCP Agent Server (Stdio)
404
-
405
- Config Subcommands:
406
- config setup Interactive setup
407
- config view View current configuration
408
- config clear Clear configuration
409
- config save Save current config as a profile
410
- config use Switch to a saved profile
411
- config profiles List saved profiles
412
-
413
- Issue Subcommands:
414
- issue list List issues (JQL, filters, export)
415
- issue view View issue details
416
- issue create Create a new issue (wizard or flags)
417
- issue edit Edit issue fields (interactive or flags)
418
- issue transition Transition issue status
419
- issue assign Assign or reassign an issue
420
- issue comment Add a comment to an issue
421
- issue search Quick text search
422
- issue link Link two issues
423
- issue watch Start watching an issue
424
- issue unwatch Stop watching an issue
425
-
426
- AI Subcommands:
427
- ai summarize Summarize an issue using AI
428
- ai draft Draft issue description from notes
429
- ai suggest Suggest next actions for an issue
430
- ai review AI code review of linked PR
431
- ai plan Break down Epic into stories
432
- ai standup Generate daily standup report
433
-
434
- Board Subcommands:
435
- board list List Jira boards
436
-
437
- Sprint Subcommands:
438
- sprint list List sprints for a board
439
- sprint issues List issues in active sprint
440
-
441
- Bulk Subcommands:
442
- bulk transition Bulk transition issues matching JQL
443
492
  ```
444
493
 
445
494
  ---
@@ -6,8 +6,15 @@ import { join, dirname } from 'path';
6
6
  import { fileURLToPath } from 'url';
7
7
 
8
8
  // Load package.json for version
9
+
10
+ // Load package.json for version
11
+ import { existsSync } from 'fs';
9
12
  const __dirname = dirname(fileURLToPath(import.meta.url));
10
- const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
13
+ let pkgPath = join(__dirname, '../package.json');
14
+ if (!existsSync(pkgPath)) {
15
+ pkgPath = join(__dirname, '../../package.json');
16
+ }
17
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
11
18
 
12
19
  const program = new Command();
13
20
 
@@ -38,6 +45,7 @@ import { registerAiCommand } from '../src/commands/ai.js';
38
45
  import { registerMcpCommand } from '../src/commands/mcp.js';
39
46
  import { registerBulkCommand } from '../src/commands/bulk.js';
40
47
  import { registerDashboardCommand } from '../src/commands/dashboard.js';
48
+ import { registerFilterCommand } from '../src/commands/filter.js';
41
49
 
42
50
  // Register Commands
43
51
  registerConfigCommand(program);
@@ -50,6 +58,7 @@ registerAiCommand(program);
50
58
  registerMcpCommand(program);
51
59
  registerBulkCommand(program);
52
60
  registerDashboardCommand(program);
61
+ registerFilterCommand(program);
53
62
 
54
63
  program.on('command:*', () => {
55
64
  console.error(chalk.red('Invalid command: %s\nSee --help for a list of available commands.'), program.args.join(' '));
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from 'commander';
3
+ import chalk from 'chalk';
4
+ import { readFileSync } from 'fs';
5
+ import { join, dirname } from 'path';
6
+ import { fileURLToPath } from 'url';
7
+ // Load package.json for version
8
+ // Load package.json for version
9
+ import { existsSync } from 'fs';
10
+ const __dirname = dirname(fileURLToPath(import.meta.url));
11
+ let pkgPath = join(__dirname, '../package.json');
12
+ if (!existsSync(pkgPath)) {
13
+ pkgPath = join(__dirname, '../../package.json');
14
+ }
15
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
16
+ const program = new Command();
17
+ program
18
+ .name('jira')
19
+ .description('AI-powered Jira CLI for humans and agents')
20
+ .version(pkg.version)
21
+ .addHelpText('after', `
22
+ Examples:
23
+ $ jira dashboard
24
+ $ jira issue list
25
+ $ jira issue view PROJ-123
26
+ $ jira issue create
27
+ $ jira issue search "login bug"
28
+ $ jira board list
29
+ $ jira sprint list --board 123
30
+ $ jira bulk transition -j "project = PROJ" -s Done
31
+ $ jira ai summarize PROJ-123
32
+ `);
33
+ import { registerConfigCommand } from '../src/commands/config.js';
34
+ import { registerIssueCommand } from '../src/commands/issue.js';
35
+ import { registerProjectCommand } from '../src/commands/project.js';
36
+ import { registerSprintCommand } from '../src/commands/sprint.js';
37
+ import { registerBoardCommand } from '../src/commands/board.js';
38
+ import { registerGitCommand } from '../src/commands/git.js';
39
+ import { registerAiCommand } from '../src/commands/ai.js';
40
+ import { registerMcpCommand } from '../src/commands/mcp.js';
41
+ import { registerBulkCommand } from '../src/commands/bulk.js';
42
+ import { registerDashboardCommand } from '../src/commands/dashboard.js';
43
+ import { registerFilterCommand } from '../src/commands/filter.js';
44
+ // Register Commands
45
+ registerConfigCommand(program);
46
+ registerIssueCommand(program);
47
+ registerProjectCommand(program);
48
+ registerSprintCommand(program);
49
+ registerBoardCommand(program);
50
+ registerGitCommand(program);
51
+ registerAiCommand(program);
52
+ registerMcpCommand(program);
53
+ registerBulkCommand(program);
54
+ registerDashboardCommand(program);
55
+ registerFilterCommand(program);
56
+ program.on('command:*', () => {
57
+ console.error(chalk.red('Invalid command: %s\nSee --help for a list of available commands.'), program.args.join(' '));
58
+ process.exit(1);
59
+ });
60
+ if (!process.argv.slice(2).length) {
61
+ program.outputHelp();
62
+ }
63
+ program.parse(process.argv);
64
+ //# sourceMappingURL=jira.js.map
package/package.json CHANGED
@@ -1,20 +1,24 @@
1
1
  {
2
2
  "name": "jira-pilot",
3
- "version": "2.0.5",
3
+ "version": "2.1.0",
4
4
  "description": "AI powered Jira CLI and MCP server for humans and agents — manage issues, sprints, boards with interactive wizards, multi-provider AI (OpenAI/Gemini/Anthropic), and an 8-tool MCP server for AI assistants",
5
- "main": "src/index.js",
5
+ "main": "dist/src/index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "jira": "./bin/jira.js",
9
- "jira-pilot": "./bin/jira.js"
8
+ "jira": "./dist/bin/jira.js",
9
+ "jira-pilot": "./dist/bin/jira.js"
10
10
  },
11
11
  "scripts": {
12
- "start": "node bin/jira.js",
13
- "mcp": "node bin/jira.js mcp",
12
+ "build": "tsc",
13
+ "start": "node dist/bin/jira.js",
14
+ "start:dev": "tsx bin/jira.ts",
15
+ "mcp": "node dist/bin/jira.js mcp",
16
+ "mcp:dev": "tsx bin/jira.ts mcp",
14
17
  "test": "vitest run",
15
18
  "test:watch": "vitest",
16
19
  "test:coverage": "vitest run --coverage",
17
- "link": "npm link"
20
+ "link": "npm link",
21
+ "typecheck": "tsc --noEmit"
18
22
  },
19
23
  "engines": {
20
24
  "node": ">=20.0.0"
@@ -84,7 +88,10 @@
84
88
  "ora": "^9.3.0"
85
89
  },
86
90
  "devDependencies": {
91
+ "@types/node": "^25.2.3",
87
92
  "@vitest/coverage-v8": "^4.0.18",
93
+ "tsx": "^4.21.0",
94
+ "typescript": "^5.9.3",
88
95
  "vitest": "^4.0.18"
89
96
  }
90
97
  }