@parseme/cli 0.1.1 → 0.1.3
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/README.md +101 -45
- package/dist/cli/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
# ⚠️ PROJECT DISCONTINUED
|
|
2
|
+
|
|
3
|
+
**This project has been discontinued as of February 16, 2026.**
|
|
4
|
+
|
|
5
|
+
**Reason:** Modern AI coding assistants (Claude Code, Cursor, GitHub Copilot) have evolved to efficiently explore and understand codebases without requiring pre-generated context files. The problem this tool aimed to solve has been addressed by improvements in the AI agents themselves.
|
|
6
|
+
|
|
7
|
+
**What this means:**
|
|
8
|
+
|
|
9
|
+
- No further updates or maintenance
|
|
10
|
+
- npm package has been deprecated
|
|
11
|
+
- Repository will be archived for historical reference
|
|
12
|
+
|
|
13
|
+
**Thank you** to everyone who used or contributed to this project!
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
_Original README below for historical reference:_
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
1
21
|
# PARSEME
|
|
2
22
|
|
|
3
23
|
**Local code analysis and context generation to improve token efficiency of AI Coding agents
|
|
@@ -202,6 +222,10 @@ npx husky init
|
|
|
202
222
|
cat > .husky/post-commit << 'EOF'
|
|
203
223
|
#!/bin/sh
|
|
204
224
|
|
|
225
|
+
# Load nvm if available
|
|
226
|
+
export NVM_DIR="$HOME/.nvm"
|
|
227
|
+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
|
228
|
+
|
|
205
229
|
# Generate PARSEME files locally after commit
|
|
206
230
|
npx @parseme/cli generate
|
|
207
231
|
EOF
|
|
@@ -247,6 +271,10 @@ npx husky init
|
|
|
247
271
|
cat > .husky/post-commit << 'EOF'
|
|
248
272
|
#!/bin/sh
|
|
249
273
|
|
|
274
|
+
# Load nvm if available
|
|
275
|
+
export NVM_DIR="$HOME/.nvm"
|
|
276
|
+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
|
277
|
+
|
|
250
278
|
npx @parseme/cli generate
|
|
251
279
|
EOF
|
|
252
280
|
|
|
@@ -254,6 +282,10 @@ EOF
|
|
|
254
282
|
cat > .husky/pre-push << 'EOF'
|
|
255
283
|
#!/bin/sh
|
|
256
284
|
|
|
285
|
+
# Load nvm if available
|
|
286
|
+
export NVM_DIR="$HOME/.nvm"
|
|
287
|
+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
|
288
|
+
|
|
257
289
|
# Regenerate without git info for clean remote state
|
|
258
290
|
npx @parseme/cli generate --no-git-info
|
|
259
291
|
|
|
@@ -268,6 +300,10 @@ EOF
|
|
|
268
300
|
cat > .husky/post-push << 'EOF'
|
|
269
301
|
#!/bin/sh
|
|
270
302
|
|
|
303
|
+
# Load nvm if available
|
|
304
|
+
export NVM_DIR="$HOME/.nvm"
|
|
305
|
+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
|
306
|
+
|
|
271
307
|
# Regenerate with git info for local development
|
|
272
308
|
npx @parseme/cli generate
|
|
273
309
|
EOF
|
|
@@ -326,19 +362,11 @@ The `--no-verify` flag in pre-push prevents an infinite loop by skipping hook ex
|
|
|
326
362
|
|
|
327
363
|
### Option 4: GitHub Actions for Remote Generation paired with Local Generation
|
|
328
364
|
|
|
329
|
-
Use GitHub Actions to automatically
|
|
365
|
+
Use GitHub Actions to automatically update PARSEME files on every push to main. This is the recommended approach for teams using GitHub.
|
|
330
366
|
|
|
331
367
|
**Setup:**
|
|
332
368
|
|
|
333
|
-
**1.
|
|
334
|
-
|
|
335
|
-
```gitignore
|
|
336
|
-
# Parseme documentation (generated locally and by CI)
|
|
337
|
-
parseme-context/
|
|
338
|
-
PARSEME.md
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
**2. Create `.github/workflows/parseme-update.yml`:**
|
|
369
|
+
**1. Create `.github/workflows/parseme-update.yml`:**
|
|
342
370
|
|
|
343
371
|
```yaml
|
|
344
372
|
name: Update PARSEME Documentation
|
|
@@ -346,7 +374,7 @@ name: Update PARSEME Documentation
|
|
|
346
374
|
on:
|
|
347
375
|
push:
|
|
348
376
|
branches:
|
|
349
|
-
- main
|
|
377
|
+
- 'main'
|
|
350
378
|
|
|
351
379
|
jobs:
|
|
352
380
|
update-parseme:
|
|
@@ -357,49 +385,46 @@ jobs:
|
|
|
357
385
|
GITHUB_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
|
358
386
|
|
|
359
387
|
steps:
|
|
360
|
-
- name:
|
|
361
|
-
id: check_pusher
|
|
388
|
+
- name: Service Account Gate
|
|
362
389
|
run: |
|
|
363
390
|
if [ "${{ github.event.pusher.name }}" = "${{ secrets.GH_SERVICE_ACCOUNT_USERNAME }}" ]; then
|
|
364
|
-
echo "
|
|
365
|
-
|
|
366
|
-
echo "is_bot=false" >> $GITHUB_OUTPUT
|
|
391
|
+
echo "::notice::Skipping workflow - push was made by service account"
|
|
392
|
+
exit 1
|
|
367
393
|
fi
|
|
368
394
|
|
|
369
395
|
- name: Checkout code
|
|
370
|
-
if: steps.check_pusher.outputs.is_bot == 'false'
|
|
371
396
|
uses: actions/checkout@v4
|
|
372
397
|
with:
|
|
373
398
|
fetch-depth: 0
|
|
374
399
|
token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
|
375
400
|
|
|
376
401
|
- name: Setup Node.js
|
|
377
|
-
if: steps.check_pusher.outputs.is_bot == 'false'
|
|
378
402
|
uses: actions/setup-node@v4
|
|
379
403
|
with:
|
|
380
|
-
node-version: '
|
|
404
|
+
node-version: '24'
|
|
381
405
|
cache: 'npm'
|
|
382
406
|
|
|
383
407
|
- name: Configure Git
|
|
384
|
-
if: steps.check_pusher.outputs.is_bot == 'false'
|
|
385
408
|
run: |
|
|
386
409
|
git config user.name "${{ secrets.GH_SERVICE_ACCOUNT_USERNAME }}"
|
|
387
410
|
git config user.email "${{ secrets.GH_SERVICE_ACCOUNT_USERNAME }}@users.noreply.github.com"
|
|
388
411
|
|
|
412
|
+
- name: Configure npm for GitHub Packages
|
|
413
|
+
run: |
|
|
414
|
+
npm config set @netgear:registry https://npm.pkg.github.com/
|
|
415
|
+
npm config set //npm.pkg.github.com/:_authToken "${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}"
|
|
416
|
+
|
|
389
417
|
- name: Install dependencies
|
|
390
|
-
if: steps.check_pusher.outputs.is_bot == 'false'
|
|
391
418
|
run: npm ci
|
|
392
419
|
|
|
393
|
-
- name: Generate
|
|
394
|
-
|
|
395
|
-
run: parseme generate --no-git-info
|
|
420
|
+
- name: Generate PARSEME documentation
|
|
421
|
+
run: npx parseme generate --no-git-info
|
|
396
422
|
|
|
397
|
-
- name:
|
|
398
|
-
|
|
399
|
-
|
|
423
|
+
- name: Stage changes
|
|
424
|
+
run: |
|
|
425
|
+
git add PARSEME.md parseme-context/
|
|
400
426
|
|
|
401
427
|
- name: Check for changes
|
|
402
|
-
if: steps.check_pusher.outputs.is_bot == 'false'
|
|
403
428
|
id: check_changes
|
|
404
429
|
run: |
|
|
405
430
|
if git diff --cached --quiet; then
|
|
@@ -408,56 +433,87 @@ jobs:
|
|
|
408
433
|
echo "changes=true" >> $GITHUB_OUTPUT
|
|
409
434
|
fi
|
|
410
435
|
|
|
411
|
-
- name: Commit
|
|
412
|
-
if: steps.
|
|
436
|
+
- name: Commit
|
|
437
|
+
if: steps.check_changes.outputs.changes == 'true'
|
|
413
438
|
run: |
|
|
414
|
-
git commit
|
|
415
|
-
git push
|
|
439
|
+
git commit -m "chore: Update PARSEME AI Agent Context [skip ci]" --no-verify
|
|
440
|
+
git push
|
|
416
441
|
```
|
|
417
442
|
|
|
418
|
-
**
|
|
443
|
+
**2. Configure GitHub secrets:**
|
|
419
444
|
|
|
420
445
|
- `GH_SERVICE_ACCOUNT_TOKEN`: A GitHub personal access token with repo write permissions
|
|
421
|
-
- `GH_SERVICE_ACCOUNT_USERNAME`: The username of your service account
|
|
446
|
+
- `GH_SERVICE_ACCOUNT_USERNAME`: The username of your service account
|
|
422
447
|
|
|
423
|
-
**
|
|
448
|
+
**3. Setup local git hooks with Husky:**
|
|
424
449
|
|
|
425
450
|
```bash
|
|
426
451
|
# Install Husky (if not already installed)
|
|
427
452
|
npm install --save-dev husky
|
|
428
453
|
npx husky init
|
|
429
454
|
|
|
455
|
+
# Create pre-commit hook
|
|
456
|
+
cat > .husky/pre-commit << 'EOF'
|
|
457
|
+
#!/bin/sh
|
|
458
|
+
|
|
459
|
+
# Pre-commit hook to reset PARSEME files to prevent them from being committed
|
|
460
|
+
for file in $(git ls-files parseme-context/ PARSEME.md 2>/dev/null); do
|
|
461
|
+
git restore --staged "$file" 2>/dev/null
|
|
462
|
+
done
|
|
463
|
+
EOF
|
|
464
|
+
|
|
430
465
|
# Create post-commit hook
|
|
431
466
|
cat > .husky/post-commit << 'EOF'
|
|
432
467
|
#!/bin/sh
|
|
433
468
|
|
|
434
|
-
#
|
|
435
|
-
|
|
469
|
+
# Load nvm if available
|
|
470
|
+
export NVM_DIR="$HOME/.nvm"
|
|
471
|
+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
|
472
|
+
|
|
473
|
+
# Generate PARSEME files locally after commit for local AI agent usage
|
|
474
|
+
npx @parseme/cli generate --no-git-info
|
|
436
475
|
EOF
|
|
437
476
|
|
|
438
477
|
# Create post-merge hook
|
|
439
478
|
cat > .husky/post-merge << 'EOF'
|
|
440
479
|
#!/bin/sh
|
|
441
480
|
|
|
442
|
-
#
|
|
443
|
-
|
|
481
|
+
# Load nvm if available
|
|
482
|
+
export NVM_DIR="$HOME/.nvm"
|
|
483
|
+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
|
484
|
+
|
|
485
|
+
# Generate PARSEME files locally after merge for local AI agent usage
|
|
486
|
+
npx @parseme/cli generate --no-git-info
|
|
487
|
+
EOF
|
|
488
|
+
|
|
489
|
+
# Create post-checkout hook
|
|
490
|
+
cat > .husky/post-checkout << 'EOF'
|
|
491
|
+
#!/bin/sh
|
|
492
|
+
|
|
493
|
+
# Load nvm if available
|
|
494
|
+
export NVM_DIR="$HOME/.nvm"
|
|
495
|
+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
|
496
|
+
|
|
497
|
+
# Generate PARSEME files locally after checkout for local AI agent usage
|
|
498
|
+
npx @parseme/cli generate --no-git-info
|
|
444
499
|
EOF
|
|
445
500
|
|
|
446
501
|
# Make hooks executable
|
|
447
|
-
chmod +x .husky/post-commit .husky/post-merge
|
|
502
|
+
chmod +x .husky/pre-commit .husky/post-commit .husky/post-merge .husky/post-checkout
|
|
448
503
|
```
|
|
449
504
|
|
|
450
505
|
**How it works:**
|
|
451
506
|
|
|
452
|
-
1. **
|
|
453
|
-
2. **
|
|
454
|
-
3. **
|
|
455
|
-
4. **
|
|
507
|
+
1. **On push to main**: GitHub Actions detects the push
|
|
508
|
+
2. **Service account check**: Workflow exits early if the push was made by the service account
|
|
509
|
+
3. **Generate and commit**: Generates PARSEME files with `--no-git-info` flag and creates a new commit with `[skip ci]` message
|
|
510
|
+
4. **Push changes**: The new commit is pushed back to the repository
|
|
511
|
+
5. **Local hooks**: Pre-commit hook prevents PARSEME files from being committed manually, while post-commit/merge/checkout hooks regenerate them locally for AI agent usage
|
|
456
512
|
|
|
457
513
|
**Notes:**
|
|
458
514
|
|
|
459
515
|
- The workflow only runs on the `main` branch (adjust as needed for your branching strategy)
|
|
460
|
-
- If using a custom `contextDir`, update
|
|
516
|
+
- If using a custom `contextDir`, update the paths in both the workflow and hooks accordingly
|
|
461
517
|
|
|
462
518
|
## Configuration
|
|
463
519
|
|
package/dist/cli/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ const program = new Command();
|
|
|
8
8
|
async function promptForMissingConfig(config) {
|
|
9
9
|
return { ...config };
|
|
10
10
|
}
|
|
11
|
-
program.name('parseme').description('AI Project Context Generator').version('0.1.
|
|
11
|
+
program.name('parseme').description('AI Project Context Generator').version('0.1.3');
|
|
12
12
|
// Generate command
|
|
13
13
|
program
|
|
14
14
|
.command('generate')
|
package/package.json
CHANGED