ticketlens 0.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 (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +457 -0
  3. package/bin/ticketlens.mjs +376 -0
  4. package/package.json +37 -0
  5. package/skills/jtb/scripts/fetch-my-tickets.mjs +377 -0
  6. package/skills/jtb/scripts/fetch-ticket.mjs +682 -0
  7. package/skills/jtb/scripts/lib/adapters/github-adapter.mjs +112 -0
  8. package/skills/jtb/scripts/lib/adapters/jira-adapter.mjs +19 -0
  9. package/skills/jtb/scripts/lib/adf-converter.mjs +67 -0
  10. package/skills/jtb/scripts/lib/ansi.mjs +87 -0
  11. package/skills/jtb/scripts/lib/arg-validator.mjs +178 -0
  12. package/skills/jtb/scripts/lib/attachment-downloader.mjs +123 -0
  13. package/skills/jtb/scripts/lib/attention-scorer.mjs +152 -0
  14. package/skills/jtb/scripts/lib/banner.mjs +201 -0
  15. package/skills/jtb/scripts/lib/brief-assembler.mjs +137 -0
  16. package/skills/jtb/scripts/lib/brief-cache.mjs +137 -0
  17. package/skills/jtb/scripts/lib/budget-pruner.mjs +242 -0
  18. package/skills/jtb/scripts/lib/cache-manager.mjs +499 -0
  19. package/skills/jtb/scripts/lib/cli-auth.mjs +40 -0
  20. package/skills/jtb/scripts/lib/cli.mjs +87 -0
  21. package/skills/jtb/scripts/lib/code-ref-parser.mjs +113 -0
  22. package/skills/jtb/scripts/lib/commit-linker.mjs +42 -0
  23. package/skills/jtb/scripts/lib/compliance-checker.mjs +92 -0
  24. package/skills/jtb/scripts/lib/config-wizard.mjs +392 -0
  25. package/skills/jtb/scripts/lib/config.mjs +63 -0
  26. package/skills/jtb/scripts/lib/diff-analyzer.mjs +66 -0
  27. package/skills/jtb/scripts/lib/drift-tracker.mjs +120 -0
  28. package/skills/jtb/scripts/lib/error-classifier.mjs +119 -0
  29. package/skills/jtb/scripts/lib/help.mjs +253 -0
  30. package/skills/jtb/scripts/lib/hook-installer.mjs +81 -0
  31. package/skills/jtb/scripts/lib/init-wizard.mjs +508 -0
  32. package/skills/jtb/scripts/lib/interactive-list.mjs +257 -0
  33. package/skills/jtb/scripts/lib/jira-client.mjs +169 -0
  34. package/skills/jtb/scripts/lib/ledger.mjs +96 -0
  35. package/skills/jtb/scripts/lib/license.mjs +195 -0
  36. package/skills/jtb/scripts/lib/pr-assembler.mjs +186 -0
  37. package/skills/jtb/scripts/lib/profile-picker.mjs +216 -0
  38. package/skills/jtb/scripts/lib/profile-resolver.mjs +236 -0
  39. package/skills/jtb/scripts/lib/profile-switcher.mjs +147 -0
  40. package/skills/jtb/scripts/lib/prompt-helpers.mjs +122 -0
  41. package/skills/jtb/scripts/lib/requirement-extractor.mjs +52 -0
  42. package/skills/jtb/scripts/lib/resolve-adapter.mjs +28 -0
  43. package/skills/jtb/scripts/lib/schedule-wizard.mjs +153 -0
  44. package/skills/jtb/scripts/lib/select-prompt.mjs +106 -0
  45. package/skills/jtb/scripts/lib/spinner.mjs +44 -0
  46. package/skills/jtb/scripts/lib/styled-assembler.mjs +183 -0
  47. package/skills/jtb/scripts/lib/summarizer.mjs +109 -0
  48. package/skills/jtb/scripts/lib/sync.mjs +119 -0
  49. package/skills/jtb/scripts/lib/table-formatter.mjs +48 -0
  50. package/skills/jtb/scripts/lib/triage-exporter.mjs +93 -0
  51. package/skills/jtb/scripts/lib/triage-history.mjs +166 -0
  52. package/skills/jtb/scripts/lib/triage-push.mjs +98 -0
  53. package/skills/jtb/scripts/lib/usage-tracker.mjs +54 -0
  54. package/skills/jtb/scripts/lib/vcs-detector.mjs +12 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ralph Moran
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,457 @@
1
+ <div align="center">
2
+
3
+ # TicketLens
4
+
5
+ <div align="center">
6
+ <img src="https://img.shields.io/npm/v/ticketlens?style=flat-square&color=6c63ff&label=version" />
7
+ <img src="https://img.shields.io/npm/dm/ticketlens?style=flat-square&color=06b6d4&label=downloads" />
8
+ <img src="https://github.com/ralphmoran/ticket-lens/actions/workflows/test.yml/badge.svg?style=flat-square" />
9
+ <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" />
10
+ <img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen?style=flat-square" />
11
+ </div>
12
+
13
+ </div>
14
+
15
+ > Your AI assistant shouldn't need to read your tickets.
16
+
17
+ > Works alongside Atlassian MCP — Atlassian MCP writes the tickets; TicketLens tells you which ones need you right now.
18
+
19
+ <div align="center"><img src="docs/demos/fetch.gif" alt="ticketlens CNV1-2 demo" width="700" /></div>
20
+
21
+ ---
22
+
23
+ ## What is TicketLens?
24
+
25
+ TicketLens is a local-first Jira CLI that preprocesses ticket context on your machine and hands your AI tools a clean, compressed brief — instead of dumping raw Jira API JSON into your session. It supports Jira Cloud, Server, and Data Center, works with any AI tool that accepts text, and runs independently of any AI session.
26
+
27
+ Zero npm dependencies. Node.js built-ins only.
28
+
29
+ ---
30
+
31
+ ## Why TicketLens?
32
+
33
+ - **Privacy** — ticket content never leaves your machine; no cloud relay, no data sent to Anthropic or anyone else
34
+ - **60–80% token savings** — structured briefs instead of verbose Jira JSON; 4-hour cache by default
35
+ - **Scriptable** — standard CLI output: pipe to cron, git hooks, CI/CD, or any LLM tool
36
+ - **Multi-profile** — connect multiple Jira instances simultaneously; auto-route by ticket prefix or project path
37
+ - **Attachments included** — images, PDFs, and text files downloaded locally; Claude Code reads them as context
38
+
39
+ ---
40
+
41
+ ## Quick Start
42
+
43
+ ```bash
44
+ npm install -g ticketlens
45
+ ticketlens init # Guided setup: Jira URL, auth type, connection test
46
+ ticketlens CNV1-2 # Fetch a ticket brief
47
+ ticketlens triage # Scan your assigned tickets
48
+ ```
49
+
50
+ Or without installing:
51
+
52
+ ```bash
53
+ npx ticketlens init
54
+ npx ticketlens CNV1-2
55
+ ```
56
+
57
+ **Prerequisites:** Node.js >=20
58
+
59
+ ---
60
+
61
+ ## Demos
62
+
63
+ <div align="center"><img src="docs/demos/triage.gif" alt="ticketlens triage demo" width="700" /></div>
64
+
65
+ ---
66
+
67
+ ## Commands
68
+
69
+ ### Setup
70
+
71
+ | Command | Description |
72
+ |---------|-------------|
73
+ | `ticketlens init` | Guided wizard — Jira URL, auth, live connection test, optional settings |
74
+ | `ticketlens switch` | Arrow-key panel to switch between configured profiles |
75
+ | `ticketlens config [--profile=NAME]` | Edit any field on an existing profile |
76
+ | `ticketlens profiles` | List all configured profiles (alias: `ticketlens ls`) |
77
+ | `ticketlens delete <NAME>` | Remove a profile and its credentials (prompts `y/N` in TTY; use `--yes` in scripts/CI) |
78
+
79
+ `init` collects: profile name, Jira URL (bare hostnames accepted — HTTPS probed first), auth type (auto-detected from URL), credentials (masked), and optional ticket prefixes, project paths, and triage statuses. On connection failure, a retry menu lets you fix credentials, URL, or skip — all inputs pre-populated.
80
+
81
+ `config` uses merge semantics: new ticket prefixes and triage statuses are added to existing lists, never replaced. Partial matching resolves `QA` to `QA Testing` if that's the status in your Jira.
82
+
83
+ ---
84
+
85
+ ### Fetch a ticket
86
+
87
+ ```bash
88
+ ticketlens CNV1-2 # Depth 1, styled output (default)
89
+ ticketlens get CNV1-2 # Same — explicit alias
90
+ ticketlens CNV1-2 --depth=0 # Target ticket only
91
+ ticketlens CNV1-2 --depth=1 # + linked ticket descriptions and comments
92
+ ticketlens CNV1-2 --depth=2 # + linked-of-linked (full graph)
93
+ ticketlens CNV1-2 --plain # Plain markdown — pipe-safe, LLM-ready
94
+ ticketlens CNV1-2 --profile=acme # Force a specific profile
95
+ ticketlens CNV1-2 --no-cache # Bypass cache, re-fetch from Jira
96
+ ticketlens CNV1-2 --no-attachments # Skip attachment download
97
+ ticketlens CNV1-2 --check # Append local VCS diff + Claude Code review instructions
98
+ ticketlens CNV1-2 --compliance # Check ticket requirements against local diff [Pro/Free 3/mo]
99
+ ticketlens CNV1-2 --summarize # AI summary via your own API key (BYOK) [Pro]
100
+ ticketlens CNV1-2 --summarize --cloud # AI summary routed through TicketLens API [Pro]
101
+ ```
102
+
103
+ | `--depth` | Scope |
104
+ |-----------|-------|
105
+ | `0` | Target ticket: description, comments, attachments |
106
+ | `1` | + linked tickets: descriptions and comments _(default)_ |
107
+ | `2` | + linked-of-linked: key and summary only |
108
+
109
+ Max 15 tickets at any depth. Circular references handled automatically.
110
+
111
+ After the first fetch, ticket data is cached to `~/.ticketlens/cache/PROFILE/TICKET-KEY/brief.json` (4h TTL, depth-aware). A dim notice appears on stderr on cache hit:
112
+
113
+ ```
114
+ ○ CNV1-2 · from cache (12m ago) · --no-cache to refresh
115
+ ```
116
+
117
+ Attachments download to `~/.ticketlens/cache/TICKET-KEY/` (10 MB per-file cap). Claude Code reads images multimodally, extracts PDF text, and reads plain text files as context.
118
+
119
+ ---
120
+
121
+ ### Triage
122
+
123
+ ```bash
124
+ ticketlens triage # Scan assigned tickets — interactive
125
+ ticketlens triage --profile=acme # Explicit profile
126
+ ticketlens triage --stale=3 # Aging threshold: 3 days (default: 5)
127
+ ticketlens triage --status="Code Review,QA" # Override statuses to scan
128
+ ticketlens triage --assignee="Jane Dev" # Another dev's tickets [Team]
129
+ ticketlens triage --sprint="Sprint 12" # Filter by sprint [Team]
130
+ ticketlens triage --export=csv # Export results to CSV [Team]
131
+ ticketlens triage --export=json # Export results to JSON [Team]
132
+ ticketlens triage --push # Push snapshot to Console queue [Team]
133
+ ticketlens triage --digest # POST scored results to digest endpoint [Pro]
134
+ ticketlens triage --plain # Plain markdown — pipe to file or LLM
135
+ ticketlens triage --static # Static table, no interactive mode
136
+ ```
137
+
138
+ | Badge | Category | Condition |
139
+ |-------|----------|-----------|
140
+ | `●` red | Needs response | Someone else commented within the last N days |
141
+ | `●` yellow | Aging | Last comment or update is N+ days old |
142
+
143
+ `--stale=N` controls both categories. Unanswered comments older than N days downgrade from "needs response" to "aging" automatically.
144
+
145
+ Interactive mode: `↑/↓` navigate, `Enter` open in browser, `p` switch profile, `q/Esc` exit. Columns adapt to terminal width.
146
+
147
+ Status mismatch auto-fix: if configured statuses don't match Jira's exact casing, triage shows a diff and offers to update your profile:
148
+
149
+ ```
150
+ ~ In progress → In Progress
151
+ ~ QA → QA Testing
152
+
153
+ Update "myteam" with corrected statuses? y/N
154
+ ```
155
+
156
+ Bot comments (Jira Automation, Jenkins, GitHub Actions) are automatically ignored.
157
+
158
+ ---
159
+
160
+ ### Cache
161
+
162
+ ```bash
163
+ ticketlens cache size # Disk usage by profile and ticket
164
+ ticketlens cache size --profile=acme # Filter to one profile
165
+ ticketlens cache clear # Interactive picker (TTY)
166
+ ticketlens clear # Alias for cache clear
167
+ ticketlens cache clear CNV1-2 # Clear one ticket
168
+ ticketlens cache clear --older-than=7d # Files older than 7 days
169
+ ticketlens cache clear --profile=acme # One profile's files only
170
+ ticketlens cache clear --older-than=30d --yes # Skip confirmation (CI/scripts)
171
+ ```
172
+
173
+ Age units: `d` = days · `m` = months (30d) · `y` = years (365d)
174
+
175
+ Cache locations:
176
+ - Attachments: `~/.ticketlens/cache/TICKET-KEY/`
177
+ - Briefs: `~/.ticketlens/cache/PROFILE/TICKET-KEY/brief.json`
178
+
179
+ ---
180
+
181
+ ### Schedule
182
+
183
+ ```bash
184
+ ticketlens schedule # Interactive wizard — set digest time, timezone, profile [Pro]
185
+ ticketlens schedule --stop # Cancel the scheduled digest
186
+ ticketlens schedule --status # Show current schedule
187
+ ```
188
+
189
+ Stores the schedule as a cron entry. Delivers your triage digest at the configured time without an open terminal. Requires a Pro license.
190
+
191
+ ---
192
+
193
+ ### License
194
+
195
+ ```bash
196
+ ticketlens license # Show tier and status
197
+ ticketlens activate <KEY> # Activate a Pro or Team license
198
+ ```
199
+
200
+ ---
201
+
202
+ ### /jtb — Jira TicketBrief for Claude Code
203
+
204
+ `/jtb` is a Claude Code slash command that fetches full ticket context and drops a structured implementation brief directly into your session, then enters plan mode.
205
+
206
+ > Requires [Claude Code](https://claude.ai/code). For standalone use, the `ticketlens` commands above work independently.
207
+
208
+ **Install:**
209
+
210
+ ```bash
211
+ npm install -g ticketlens && ticketlens init
212
+ cp $(npm root -g)/ticketlens/skills/jtb/SKILL.md ~/.claude/commands/jtb.md
213
+ # Restart Claude Code, then:
214
+ # /jtb CNV1-2
215
+ ```
216
+
217
+ **Usage in Claude Code:**
218
+
219
+ ```
220
+ /jtb CNV1-2 # Fetch ticket + linked issues → plan mode
221
+ /jtb CNV1-2 --depth=0 # Target ticket only (fast)
222
+ /jtb CNV1-2 --depth=2 # Deep: full linked-issue graph
223
+ /jtb CNV1-2 --profile=acme # Force a specific profile
224
+ /jtb CNV1-2 --no-attachments # Skip attachment download
225
+ /jtb CNV1-2 --no-cache # Re-fetch from Jira
226
+ /jtb triage # Scan your assigned tickets
227
+ ```
228
+
229
+ Attachments are listed in the brief as absolute paths. Claude Code reads images (multimodal), PDFs, and text files before planning. Files over 10 MB are skipped.
230
+
231
+ ---
232
+
233
+ ## All Examples
234
+
235
+ ```bash
236
+ # ── Setup ────────────────────────────────────────────────────────────────────
237
+ ticketlens init # Guided wizard (recommended)
238
+ ticketlens switch # Switch between configured profiles
239
+ ticketlens config # Edit the active profile
240
+ ticketlens config --profile=acme # Edit a specific profile
241
+ ticketlens profiles # List all configured profiles
242
+ ticketlens ls # Alias for profiles
243
+ ticketlens profiles --plain # Tab-separated (scripts / pipes)
244
+ ticketlens delete <PROFILE-NAME> # Remove a profile (prompts y/N in TTY)
245
+ ticketlens delete <PROFILE-NAME> --yes # Remove without prompt (scripts/CI)
246
+
247
+ # ── Fetch a ticket brief ──────────────────────────────────────────────────────
248
+ ticketlens CNV1-2 # Fetch with defaults (depth 1, styled)
249
+ ticketlens get CNV1-2 # Explicit alias (same result)
250
+ ticketlens CNV1-2 --depth=0 # Target ticket only — no linked issues
251
+ ticketlens CNV1-2 --depth=1 # + linked ticket descriptions and comments
252
+ ticketlens CNV1-2 --depth=2 # + linked-of-linked (full graph)
253
+ ticketlens CNV1-2 --profile=acme # Force a specific Jira profile
254
+ ticketlens CNV1-2 --plain # Plain markdown — no color codes
255
+ ticketlens CNV1-2 --styled # Force ANSI color even when piping
256
+ ticketlens CNV1-2 --no-attachments # Skip attachment download entirely
257
+ ticketlens CNV1-2 --no-cache # Skip brief cache + force re-download
258
+ ticketlens CNV1-2 --check # Append local VCS diff + Claude Code review instructions
259
+ ticketlens CNV1-2 --compliance # Check ticket requirements against local diff [Pro/Free 3/mo]
260
+ ticketlens CNV1-2 --summarize # AI summary via your own API key (BYOK) [Pro]
261
+ ticketlens CNV1-2 --summarize --cloud # AI summary via TicketLens API [Pro]
262
+ ticketlens CNV1-2 --depth=2 --profile=acme --plain # Combine flags freely
263
+
264
+ # Pipe plain output to clipboard, LLM, or file
265
+ ticketlens CNV1-2 --plain > brief.md
266
+ ticketlens CNV1-2 --plain | pbcopy
267
+ ticketlens CNV1-2 --plain | llm "Summarize this ticket in 3 bullets"
268
+
269
+ # ── Triage ────────────────────────────────────────────────────────────────────
270
+ ticketlens triage # Scan assigned tickets — interactive
271
+ ticketlens triage --profile=acme # Explicit profile
272
+ ticketlens triage --stale=3 # Needs-response window: 3 days (default: 5)
273
+ ticketlens triage --stale=10 # More lenient — only flag very stale tickets
274
+ ticketlens triage --status="Code Review,QA Testing" # Scan these statuses only
275
+ ticketlens triage --static # Static table output (no interactive mode)
276
+ ticketlens triage --plain # Plain markdown — pipe to LLM or file
277
+ ticketlens triage --assignee="Jane Dev" # View another dev's tickets [Team]
278
+ ticketlens triage --sprint="Sprint 12" # Filter by sprint name [Team]
279
+ ticketlens triage --assignee="Jane Dev" --sprint="Sprint 12" # Combined [Team]
280
+ ticketlens triage --export=csv # Export to CSV [Team]
281
+ ticketlens triage --export=json # Export to JSON [Team]
282
+ ticketlens triage --push # Push snapshot to Console queue [Team]
283
+ ticketlens triage --digest # POST results to digest endpoint [Pro]
284
+ ticketlens triage --profile=acme --stale=3 --static # Combine flags
285
+
286
+ # Pipe triage output
287
+ ticketlens triage --plain > my-tickets.md
288
+ ticketlens triage --plain | llm "Which ticket is most urgent and why?"
289
+
290
+ # ── Cache management ──────────────────────────────────────────────────────────
291
+ ticketlens cache # Overview + subcommand hints
292
+ ticketlens cache --help # Detailed help
293
+ ticketlens cache size # Disk usage by profile and ticket
294
+ ticketlens cache size --profile=acme # Filter to one profile only
295
+ ticketlens cache clear # Interactive picker (TTY)
296
+ ticketlens clear # Alias for cache clear
297
+ ticketlens cache clear CNV1-2 # Clear one ticket's cache
298
+ ticketlens cache clear --older-than=7d # Files older than 7 days
299
+ ticketlens cache clear --older-than=1m # Files older than 1 month
300
+ ticketlens cache clear --older-than=1y # Files older than 1 year
301
+ ticketlens cache clear --profile=acme # Only one profile's files
302
+ ticketlens cache clear CNV1-2 --older-than=7d # Ticket + age filter
303
+ ticketlens cache clear --profile=acme --older-than=30d # Profile + age filter
304
+ ticketlens cache clear --older-than=30d --yes # Skip confirmation (CI/scripts)
305
+
306
+ # ── Schedule ─────────────────────────────────────────────────────────────────
307
+ ticketlens schedule # Interactive wizard — set time, timezone, profile [Pro]
308
+ ticketlens schedule --stop # Cancel the scheduled digest [Pro]
309
+ ticketlens schedule --status # Show current schedule [Pro]
310
+
311
+ # ── License and account ────────────────────────────────────────────────────────
312
+ ticketlens license # Show license tier and status
313
+ ticketlens activate <LICENSE-KEY> # Activate a license key
314
+
315
+ # ── Help and version ──────────────────────────────────────────────────────────
316
+ ticketlens --help # Main help
317
+ ticketlens --version # Show installed version
318
+ ticketlens CNV1-2 --help # Fetch subcommand help
319
+ ticketlens triage --help # Triage subcommand help
320
+ ticketlens cache --help # Cache overview help
321
+ ticketlens cache size --help # Cache size help
322
+ ticketlens cache clear --help # Cache clear help
323
+ ```
324
+
325
+ ---
326
+
327
+ ## Pro & Teams Features
328
+
329
+ Start free, upgrade when you need it — `ticketlens activate <key>`
330
+
331
+ ### Pro — $8/mo
332
+
333
+ <div align="center">
334
+ <img src="docs/demos/pro-triage.gif" alt="ticketlens --summarize AI summary demo" width="700" />
335
+ </div>
336
+
337
+ ```bash
338
+ ticketlens CNV1-2 --summarize # AI summary via your own API key (BYOK)
339
+ ticketlens CNV1-2 --summarize --cloud # AI summary via TicketLens API (no local key needed)
340
+ ticketlens CNV1-2 --compliance # Check ticket requirements against local diff [Free 3/mo]
341
+ ticketlens triage --stale=3 # Custom stale threshold (default is 5)
342
+ ticketlens triage --digest # POST scored triage results to digest endpoint
343
+ ticketlens schedule # Set up a scheduled daily digest
344
+ ticketlens activate YOUR-LICENSE-KEY # Activate Pro license
345
+ ```
346
+
347
+ <div align="center">
348
+ <img src="docs/demos/pro-triage.gif" alt="ticketlens triage --stale=3 demo" width="700" />
349
+ </div>
350
+
351
+ Pro also unlocks configurable brief cache TTL per profile — set `cacheTtl` to `4h`, `1d`, `7d`, `30d`, or `0` (disable) via `ticketlens config`. Free tier is fixed at 4h.
352
+
353
+ ### Team — $15/seat/mo
354
+
355
+ <div align="center">
356
+ <img src="docs/demos/teams-digest.gif" alt="ticketlens triage --plain digest pipeline demo" width="700" />
357
+ </div>
358
+
359
+ ```bash
360
+ ticketlens triage --assignee="Jane Dev" # View another dev's tickets
361
+ ticketlens triage --sprint="Sprint 12" # Filter by sprint name
362
+ ticketlens triage --export=csv # Export triage to CSV for standups and reports
363
+ ticketlens triage --export=json # Machine-readable export for dashboards
364
+ ticketlens triage --push # Push snapshot to the Console queue
365
+ ```
366
+
367
+ `--push` syncs the scored snapshot to the TicketLens Console after each triage run. The queue page at `/console/queue` shows the latest snapshot for every team profile — no manual refresh needed.
368
+
369
+ Automate a morning digest with cron — no open terminal required:
370
+
371
+ ```bash
372
+ 0 9 * * 1-5 ticketlens triage --plain > ~/digest-$(date +%F).md
373
+ ```
374
+
375
+ Multi-profile team workflows: each teammate runs `ticketlens init` with their own credentials; shared `ticketPrefixes` auto-route tickets to the right Jira instance.
376
+
377
+ ---
378
+
379
+ ## Multi-Profile Setup
380
+
381
+ Profiles live in `~/.ticketlens/profiles.json`:
382
+
383
+ ```json
384
+ {
385
+ "profiles": {
386
+ "myteam": {
387
+ "baseUrl": "https://myteam.atlassian.net",
388
+ "auth": "cloud",
389
+ "email": "you@myteam.com",
390
+ "ticketPrefixes": ["PROJ", "OPS"],
391
+ "projectPaths": ["~/projects/myteam-app"],
392
+ "triageStatuses": ["In Progress", "Code Review", "QA Testing"]
393
+ },
394
+ "client": {
395
+ "baseUrl": "https://jira.client.com",
396
+ "auth": "server",
397
+ "email": "yourname",
398
+ "ticketPrefixes": ["ACME", "SHOP"],
399
+ "projectPaths": ["~/projects/client-app"],
400
+ "triageStatuses": ["In Progress", "In Development", "QA"]
401
+ }
402
+ }
403
+ }
404
+ ```
405
+
406
+ Credentials in `~/.ticketlens/credentials.json` (chmod 600):
407
+
408
+ ```json
409
+ {
410
+ "myteam": { "apiToken": "your-atlassian-api-token" },
411
+ "client": { "pat": "your-jira-server-pat" }
412
+ }
413
+ ```
414
+
415
+ **Profile resolution order:**
416
+
417
+ | Priority | Method | Example |
418
+ |----------|--------|---------|
419
+ | 1 | `--profile=NAME` flag | `ticketlens CNV1-2 --profile=client` |
420
+ | 2 | Ticket prefix match | `ticketlens CNV1-2` → prefix `PROJ` → `myteam` |
421
+ | 3 | Project path match | `triage` in `~/projects/myteam-app` → `myteam` |
422
+ | 4 | `config.default` field | Explicit default set via `ticketlens switch` |
423
+ | 5 | First profile in file | Fallback when `config.default` is absent |
424
+ | 6 | Environment variables | `JIRA_BASE_URL`, `JIRA_EMAIL`, `JIRA_API_TOKEN` / `JIRA_PAT` |
425
+
426
+ ---
427
+
428
+ ## Running Tests
429
+
430
+ ```bash
431
+ npm test
432
+ ```
433
+
434
+ ---
435
+
436
+ ## Roadmap
437
+
438
+ See [ROADMAP.md](ROADMAP.md) for the full plan.
439
+
440
+ Recently shipped:
441
+ - Console queue dashboard — live at `/console/queue` for Team tier; push snapshots with `ticketlens triage --push`
442
+
443
+ Coming up:
444
+ - Slack/Teams alerts for triage changes (Team)
445
+ - GitHub Issues and Linear support
446
+
447
+ ---
448
+
449
+ ## Contributing
450
+
451
+ Bug reports and feature requests welcome — open an issue on [GitHub](https://github.com/ralphmoran/ticket-lens/issues). For larger changes, open an issue first to discuss.
452
+
453
+ ---
454
+
455
+ ## License
456
+
457
+ [MIT](LICENSE) © Ralph Moran