huntr-cli 1.0.9

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 (117) hide show
  1. package/.env.example +7 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +43 -0
  3. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +29 -0
  5. package/.github/labels.json +92 -0
  6. package/.github/pull_request_template.md +64 -0
  7. package/.github/workflows/ci.yml +87 -0
  8. package/.github/workflows/labels.yml +27 -0
  9. package/.github/workflows/manual-publish.yml +105 -0
  10. package/.github/workflows/publish.yml +57 -0
  11. package/.github/workflows/release.yml +124 -0
  12. package/.github/workflows/security-audit.yml +44 -0
  13. package/.husky/pre-commit +12 -0
  14. package/.husky/pre-push +27 -0
  15. package/.lintstagedrc.json +3 -0
  16. package/AGENTS.md +449 -0
  17. package/CHANGELOG.md +38 -0
  18. package/CHANGES.md +259 -0
  19. package/LICENSE +15 -0
  20. package/PUBLISHING.md +191 -0
  21. package/README.md +385 -0
  22. package/ROADMAP.md +158 -0
  23. package/SETUP-COMPLETE.md +446 -0
  24. package/WORKFLOW-SUMMARY.md +368 -0
  25. package/completions/_huntr +168 -0
  26. package/completions/huntr.1 +266 -0
  27. package/completions/huntr.bash +91 -0
  28. package/dist/api/client.d.ts +14 -0
  29. package/dist/api/client.d.ts.map +1 -0
  30. package/dist/api/client.js +74 -0
  31. package/dist/api/client.js.map +1 -0
  32. package/dist/api/personal/activities.d.ts +20 -0
  33. package/dist/api/personal/activities.d.ts.map +1 -0
  34. package/dist/api/personal/activities.js +50 -0
  35. package/dist/api/personal/activities.js.map +1 -0
  36. package/dist/api/personal/boards.d.ts +9 -0
  37. package/dist/api/personal/boards.d.ts.map +1 -0
  38. package/dist/api/personal/boards.js +16 -0
  39. package/dist/api/personal/boards.js.map +1 -0
  40. package/dist/api/personal/index.d.ts +17 -0
  41. package/dist/api/personal/index.d.ts.map +1 -0
  42. package/dist/api/personal/index.js +37 -0
  43. package/dist/api/personal/index.js.map +1 -0
  44. package/dist/api/personal/jobs.d.ts +13 -0
  45. package/dist/api/personal/jobs.d.ts.map +1 -0
  46. package/dist/api/personal/jobs.js +31 -0
  47. package/dist/api/personal/jobs.js.map +1 -0
  48. package/dist/api/personal/user.d.ts +8 -0
  49. package/dist/api/personal/user.d.ts.map +1 -0
  50. package/dist/api/personal/user.js +13 -0
  51. package/dist/api/personal/user.js.map +1 -0
  52. package/dist/cli.d.ts +3 -0
  53. package/dist/cli.d.ts.map +1 -0
  54. package/dist/cli.js +501 -0
  55. package/dist/cli.js.map +1 -0
  56. package/dist/commands/capture-session.d.ts +10 -0
  57. package/dist/commands/capture-session.d.ts.map +1 -0
  58. package/dist/commands/capture-session.js +478 -0
  59. package/dist/commands/capture-session.js.map +1 -0
  60. package/dist/config/clerk-session-manager.d.ts +44 -0
  61. package/dist/config/clerk-session-manager.d.ts.map +1 -0
  62. package/dist/config/clerk-session-manager.js +232 -0
  63. package/dist/config/clerk-session-manager.js.map +1 -0
  64. package/dist/config/config-manager.d.ts +15 -0
  65. package/dist/config/config-manager.d.ts.map +1 -0
  66. package/dist/config/config-manager.js +51 -0
  67. package/dist/config/config-manager.js.map +1 -0
  68. package/dist/config/keychain-manager.d.ts +6 -0
  69. package/dist/config/keychain-manager.d.ts.map +1 -0
  70. package/dist/config/keychain-manager.js +37 -0
  71. package/dist/config/keychain-manager.js.map +1 -0
  72. package/dist/config/token-capture.d.ts +11 -0
  73. package/dist/config/token-capture.d.ts.map +1 -0
  74. package/dist/config/token-capture.js +252 -0
  75. package/dist/config/token-capture.js.map +1 -0
  76. package/dist/config/token-manager.d.ts +38 -0
  77. package/dist/config/token-manager.d.ts.map +1 -0
  78. package/dist/config/token-manager.js +153 -0
  79. package/dist/config/token-manager.js.map +1 -0
  80. package/dist/lib/list-options.d.ts +69 -0
  81. package/dist/lib/list-options.d.ts.map +1 -0
  82. package/dist/lib/list-options.js +299 -0
  83. package/dist/lib/list-options.js.map +1 -0
  84. package/dist/types/personal.d.ts +113 -0
  85. package/dist/types/personal.d.ts.map +1 -0
  86. package/dist/types/personal.js +4 -0
  87. package/dist/types/personal.js.map +1 -0
  88. package/docs/AUTOMATIC-PUBLISHING.md +520 -0
  89. package/docs/CHANGELOG-AUTOMATION.md +418 -0
  90. package/docs/CI-CD-SETUP.md +582 -0
  91. package/docs/DEV-SETUP.md +512 -0
  92. package/docs/ENHANCEMENT-PLAN.md +204 -0
  93. package/docs/ENTITY-TYPES.md +462 -0
  94. package/docs/GITHUB-ACTIONS-GUIDE.md +367 -0
  95. package/docs/NPM-PUBLISHING.md +324 -0
  96. package/docs/OUTPUT-EXAMPLES.md +414 -0
  97. package/docs/OUTPUT-FORMATS.md +299 -0
  98. package/docs/TESTING.md +216 -0
  99. package/eslint.config.js +68 -0
  100. package/package.json +64 -0
  101. package/src/api/client.ts +88 -0
  102. package/src/api/personal/activities.ts +66 -0
  103. package/src/api/personal/boards.ts +14 -0
  104. package/src/api/personal/index.ts +25 -0
  105. package/src/api/personal/jobs.ts +33 -0
  106. package/src/api/personal/user.ts +10 -0
  107. package/src/cli.ts +487 -0
  108. package/src/commands/capture-session.ts +582 -0
  109. package/src/config/clerk-session-manager.ts +263 -0
  110. package/src/config/config-manager.ts +56 -0
  111. package/src/config/keychain-manager.ts +30 -0
  112. package/src/config/token-capture.ts +233 -0
  113. package/src/config/token-manager.ts +139 -0
  114. package/src/lib/list-options.ts +370 -0
  115. package/src/types/personal.ts +114 -0
  116. package/tests/example.test.ts +130 -0
  117. package/tsconfig.json +19 -0
@@ -0,0 +1,418 @@
1
+ # Automatic Changelog Generation
2
+
3
+ Guide to the automatic changelog generation system for huntr-cli.
4
+
5
+ ## Overview
6
+
7
+ The huntr-cli project uses **Conventional Commits** + **Keep a Changelog** format for automatic changelog generation. The release.yml workflow automatically generates changelog sections from git commits when versions are bumped.
8
+
9
+ ## How It Works
10
+
11
+ ### 1. Conventional Commits
12
+
13
+ All commits follow this format:
14
+
15
+ ```
16
+ type: description
17
+
18
+ optional body
19
+ ```
20
+
21
+ **Types that appear in changelog:**
22
+ - `feat:` → **Features** section
23
+ - `fix:` → **Bug Fixes** section
24
+ - `perf:` → **Performance** section
25
+ - `docs:` → **Documentation** section (optional)
26
+ - `chore:`, `refactor:`, `test:` → Not in changelog (internal)
27
+
28
+ **Examples:**
29
+ ```bash
30
+ git commit -m "feat: add field selection with --fields parameter"
31
+ git commit -m "fix: handle missing company in activities"
32
+ git commit -m "perf: optimize color distance calculation"
33
+ ```
34
+
35
+ ### 2. Automatic Changelog Generation
36
+
37
+ When you push a version bump to main:
38
+
39
+ ```bash
40
+ npm version minor # 1.0.0 → 1.1.0
41
+ git push origin main --tags
42
+ ```
43
+
44
+ The **release.yml** workflow:
45
+ 1. Detects version change in package.json
46
+ 2. Generates changelog from commit messages since last release
47
+ 3. Updates CHANGELOG.md with new version section
48
+ 4. Creates GitHub Release with auto-generated notes
49
+
50
+ ### 3. Keep a Changelog Format
51
+
52
+ The CHANGELOG.md follows [Keep a Changelog](https://keepachangelog.com/) format:
53
+
54
+ ```markdown
55
+ # Changelog
56
+
57
+ All notable changes to this project will be documented in this file.
58
+
59
+ ## [Unreleased]
60
+
61
+ ### Added
62
+ - New features coming soon
63
+
64
+ ## [1.1.0] - 2026-02-23
65
+
66
+ ### Added
67
+ - Field selection with --fields parameter
68
+ - PDF export format
69
+ - Excel export format
70
+
71
+ ### Fixed
72
+ - Handling of missing company in activities
73
+ - ESLint configuration warnings
74
+
75
+ ### Performance
76
+ - Optimized color distance calculation
77
+
78
+ ## [1.0.0] - 2026-02-15
79
+
80
+ Initial release with core CLI functionality.
81
+ ```
82
+
83
+ ## Creating Releases
84
+
85
+ ### Automatic (Recommended)
86
+
87
+ ```bash
88
+ # On main branch
89
+ git checkout main
90
+ git pull origin main
91
+
92
+ # Bump version (creates commit + tag)
93
+ npm version minor # For new features
94
+ npm version patch # For bug fixes
95
+ npm version major # For breaking changes
96
+
97
+ # Push with tags (triggers release.yml)
98
+ git push origin main --tags
99
+
100
+ # GitHub Release is created automatically with:
101
+ # - Artifacts (tar.gz, zip)
102
+ # - Auto-generated changelog
103
+ # - Release notes from commits
104
+ ```
105
+
106
+ ### Manual (For Special Cases)
107
+
108
+ Go to GitHub Actions → Manual Publish workflow → Run workflow
109
+
110
+ Specify:
111
+ - Version (e.g., 1.1.0)
112
+ - npm tag (latest, beta, rc)
113
+ - Changelog notes (optional)
114
+
115
+ ## Changelog Sections
116
+
117
+ ### [Added]
118
+ New features introduced:
119
+ ```
120
+ - Field selection with --fields parameter
121
+ - PDF export format via pdfkit
122
+ - Excel export format via exceljs
123
+ ```
124
+
125
+ ### [Changed]
126
+ Changes to existing functionality:
127
+ ```
128
+ - Updated ESLint configuration
129
+ - Improved error handling
130
+ - Refactored API client
131
+ ```
132
+
133
+ ### [Fixed]
134
+ Bug fixes:
135
+ ```
136
+ - Fixed missing company in activities
137
+ - Resolved npm publishing issues
138
+ - Fixed ESLint configuration
139
+ ```
140
+
141
+ ### [Deprecated]
142
+ Features being phased out:
143
+ ```
144
+ - Old token authentication method (use environment variable instead)
145
+ ```
146
+
147
+ ### [Removed]
148
+ Features removed:
149
+ ```
150
+ - Removed deprecated API endpoints
151
+ ```
152
+
153
+ ### [Security]
154
+ Security fixes:
155
+ ```
156
+ - Fixed dependency vulnerabilities
157
+ - Updated security audit process
158
+ ```
159
+
160
+ ### [Performance]
161
+ Performance improvements:
162
+ ```
163
+ - Optimized color distance calculation
164
+ - Improved table rendering speed
165
+ ```
166
+
167
+ ## Git Commit Examples
168
+
169
+ ### Good Commits (Appear in Changelog)
170
+ ```bash
171
+ git commit -m "feat: add --fields parameter for field selection"
172
+ git commit -m "feat: implement PDF export using pdfkit"
173
+ git commit -m "fix: handle missing company references in activities"
174
+ git commit -m "perf: optimize table rendering with memoization"
175
+ ```
176
+
177
+ ### Internal Commits (Don't Appear)
178
+ ```bash
179
+ git commit -m "chore: update dependencies"
180
+ git commit -m "refactor: reorganize utility functions"
181
+ git commit -m "test: add test suite for workflows"
182
+ git commit -m "ci: update GitHub Actions configuration"
183
+ ```
184
+
185
+ ## Release Timeline
186
+
187
+ ```
188
+ Monday 2:00 PM → Developer commits to feature branch
189
+ - "feat: add new feature"
190
+ - "fix: resolve issue"
191
+
192
+ Monday 3:00 PM → PR merged to main
193
+ - All CI checks pass
194
+ - Code review approved
195
+
196
+ Monday 3:05 PM → Release triggered
197
+ git checkout main
198
+ npm version minor # 1.0.0 → 1.1.0
199
+ git push origin main --tags
200
+
201
+ release.yml workflow triggers
202
+
203
+ Monday 3:10 PM → Changelog generated
204
+ - Collects commits since v1.0.0
205
+ - Groups by type (feat, fix, perf)
206
+ - Updates CHANGELOG.md
207
+ - Creates GitHub Release
208
+ - Adds artifacts (tar.gz, zip)
209
+
210
+ publish.yml workflow triggers
211
+
212
+ Monday 3:15 PM → NPM publish
213
+ - Runs full CI pipeline
214
+ - npm publish
215
+ - Comments on release with npm URL
216
+
217
+ Monday 3:20 PM ✅ huntr-cli@1.1.0 live on npmjs.com
218
+ ```
219
+
220
+ ## Changelog Examples
221
+
222
+ ### Feature Release (1.0.0 → 1.1.0)
223
+
224
+ **Commits:**
225
+ ```
226
+ feat: add field selection with --fields parameter
227
+ feat: implement PDF export using pdfkit
228
+ feat: implement Excel export using exceljs
229
+ fix: handle missing company in activities
230
+ perf: optimize list command performance
231
+ ```
232
+
233
+ **Resulting Changelog Section:**
234
+ ```markdown
235
+ ## [1.1.0] - 2026-02-23
236
+
237
+ ### Added
238
+ - Field selection with --fields parameter
239
+ - PDF export format for all list commands
240
+ - Excel export format (.xlsx) for spreadsheet import
241
+ - PDF and Excel export via pdfkit and exceljs libraries
242
+
243
+ ### Fixed
244
+ - Handle missing company references in activities output
245
+
246
+ ### Performance
247
+ - Optimized list command rendering performance
248
+ ```
249
+
250
+ ### Patch Release (1.1.0 → 1.1.1)
251
+
252
+ **Commits:**
253
+ ```
254
+ fix: incorrect field mapping in CSV export
255
+ fix: ESLint configuration warnings
256
+ ```
257
+
258
+ **Resulting Changelog Section:**
259
+ ```markdown
260
+ ## [1.1.1] - 2026-02-24
261
+
262
+ ### Fixed
263
+ - Correct field mapping in CSV export
264
+ - Resolve ESLint configuration warnings
265
+ ```
266
+
267
+ ## Pre-release Versions
268
+
269
+ ### Beta Release
270
+
271
+ ```bash
272
+ npm version prerelease # 1.0.0 → 1.0.1-0
273
+ git push origin main --tags
274
+ # In Manual Publish:
275
+ # version: 1.0.1-0
276
+ # npm_tag: beta
277
+ ```
278
+
279
+ Users can install with:
280
+ ```bash
281
+ npm install -g huntr-cli@beta
282
+ ```
283
+
284
+ ### Release Candidate
285
+
286
+ ```bash
287
+ npm version 1.1.0-rc.1
288
+ git push origin main --tags
289
+ # In Manual Publish:
290
+ # version: 1.1.0-rc.1
291
+ # npm_tag: rc
292
+ ```
293
+
294
+ Users can test with:
295
+ ```bash
296
+ npm install -g huntr-cli@rc
297
+ ```
298
+
299
+ ## Verifying Changelog
300
+
301
+ ### Check Generated Changelog
302
+
303
+ ```bash
304
+ # After release, view CHANGELOG.md
305
+ cat CHANGELOG.md | head -50
306
+
307
+ # Should show new version section with:
308
+ # - Date
309
+ # - Features (from feat: commits)
310
+ # - Fixes (from fix: commits)
311
+ # - Performance (from perf: commits)
312
+ ```
313
+
314
+ ### Check GitHub Release
315
+
316
+ 1. Go to GitHub repo
317
+ 2. Releases tab
318
+ 3. Click latest release
319
+ 4. Verify:
320
+ - Version number
321
+ - Release date
322
+ - Changelog notes
323
+ - Artifacts (tar.gz, zip)
324
+ - npm URL comment
325
+
326
+ ### Check npm Registry
327
+
328
+ ```bash
329
+ # View changelog/release notes
330
+ npm view huntr-cli@1.1.0
331
+
332
+ # Install latest
333
+ npm install -g huntr-cli@latest
334
+
335
+ # Verify version
336
+ huntr --version
337
+ ```
338
+
339
+ ## Updating CHANGELOG Manually
340
+
341
+ If you need to edit the changelog:
342
+
343
+ 1. Edit CHANGELOG.md directly
344
+ 2. Follow Keep a Changelog format
345
+ 3. Commit with `docs: update CHANGELOG.md`
346
+ 4. This commit won't trigger release.yml
347
+ 5. Next version bump will use current CHANGELOG.md
348
+
349
+ **Example:**
350
+ ```bash
351
+ # Edit CHANGELOG.md
352
+ # Add manual notes, fix formatting, etc.
353
+ git add CHANGELOG.md
354
+ git commit -m "docs: update CHANGELOG.md with release notes"
355
+ ```
356
+
357
+ ## Troubleshooting
358
+
359
+ ### Changelog Not Generated
360
+
361
+ **Check:**
362
+ 1. Version actually changed in package.json
363
+ 2. Commit message was pushed with tags
364
+ 3. release.yml workflow ran successfully
365
+ 4. Check workflow logs in GitHub Actions
366
+
367
+ **Fix:**
368
+ ```bash
369
+ # If version didn't bump:
370
+ npm version minor
371
+ git push origin main --tags
372
+
373
+ # If tags didn't push:
374
+ git push origin main --tags # Explicitly push tags
375
+ ```
376
+
377
+ ### Missing Commits in Changelog
378
+
379
+ **Reason:** Commit type doesn't start with `feat:`, `fix:`, `perf:`, etc.
380
+
381
+ **Check:**
382
+ ```bash
383
+ # View last 10 commits
384
+ git log --oneline -10
385
+
386
+ # Should see: feat:, fix:, perf: prefixes
387
+ ```
388
+
389
+ **Fix:** Only `feat:`, `fix:`, and `perf:` commits appear in changelog automatically.
390
+
391
+ ### Changelog Format Wrong
392
+
393
+ **Fix:**
394
+ 1. Manual edit CHANGELOG.md
395
+ 2. Follow [keepachangelog.com](https://keepachangelog.com/) format
396
+ 3. Commit with `docs: fix CHANGELOG format`
397
+
398
+ ## Best Practices
399
+
400
+ ✅ **DO**
401
+ - Use conventional commit format for all user-facing changes
402
+ - Write clear, concise commit messages
403
+ - Group related changes in same PR
404
+ - Update CHANGELOG.md manually if needed
405
+ - Review generated changelog before publishing
406
+
407
+ ❌ **DON'T**
408
+ - Mix internal and user-facing changes in single commit
409
+ - Use non-standard commit prefixes
410
+ - Forget to bump version before publishing
411
+ - Edit CHANGELOG.md after release (edit before next version)
412
+
413
+ ## See Also
414
+
415
+ - [AUTOMATIC-PUBLISHING.md](./AUTOMATIC-PUBLISHING.md) — Publishing workflow
416
+ - [DEV-SETUP.md](./DEV-SETUP.md) — Development setup
417
+ - [Conventional Commits](https://www.conventionalcommits.org/) — Commit format spec
418
+ - [Keep a Changelog](https://keepachangelog.com/) — Changelog format spec