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.
- package/.env.example +7 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +43 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +29 -0
- package/.github/labels.json +92 -0
- package/.github/pull_request_template.md +64 -0
- package/.github/workflows/ci.yml +87 -0
- package/.github/workflows/labels.yml +27 -0
- package/.github/workflows/manual-publish.yml +105 -0
- package/.github/workflows/publish.yml +57 -0
- package/.github/workflows/release.yml +124 -0
- package/.github/workflows/security-audit.yml +44 -0
- package/.husky/pre-commit +12 -0
- package/.husky/pre-push +27 -0
- package/.lintstagedrc.json +3 -0
- package/AGENTS.md +449 -0
- package/CHANGELOG.md +38 -0
- package/CHANGES.md +259 -0
- package/LICENSE +15 -0
- package/PUBLISHING.md +191 -0
- package/README.md +385 -0
- package/ROADMAP.md +158 -0
- package/SETUP-COMPLETE.md +446 -0
- package/WORKFLOW-SUMMARY.md +368 -0
- package/completions/_huntr +168 -0
- package/completions/huntr.1 +266 -0
- package/completions/huntr.bash +91 -0
- package/dist/api/client.d.ts +14 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +74 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/personal/activities.d.ts +20 -0
- package/dist/api/personal/activities.d.ts.map +1 -0
- package/dist/api/personal/activities.js +50 -0
- package/dist/api/personal/activities.js.map +1 -0
- package/dist/api/personal/boards.d.ts +9 -0
- package/dist/api/personal/boards.d.ts.map +1 -0
- package/dist/api/personal/boards.js +16 -0
- package/dist/api/personal/boards.js.map +1 -0
- package/dist/api/personal/index.d.ts +17 -0
- package/dist/api/personal/index.d.ts.map +1 -0
- package/dist/api/personal/index.js +37 -0
- package/dist/api/personal/index.js.map +1 -0
- package/dist/api/personal/jobs.d.ts +13 -0
- package/dist/api/personal/jobs.d.ts.map +1 -0
- package/dist/api/personal/jobs.js +31 -0
- package/dist/api/personal/jobs.js.map +1 -0
- package/dist/api/personal/user.d.ts +8 -0
- package/dist/api/personal/user.d.ts.map +1 -0
- package/dist/api/personal/user.js +13 -0
- package/dist/api/personal/user.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +501 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/capture-session.d.ts +10 -0
- package/dist/commands/capture-session.d.ts.map +1 -0
- package/dist/commands/capture-session.js +478 -0
- package/dist/commands/capture-session.js.map +1 -0
- package/dist/config/clerk-session-manager.d.ts +44 -0
- package/dist/config/clerk-session-manager.d.ts.map +1 -0
- package/dist/config/clerk-session-manager.js +232 -0
- package/dist/config/clerk-session-manager.js.map +1 -0
- package/dist/config/config-manager.d.ts +15 -0
- package/dist/config/config-manager.d.ts.map +1 -0
- package/dist/config/config-manager.js +51 -0
- package/dist/config/config-manager.js.map +1 -0
- package/dist/config/keychain-manager.d.ts +6 -0
- package/dist/config/keychain-manager.d.ts.map +1 -0
- package/dist/config/keychain-manager.js +37 -0
- package/dist/config/keychain-manager.js.map +1 -0
- package/dist/config/token-capture.d.ts +11 -0
- package/dist/config/token-capture.d.ts.map +1 -0
- package/dist/config/token-capture.js +252 -0
- package/dist/config/token-capture.js.map +1 -0
- package/dist/config/token-manager.d.ts +38 -0
- package/dist/config/token-manager.d.ts.map +1 -0
- package/dist/config/token-manager.js +153 -0
- package/dist/config/token-manager.js.map +1 -0
- package/dist/lib/list-options.d.ts +69 -0
- package/dist/lib/list-options.d.ts.map +1 -0
- package/dist/lib/list-options.js +299 -0
- package/dist/lib/list-options.js.map +1 -0
- package/dist/types/personal.d.ts +113 -0
- package/dist/types/personal.d.ts.map +1 -0
- package/dist/types/personal.js +4 -0
- package/dist/types/personal.js.map +1 -0
- package/docs/AUTOMATIC-PUBLISHING.md +520 -0
- package/docs/CHANGELOG-AUTOMATION.md +418 -0
- package/docs/CI-CD-SETUP.md +582 -0
- package/docs/DEV-SETUP.md +512 -0
- package/docs/ENHANCEMENT-PLAN.md +204 -0
- package/docs/ENTITY-TYPES.md +462 -0
- package/docs/GITHUB-ACTIONS-GUIDE.md +367 -0
- package/docs/NPM-PUBLISHING.md +324 -0
- package/docs/OUTPUT-EXAMPLES.md +414 -0
- package/docs/OUTPUT-FORMATS.md +299 -0
- package/docs/TESTING.md +216 -0
- package/eslint.config.js +68 -0
- package/package.json +64 -0
- package/src/api/client.ts +88 -0
- package/src/api/personal/activities.ts +66 -0
- package/src/api/personal/boards.ts +14 -0
- package/src/api/personal/index.ts +25 -0
- package/src/api/personal/jobs.ts +33 -0
- package/src/api/personal/user.ts +10 -0
- package/src/cli.ts +487 -0
- package/src/commands/capture-session.ts +582 -0
- package/src/config/clerk-session-manager.ts +263 -0
- package/src/config/config-manager.ts +56 -0
- package/src/config/keychain-manager.ts +30 -0
- package/src/config/token-capture.ts +233 -0
- package/src/config/token-manager.ts +139 -0
- package/src/lib/list-options.ts +370 -0
- package/src/types/personal.ts +114 -0
- package/tests/example.test.ts +130 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
# huntr-cli Complete Workflow Summary
|
|
2
|
+
|
|
3
|
+
Comprehensive overview of the huntr-cli development, testing, and publishing workflows.
|
|
4
|
+
|
|
5
|
+
## 🚀 Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# 1. Clone and setup
|
|
9
|
+
git clone https://github.com/mattmck/huntr-cli.git
|
|
10
|
+
cd huntr-cli
|
|
11
|
+
npm install # Automatically sets up git hooks
|
|
12
|
+
|
|
13
|
+
# 2. Verify setup
|
|
14
|
+
npm run build && npm run lint && npm run typecheck
|
|
15
|
+
|
|
16
|
+
# 3. Make changes
|
|
17
|
+
git checkout -b feat/my-feature
|
|
18
|
+
npm run dev -- boards list # Test changes
|
|
19
|
+
npm run lint:fix # Auto-fix style
|
|
20
|
+
git commit -m "feat: add feature" # Pre-commit hook runs
|
|
21
|
+
git push origin feat/my-feature # Pre-push hook runs
|
|
22
|
+
|
|
23
|
+
# 4. Create PR on GitHub
|
|
24
|
+
# → CI runs automatically (lint, typecheck, build, test)
|
|
25
|
+
|
|
26
|
+
# 5. Publish (from main)
|
|
27
|
+
npm version minor # Bumps version
|
|
28
|
+
git push origin main --tags
|
|
29
|
+
# → release.yml creates GitHub Release
|
|
30
|
+
# → publish.yml publishes to npm
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 📋 Workflows at a Glance
|
|
34
|
+
|
|
35
|
+
### Local Development Hooks
|
|
36
|
+
| Hook | When | Actions |
|
|
37
|
+
|------|------|---------|
|
|
38
|
+
| **pre-commit** | On `git commit` | Lints staged files, auto-fixes, blocks if errors |
|
|
39
|
+
| **pre-push** | On `git push` | Typecheck → Lint → Build, blocks if any fail |
|
|
40
|
+
|
|
41
|
+
### GitHub Actions CI
|
|
42
|
+
| Workflow | Trigger | Actions |
|
|
43
|
+
|----------|---------|---------|
|
|
44
|
+
| **CI** | Every push + PR | Lint, typecheck, build, test (parallel) |
|
|
45
|
+
| **Labels** | Push to main (labels.json changed) | Syncs GitHub labels |
|
|
46
|
+
| **Security Audit** | Daily + push + dispatch | npm audit checks for vulnerabilities |
|
|
47
|
+
| **Release** | Version bump on main | Creates artifacts, GitHub Release, triggers publish |
|
|
48
|
+
| **Publish** | GitHub Release published | Runs CI, npm publish, comments on release |
|
|
49
|
+
| **Manual Publish** | Manual dispatch | Custom version + npm tag, creates release |
|
|
50
|
+
|
|
51
|
+
### Automatic Publishing Pipeline
|
|
52
|
+
```
|
|
53
|
+
npm version minor
|
|
54
|
+
↓
|
|
55
|
+
git push origin main --tags
|
|
56
|
+
↓
|
|
57
|
+
GitHub detects version change
|
|
58
|
+
↓
|
|
59
|
+
release.yml workflow triggers
|
|
60
|
+
├→ Creates tar.gz + zip archives
|
|
61
|
+
├→ Creates git tags
|
|
62
|
+
├→ Auto-generates changelog
|
|
63
|
+
├→ Creates GitHub Release with artifacts
|
|
64
|
+
└→ Triggers publish.yml
|
|
65
|
+
↓
|
|
66
|
+
publish.yml triggers
|
|
67
|
+
├→ Runs full CI pipeline
|
|
68
|
+
├→ npm publish
|
|
69
|
+
└→ Comments on release with npm URL
|
|
70
|
+
↓
|
|
71
|
+
✅ Live on npmjs.com
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 📚 Documentation
|
|
75
|
+
|
|
76
|
+
| Document | Purpose | Audience |
|
|
77
|
+
|----------|---------|----------|
|
|
78
|
+
| **DEV-SETUP.md** | Local development setup | Developers |
|
|
79
|
+
| **CI-CD-SETUP.md** | Git hooks configuration | Developers |
|
|
80
|
+
| **GITHUB-ACTIONS-GUIDE.md** | Workflow reference | DevOps/Maintainers |
|
|
81
|
+
| **AUTOMATIC-PUBLISHING.md** | Publishing workflow | Maintainers/Release managers |
|
|
82
|
+
| **TESTING.md** | Test suite & verification | QA/Developers |
|
|
83
|
+
| **ENTITY-TYPES.md** | Type schemas | API users |
|
|
84
|
+
| **OUTPUT-FORMATS.md** | Field reference | Users |
|
|
85
|
+
| **OUTPUT-EXAMPLES.md** | Usage examples | Users |
|
|
86
|
+
| **NPM-PUBLISHING.md** | Distribution explained | Users |
|
|
87
|
+
|
|
88
|
+
## 🔄 Git Workflow
|
|
89
|
+
|
|
90
|
+
### Branch Strategy
|
|
91
|
+
- **main** — Production-ready code
|
|
92
|
+
- **develop** — Integration branch (optional)
|
|
93
|
+
- **feat/*** — Feature branches
|
|
94
|
+
- **fix/*** — Bug fix branches
|
|
95
|
+
- **docs/*** — Documentation branches
|
|
96
|
+
|
|
97
|
+
### Commit Messages
|
|
98
|
+
Use [Conventional Commits](https://www.conventionalcommits.org/):
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
feat: add new feature
|
|
102
|
+
fix: resolve bug
|
|
103
|
+
docs: update documentation
|
|
104
|
+
chore: update dependencies
|
|
105
|
+
refactor: restructure code
|
|
106
|
+
test: add test cases
|
|
107
|
+
perf: improve performance
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Pull Request Process
|
|
111
|
+
1. Create branch: `git checkout -b feat/new-feature`
|
|
112
|
+
2. Make changes: `npm run lint:fix && npm run build`
|
|
113
|
+
3. Commit: `git commit -m "feat: description"` (pre-commit hook runs)
|
|
114
|
+
4. Push: `git push origin feat/new-feature` (pre-push hook runs)
|
|
115
|
+
5. Create PR on GitHub
|
|
116
|
+
6. CI runs automatically (lint, typecheck, build, test)
|
|
117
|
+
7. Code review and approval
|
|
118
|
+
8. Squash merge to main
|
|
119
|
+
|
|
120
|
+
## 🧪 Testing
|
|
121
|
+
|
|
122
|
+
### Running Tests
|
|
123
|
+
```bash
|
|
124
|
+
npm test # Run all tests
|
|
125
|
+
npm test -- --watch # Watch mode
|
|
126
|
+
npm test -- --coverage # Coverage report
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Test Structure
|
|
130
|
+
- **Command Structure** — Verifies CLI commands exist
|
|
131
|
+
- **Build & Compilation** — Documents CI checks
|
|
132
|
+
- **Git Workflow** — Verifies conventional commits
|
|
133
|
+
- **Publishing Workflow** — Documents release process
|
|
134
|
+
- **Output Formatting** — Verifies formats (table, JSON, CSV, PDF, Excel)
|
|
135
|
+
- **Documentation** — Confirms guides exist
|
|
136
|
+
|
|
137
|
+
### CI Test Execution
|
|
138
|
+
- Runs on every push and PR
|
|
139
|
+
- Must pass before merging
|
|
140
|
+
- GitHub Actions runs: `npm test`
|
|
141
|
+
- Uses Vitest framework
|
|
142
|
+
|
|
143
|
+
## 📦 Publishing
|
|
144
|
+
|
|
145
|
+
### Version Bumping
|
|
146
|
+
```bash
|
|
147
|
+
npm version major # 1.0.0 → 2.0.0 (breaking changes)
|
|
148
|
+
npm version minor # 1.0.0 → 1.1.0 (new features)
|
|
149
|
+
npm version patch # 1.0.0 → 1.0.1 (bug fixes)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Release Artifacts
|
|
153
|
+
Available on [GitHub Releases](https://github.com/mattmck/huntr-cli/releases):
|
|
154
|
+
- `huntr-cli-{version}.tar.gz` — Gzipped tarball
|
|
155
|
+
- `huntr-cli-{version}.zip` — ZIP archive
|
|
156
|
+
|
|
157
|
+
Both contain compiled `dist/` directory ready to use.
|
|
158
|
+
|
|
159
|
+
### Installation Methods
|
|
160
|
+
```bash
|
|
161
|
+
# From npm (recommended)
|
|
162
|
+
npm install -g huntr-cli
|
|
163
|
+
|
|
164
|
+
# From GitHub releases
|
|
165
|
+
wget https://github.com/mattmck/huntr-cli/releases/download/v1.0.0/huntr-cli-1.0.0.tar.gz
|
|
166
|
+
tar xzf huntr-cli-1.0.0.tar.gz
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Pre-release Versions
|
|
170
|
+
```bash
|
|
171
|
+
npm version prerelease # 1.0.0 → 1.0.1-0
|
|
172
|
+
# Then use Manual Publish with npm_tag: beta
|
|
173
|
+
|
|
174
|
+
npm version 1.1.0-rc.1 # Release candidate
|
|
175
|
+
# Then use Manual Publish with npm_tag: rc
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## 🏷️ GitHub Labels
|
|
179
|
+
|
|
180
|
+
### Type Labels
|
|
181
|
+
- `type/bug` — Something isn't working
|
|
182
|
+
- `type/feature` — New feature or enhancement
|
|
183
|
+
- `type/docs` — Documentation improvements
|
|
184
|
+
- `type/chore` — Build, dependencies, tooling
|
|
185
|
+
- `type/refactor` — Code restructuring
|
|
186
|
+
- `type/test` — Test improvements
|
|
187
|
+
- `type/perf` — Performance improvements
|
|
188
|
+
|
|
189
|
+
### Priority Labels
|
|
190
|
+
- `priority/critical` — Blocking, immediate attention
|
|
191
|
+
- `priority/high` — Should be addressed soon
|
|
192
|
+
- `priority/low` — Nice-to-have
|
|
193
|
+
|
|
194
|
+
### Status Labels
|
|
195
|
+
- `status/in-progress` — Currently being worked on
|
|
196
|
+
- `status/blocked` — Blocked by another issue
|
|
197
|
+
- `status/needs-review` — Waiting for code review
|
|
198
|
+
- `status/needs-testing` — Ready for testing
|
|
199
|
+
|
|
200
|
+
### Scope Labels
|
|
201
|
+
- `scope/cli` — Core CLI commands
|
|
202
|
+
- `scope/auth` — Authentication
|
|
203
|
+
- `scope/output` — Output formatting
|
|
204
|
+
- `scope/infra` — CI/CD and tooling
|
|
205
|
+
|
|
206
|
+
## 🔐 Security
|
|
207
|
+
|
|
208
|
+
### Pre-commit Checks
|
|
209
|
+
- ESLint with TypeScript rules
|
|
210
|
+
- Auto-fix enabled
|
|
211
|
+
- Blocks on errors
|
|
212
|
+
|
|
213
|
+
### Pre-push Checks
|
|
214
|
+
- TypeScript type checking
|
|
215
|
+
- Full ESLint (all files)
|
|
216
|
+
- Build verification
|
|
217
|
+
|
|
218
|
+
### CI Security
|
|
219
|
+
- Daily npm audit
|
|
220
|
+
- Runs on every push/PR
|
|
221
|
+
- Checks for medium+ vulnerabilities
|
|
222
|
+
- Uploads audit report as artifact
|
|
223
|
+
|
|
224
|
+
### Secrets Required
|
|
225
|
+
- **NPM_TOKEN** — For npm publishing
|
|
226
|
+
- Generate at npmjs.com → Access Tokens
|
|
227
|
+
- Must be "Automation" level
|
|
228
|
+
- Add to GitHub: Settings → Secrets → Actions
|
|
229
|
+
|
|
230
|
+
## 📊 Workflow Status
|
|
231
|
+
|
|
232
|
+
### Monitoring Release
|
|
233
|
+
```bash
|
|
234
|
+
# Check GitHub Actions
|
|
235
|
+
# → Actions tab → Select workflow → View run
|
|
236
|
+
|
|
237
|
+
# Check npm registry
|
|
238
|
+
npm view huntr-cli version
|
|
239
|
+
|
|
240
|
+
# Install and verify
|
|
241
|
+
npm install -g huntr-cli@latest
|
|
242
|
+
huntr --version
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Release Timeline Example
|
|
246
|
+
```
|
|
247
|
+
Mon 2:00 PM → npm version minor (1.0.0 → 1.1.0)
|
|
248
|
+
Mon 2:05 PM → git push origin main --tags
|
|
249
|
+
↓ release.yml triggers
|
|
250
|
+
Mon 2:15 PM → GitHub Release created with artifacts
|
|
251
|
+
↓ publish.yml triggers
|
|
252
|
+
Mon 2:20 PM → npm publish completes
|
|
253
|
+
Mon 2:25 PM ✅ huntr-cli@1.1.0 live on npmjs.com
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## 🐛 Troubleshooting
|
|
257
|
+
|
|
258
|
+
### Hooks Not Running
|
|
259
|
+
```bash
|
|
260
|
+
npm run prepare # Reinstall hooks
|
|
261
|
+
ls -la .husky/ # Verify files exist
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Lint Errors on Commit
|
|
265
|
+
```bash
|
|
266
|
+
npm run lint:fix # Auto-fix
|
|
267
|
+
git add .
|
|
268
|
+
git commit -m "..."
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Build Failing on Push
|
|
272
|
+
```bash
|
|
273
|
+
npm run build # See error details
|
|
274
|
+
npm run typecheck # See type errors
|
|
275
|
+
# Fix issues, then retry push
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Release Workflow Failed
|
|
279
|
+
1. Check GitHub Actions tab
|
|
280
|
+
2. Read error message in workflow run
|
|
281
|
+
3. Fix issue locally
|
|
282
|
+
4. Create new version tag
|
|
283
|
+
5. Push to trigger workflow again
|
|
284
|
+
|
|
285
|
+
## 📞 Support
|
|
286
|
+
|
|
287
|
+
- **Documentation:** See `docs/` directory
|
|
288
|
+
- **Issues:** Use GitHub Issues with labels
|
|
289
|
+
- **Discussions:** GitHub Discussions
|
|
290
|
+
- **Updates:** Watch releases on npm
|
|
291
|
+
|
|
292
|
+
## 🎯 Success Criteria
|
|
293
|
+
|
|
294
|
+
✅ **Local Development**
|
|
295
|
+
- Pre-commit hook runs and blocks on errors
|
|
296
|
+
- Pre-push hook verifies typecheck, lint, build
|
|
297
|
+
- npm run build && npm run lint && npm run typecheck pass
|
|
298
|
+
|
|
299
|
+
✅ **Testing**
|
|
300
|
+
- npm test passes
|
|
301
|
+
- All test suites documented
|
|
302
|
+
- CI runs tests on every push/PR
|
|
303
|
+
|
|
304
|
+
✅ **Publishing**
|
|
305
|
+
- Version bump creates automatic release
|
|
306
|
+
- GitHub Release has artifacts
|
|
307
|
+
- npm package published automatically
|
|
308
|
+
- Users can `npm install -g huntr-cli@latest`
|
|
309
|
+
|
|
310
|
+
✅ **Documentation**
|
|
311
|
+
- All workflows documented
|
|
312
|
+
- Labels sync automatically
|
|
313
|
+
- Guides updated with changes
|
|
314
|
+
- Man page available: `man huntr`
|
|
315
|
+
|
|
316
|
+
## 📚 Complete File Index
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
huntr-cli/
|
|
320
|
+
├── .github/
|
|
321
|
+
│ ├── workflows/
|
|
322
|
+
│ │ ├── ci.yml ← Lint, typecheck, build, test
|
|
323
|
+
│ │ ├── publish.yml ← Auto-publish on release
|
|
324
|
+
│ │ ├── manual-publish.yml ← Manual dispatch publish
|
|
325
|
+
│ │ ├── release.yml ← Auto-create releases
|
|
326
|
+
│ │ ├── security-audit.yml ← Daily npm audit
|
|
327
|
+
│ │ └── labels.yml ← Sync labels
|
|
328
|
+
│ ├── labels.json ← Label definitions
|
|
329
|
+
│ ├── ISSUE_TEMPLATE/
|
|
330
|
+
│ │ ├── bug_report.md
|
|
331
|
+
│ │ ├── feature_request.md
|
|
332
|
+
│ │ └── config.yml
|
|
333
|
+
│ └── pull_request_template.md
|
|
334
|
+
├── .husky/
|
|
335
|
+
│ ├── pre-commit ← Lint staged files
|
|
336
|
+
│ └── pre-push ← Typecheck, lint, build
|
|
337
|
+
├── docs/
|
|
338
|
+
│ ├── DEV-SETUP.md
|
|
339
|
+
│ ├── CI-CD-SETUP.md
|
|
340
|
+
│ ├── AUTOMATIC-PUBLISHING.md
|
|
341
|
+
│ ├── TESTING.md
|
|
342
|
+
│ ├── ENTITY-TYPES.md
|
|
343
|
+
│ ├── OUTPUT-FORMATS.md
|
|
344
|
+
│ ├── OUTPUT-EXAMPLES.md
|
|
345
|
+
│ └── NPM-PUBLISHING.md
|
|
346
|
+
├── tests/
|
|
347
|
+
│ └── example.test.ts ← Test suite (19 cases)
|
|
348
|
+
├── src/
|
|
349
|
+
│ ├── cli.ts ← Main CLI entry
|
|
350
|
+
│ ├── commands/ ← Command handlers
|
|
351
|
+
│ ├── api/ ← API clients
|
|
352
|
+
│ ├── config/ ← Configuration
|
|
353
|
+
│ ├── lib/ ← Utilities
|
|
354
|
+
│ └── types/ ← TypeScript types
|
|
355
|
+
├── package.json ← Scripts, dependencies
|
|
356
|
+
├── eslint.config.js ← Linting config
|
|
357
|
+
├── .lintstagedrc.json ← Staged file linting
|
|
358
|
+
├── tsconfig.json ← TypeScript config
|
|
359
|
+
├── CHANGELOG.md ← Version history
|
|
360
|
+
├── README.md ← Project overview
|
|
361
|
+
└── WORKFLOW-SUMMARY.md ← This file
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
**Last Updated:** February 23, 2026
|
|
367
|
+
**Status:** ✅ Production Ready
|
|
368
|
+
**Version:** 1.0.0
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#compdef huntr
|
|
2
|
+
|
|
3
|
+
_huntr() {
|
|
4
|
+
local -a commands
|
|
5
|
+
commands=(
|
|
6
|
+
'me:Show your user profile'
|
|
7
|
+
'boards:Manage your boards'
|
|
8
|
+
'jobs:Manage jobs on your boards'
|
|
9
|
+
'activities:View your board activity log'
|
|
10
|
+
'config:Manage CLI configuration'
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
local -a boards_commands
|
|
14
|
+
boards_commands=(
|
|
15
|
+
'list:List your boards'
|
|
16
|
+
'get:Get details for a specific board'
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
local -a jobs_commands
|
|
20
|
+
jobs_commands=(
|
|
21
|
+
'list:List jobs on a board'
|
|
22
|
+
'get:Get details for a specific job'
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
local -a activities_commands
|
|
26
|
+
activities_commands=(
|
|
27
|
+
'list:List activities for a board'
|
|
28
|
+
'week-csv:Export last 7 days as CSV'
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
local -a config_commands
|
|
32
|
+
config_commands=(
|
|
33
|
+
'capture-session:Extract Clerk session via Chrome DevTools'
|
|
34
|
+
'test-session:Verify stored session works'
|
|
35
|
+
'check-cdp:Check Chrome DevTools Protocol connection'
|
|
36
|
+
'set-token:Save API token to config'
|
|
37
|
+
'show-token:Show configured token sources'
|
|
38
|
+
'clear-token:Remove saved token'
|
|
39
|
+
'clear-session:Remove stored Clerk session'
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
local -a global_opts
|
|
43
|
+
global_opts=(
|
|
44
|
+
'(-t --token)'{-t,--token}'[API token]:token:'
|
|
45
|
+
'(-h --help)'{-h,--help}'[Display help]'
|
|
46
|
+
'(-V --version)'{-V,--version}'[Output version number]'
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
local -a format_opts
|
|
50
|
+
format_opts=(
|
|
51
|
+
'(-f --format)'{-f,--format}'[Output format]:format:(table json csv pdf excel)'
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
local -a field_opts
|
|
55
|
+
field_opts=(
|
|
56
|
+
'(--fields)--fields[Comma-separated list of fields to include]:fields:'
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
local -a list_opts
|
|
60
|
+
list_opts=(
|
|
61
|
+
$format_opts
|
|
62
|
+
$field_opts
|
|
63
|
+
'(-d --days)'{-d,--days}'[Filter to last N days]:days:'
|
|
64
|
+
'(-w --week)'{-w,--week}'[Filter to last 7 days]'
|
|
65
|
+
'(--types)--types[Filter by action types]:types:'
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
_arguments -C \
|
|
69
|
+
$global_opts \
|
|
70
|
+
'1: :->command' \
|
|
71
|
+
'*::arg:->args'
|
|
72
|
+
|
|
73
|
+
case $state in
|
|
74
|
+
command)
|
|
75
|
+
_describe 'huntr command' commands
|
|
76
|
+
;;
|
|
77
|
+
args)
|
|
78
|
+
case $line[1] in
|
|
79
|
+
me)
|
|
80
|
+
_arguments $format_opts
|
|
81
|
+
;;
|
|
82
|
+
boards)
|
|
83
|
+
_arguments -C \
|
|
84
|
+
'1: :->subcommand' \
|
|
85
|
+
'*::arg:->args'
|
|
86
|
+
|
|
87
|
+
case $state in
|
|
88
|
+
subcommand)
|
|
89
|
+
_describe 'boards subcommand' boards_commands
|
|
90
|
+
;;
|
|
91
|
+
args)
|
|
92
|
+
case $line[1] in
|
|
93
|
+
list|get)
|
|
94
|
+
_arguments $format_opts
|
|
95
|
+
;;
|
|
96
|
+
esac
|
|
97
|
+
;;
|
|
98
|
+
esac
|
|
99
|
+
;;
|
|
100
|
+
jobs)
|
|
101
|
+
_arguments -C \
|
|
102
|
+
'1: :->subcommand' \
|
|
103
|
+
'*::arg:->args'
|
|
104
|
+
|
|
105
|
+
case $state in
|
|
106
|
+
subcommand)
|
|
107
|
+
_describe 'jobs subcommand' jobs_commands
|
|
108
|
+
;;
|
|
109
|
+
args)
|
|
110
|
+
case $line[1] in
|
|
111
|
+
list|get)
|
|
112
|
+
_arguments $format_opts
|
|
113
|
+
;;
|
|
114
|
+
esac
|
|
115
|
+
;;
|
|
116
|
+
esac
|
|
117
|
+
;;
|
|
118
|
+
activities)
|
|
119
|
+
_arguments -C \
|
|
120
|
+
'1: :->subcommand' \
|
|
121
|
+
'*::arg:->args'
|
|
122
|
+
|
|
123
|
+
case $state in
|
|
124
|
+
subcommand)
|
|
125
|
+
_describe 'activities subcommand' activities_commands
|
|
126
|
+
;;
|
|
127
|
+
args)
|
|
128
|
+
case $line[1] in
|
|
129
|
+
list)
|
|
130
|
+
_arguments $list_opts
|
|
131
|
+
;;
|
|
132
|
+
week-csv)
|
|
133
|
+
# No additional options
|
|
134
|
+
;;
|
|
135
|
+
esac
|
|
136
|
+
;;
|
|
137
|
+
esac
|
|
138
|
+
;;
|
|
139
|
+
config)
|
|
140
|
+
_arguments -C \
|
|
141
|
+
'1: :->subcommand' \
|
|
142
|
+
'*::arg:->args'
|
|
143
|
+
|
|
144
|
+
case $state in
|
|
145
|
+
subcommand)
|
|
146
|
+
_describe 'config subcommand' config_commands
|
|
147
|
+
;;
|
|
148
|
+
args)
|
|
149
|
+
case $line[1] in
|
|
150
|
+
capture-session|test-session|check-cdp|show-token|clear-session)
|
|
151
|
+
# No additional arguments
|
|
152
|
+
;;
|
|
153
|
+
set-token)
|
|
154
|
+
_arguments '1:token:'
|
|
155
|
+
;;
|
|
156
|
+
clear-token)
|
|
157
|
+
_arguments '(--all)--all[Clear all token sources]'
|
|
158
|
+
;;
|
|
159
|
+
esac
|
|
160
|
+
;;
|
|
161
|
+
esac
|
|
162
|
+
;;
|
|
163
|
+
esac
|
|
164
|
+
;;
|
|
165
|
+
esac
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
_huntr "$@"
|