@rahul05ranjan/dhruv-cli 1.4.6 → 1.5.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 (76) hide show
  1. package/.github/workflows/ci.yml +18 -238
  2. package/.github/workflows/contribution.yml +6 -141
  3. package/.github/workflows/dependabot-auto-merge.yml +1 -0
  4. package/.github/workflows/labeler.yml +1 -0
  5. package/.github/workflows/security.yml +3 -0
  6. package/CHANGELOG.md +9 -4
  7. package/README.md +145 -40
  8. package/__tests__/cli-contract.test.ts +104 -0
  9. package/__tests__/core.test.ts +121 -0
  10. package/__tests__/diagnostics.test.ts +155 -0
  11. package/__tests__/file-workflows.test.ts +195 -0
  12. package/__tests__/interactive.test.ts +119 -0
  13. package/__tests__/setup.ts +1 -0
  14. package/__tests__/workflows.test.ts +27 -4
  15. package/dist/commands/generate.d.ts +6 -1
  16. package/dist/commands/generate.js +18 -4
  17. package/dist/commands/health.d.ts +4 -1
  18. package/dist/commands/health.js +59 -16
  19. package/dist/commands/init.js +11 -2
  20. package/dist/commands/menu.js +125 -100
  21. package/dist/commands/metrics.d.ts +5 -1
  22. package/dist/commands/metrics.js +37 -8
  23. package/dist/commands/optimize.js +1 -1
  24. package/dist/commands/review.d.ts +4 -1
  25. package/dist/commands/review.js +48 -8
  26. package/dist/commands/security-check.d.ts +4 -1
  27. package/dist/commands/security-check.js +67 -6
  28. package/dist/commands/status.js +40 -2
  29. package/dist/config/config.d.ts +5 -1
  30. package/dist/config/config.js +24 -7
  31. package/dist/core/ai.d.ts +11 -0
  32. package/dist/core/ai.js +33 -9
  33. package/dist/core/command-catalog.d.ts +10 -0
  34. package/dist/core/command-catalog.js +27 -0
  35. package/dist/core/command-runner.js +100 -21
  36. package/dist/core/logger.js +1 -0
  37. package/dist/core/metrics.d.ts +28 -0
  38. package/dist/core/metrics.js +78 -0
  39. package/dist/index.js +46 -24
  40. package/dist/utils/projectType.d.ts +1 -1
  41. package/dist/utils/projectType.js +26 -7
  42. package/docs/api/assets/highlight.css +4 -4
  43. package/docs/api/index.html +161 -39
  44. package/docs/api/media/CONTRIBUTING.md +60 -0
  45. package/docs/api/media/SECURITY.md +8 -0
  46. package/docs/api/media/dhruv-cli-preview.svg +42 -0
  47. package/docs/api/media/publishing-fix.md +34 -0
  48. package/docs/dhruv-cli-preview.svg +42 -0
  49. package/docs/index.html +631 -533
  50. package/docs/publishing-fix.md +34 -0
  51. package/package.json +1 -1
  52. package/src/commands/generate.ts +23 -4
  53. package/src/commands/health.ts +62 -17
  54. package/src/commands/init.ts +11 -2
  55. package/src/commands/menu.ts +54 -30
  56. package/src/commands/metrics.ts +42 -7
  57. package/src/commands/optimize.ts +1 -1
  58. package/src/commands/review.ts +53 -8
  59. package/src/commands/security-check.ts +80 -6
  60. package/src/commands/status.ts +39 -3
  61. package/src/config/config.ts +26 -7
  62. package/src/core/ai.ts +36 -8
  63. package/src/core/command-catalog.ts +37 -0
  64. package/src/core/command-runner.ts +102 -22
  65. package/src/core/logger.ts +1 -0
  66. package/src/core/metrics.ts +103 -0
  67. package/src/index.ts +45 -24
  68. package/src/utils/projectType.ts +22 -7
  69. package/tsconfig.json +1 -1
  70. package/.github/workflows/auto-assign.yml +0 -14
  71. package/.github/workflows/build-publish.yml +0 -154
  72. package/.github/workflows/deploy.yml +0 -336
  73. package/.github/workflows/monitoring.yml +0 -270
  74. package/PUBLISHING_FIX.md +0 -92
  75. package/logs/.8a99b6cf655346317fdbf29f4fffcf91131432f3-audit.json +0 -15
  76. package/logs/.eee104bf8fff5ecd38a6a2842df260de6470a7c3-audit.json +0 -15
@@ -0,0 +1,42 @@
1
+ <svg width="1200" height="620" viewBox="0 0 1200 620" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="title desc">
2
+ <title id="title">Dhruv CLI terminal preview</title>
3
+ <desc id="desc">A dark terminal window showing Dhruv CLI reviewing a project and returning a structured result.</desc>
4
+ <defs>
5
+ <linearGradient id="background" x1="0" y1="0" x2="1200" y2="620" gradientUnits="userSpaceOnUse">
6
+ <stop stop-color="#121827"/>
7
+ <stop offset="1" stop-color="#202A45"/>
8
+ </linearGradient>
9
+ <linearGradient id="glow" x1="220" y1="70" x2="1020" y2="560" gradientUnits="userSpaceOnUse">
10
+ <stop stop-color="#7C5CFC" stop-opacity="0.42"/>
11
+ <stop offset="1" stop-color="#20D6C7" stop-opacity="0.12"/>
12
+ </linearGradient>
13
+ <filter id="shadow" x="-30%" y="-30%" width="160%" height="160%" color-interpolation-filters="sRGB">
14
+ <feDropShadow dx="0" dy="20" stdDeviation="24" flood-color="#050914" flood-opacity="0.5"/>
15
+ </filter>
16
+ </defs>
17
+ <rect width="1200" height="620" rx="28" fill="url(#background)"/>
18
+ <circle cx="110" cy="88" r="150" fill="#7C5CFC" fill-opacity="0.08"/>
19
+ <circle cx="1120" cy="560" r="220" fill="#20D6C7" fill-opacity="0.06"/>
20
+ <rect x="100" y="70" width="1000" height="480" rx="18" fill="#0B1020" stroke="#3A4668" filter="url(#shadow)"/>
21
+ <rect x="100" y="70" width="1000" height="62" rx="18" fill="#171F35"/>
22
+ <path d="M100 114H1100" stroke="#2A3552"/>
23
+ <circle cx="137" cy="101" r="8" fill="#FF6B6B"/>
24
+ <circle cx="163" cy="101" r="8" fill="#F8C15C"/>
25
+ <circle cx="189" cy="101" r="8" fill="#4DD89A"/>
26
+ <text x="600" y="107" fill="#8994B0" font-family="Arial, sans-serif" font-size="17" text-anchor="middle">dhruv — terminal assistant</text>
27
+ <rect x="132" y="163" width="936" height="350" rx="12" fill="url(#glow)" fill-opacity="0.18"/>
28
+ <text x="155" y="207" fill="#7D8AAA" font-family="monospace" font-size="22">$</text>
29
+ <text x="180" y="207" fill="#E8ECF7" font-family="monospace" font-size="22">dhruv review src/</text>
30
+ <text x="155" y="257" fill="#20D6C7" font-family="monospace" font-size="18">◈ Reviewing project context...</text>
31
+ <text x="155" y="300" fill="#AAB5D1" font-family="monospace" font-size="18">Code quality</text>
32
+ <rect x="330" y="286" width="500" height="11" rx="5.5" fill="#293451"/>
33
+ <rect x="330" y="286" width="430" height="11" rx="5.5" fill="#20D6C7"/>
34
+ <text x="850" y="300" fill="#20D6C7" font-family="monospace" font-size="18">86%</text>
35
+ <text x="155" y="345" fill="#AAB5D1" font-family="monospace" font-size="18">Findings</text>
36
+ <text x="330" y="345" fill="#E8ECF7" font-family="monospace" font-size="18">3 actionable suggestions</text>
37
+ <text x="155" y="390" fill="#AAB5D1" font-family="monospace" font-size="18">Next step</text>
38
+ <text x="330" y="390" fill="#E8ECF7" font-family="monospace" font-size="18">Run dhruv optimize package.json</text>
39
+ <path d="M155 438H1045" stroke="#2A3552" stroke-dasharray="5 9"/>
40
+ <text x="155" y="480" fill="#7C5CFC" font-family="monospace" font-size="18">✓ Local model ready</text>
41
+ <text x="1045" y="480" fill="#687694" font-family="monospace" font-size="18" text-anchor="end">gemma3:270m</text>
42
+ </svg>
@@ -0,0 +1,34 @@
1
+ # npm publishing issue resolution
2
+
3
+ ## Issue
4
+
5
+ GitHub Actions was failing with:
6
+
7
+ ```text
8
+ npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/@rahul05ranjan%2fdhruv-cli - You cannot publish over the previously published versions: 0.0.0-development.
9
+ ```
10
+
11
+ ## Resolution
12
+
13
+ - Updated the package version from `0.0.0-development` to `1.4.0`.
14
+ - Added semantic-release configuration and plugins.
15
+ - Removed direct npm publishing from the CI workflow.
16
+ - Added a dedicated publishing workflow with version-conflict checks.
17
+ - Enabled trusted publishing with npm provenance.
18
+
19
+ ## Release conventions
20
+
21
+ Use conventional commit messages so semantic-release can determine the next version:
22
+
23
+ ```bash
24
+ # Patch
25
+ git commit -m "fix: resolve a connection issue"
26
+
27
+ # Minor
28
+ git commit -m "feat: add a new command"
29
+
30
+ # Major
31
+ git commit -m "feat!: change the command output contract"
32
+ ```
33
+
34
+ The authoritative release configuration lives in [`.releaserc.json`](../.releaserc.json) and the workflows live in [`.github/workflows/`](../.github/workflows/).
@@ -0,0 +1,42 @@
1
+ <svg width="1200" height="620" viewBox="0 0 1200 620" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="title desc">
2
+ <title id="title">Dhruv CLI terminal preview</title>
3
+ <desc id="desc">A dark terminal window showing Dhruv CLI reviewing a project and returning a structured result.</desc>
4
+ <defs>
5
+ <linearGradient id="background" x1="0" y1="0" x2="1200" y2="620" gradientUnits="userSpaceOnUse">
6
+ <stop stop-color="#121827"/>
7
+ <stop offset="1" stop-color="#202A45"/>
8
+ </linearGradient>
9
+ <linearGradient id="glow" x1="220" y1="70" x2="1020" y2="560" gradientUnits="userSpaceOnUse">
10
+ <stop stop-color="#7C5CFC" stop-opacity="0.42"/>
11
+ <stop offset="1" stop-color="#20D6C7" stop-opacity="0.12"/>
12
+ </linearGradient>
13
+ <filter id="shadow" x="-30%" y="-30%" width="160%" height="160%" color-interpolation-filters="sRGB">
14
+ <feDropShadow dx="0" dy="20" stdDeviation="24" flood-color="#050914" flood-opacity="0.5"/>
15
+ </filter>
16
+ </defs>
17
+ <rect width="1200" height="620" rx="28" fill="url(#background)"/>
18
+ <circle cx="110" cy="88" r="150" fill="#7C5CFC" fill-opacity="0.08"/>
19
+ <circle cx="1120" cy="560" r="220" fill="#20D6C7" fill-opacity="0.06"/>
20
+ <rect x="100" y="70" width="1000" height="480" rx="18" fill="#0B1020" stroke="#3A4668" filter="url(#shadow)"/>
21
+ <rect x="100" y="70" width="1000" height="62" rx="18" fill="#171F35"/>
22
+ <path d="M100 114H1100" stroke="#2A3552"/>
23
+ <circle cx="137" cy="101" r="8" fill="#FF6B6B"/>
24
+ <circle cx="163" cy="101" r="8" fill="#F8C15C"/>
25
+ <circle cx="189" cy="101" r="8" fill="#4DD89A"/>
26
+ <text x="600" y="107" fill="#8994B0" font-family="Arial, sans-serif" font-size="17" text-anchor="middle">dhruv — terminal assistant</text>
27
+ <rect x="132" y="163" width="936" height="350" rx="12" fill="url(#glow)" fill-opacity="0.18"/>
28
+ <text x="155" y="207" fill="#7D8AAA" font-family="monospace" font-size="22">$</text>
29
+ <text x="180" y="207" fill="#E8ECF7" font-family="monospace" font-size="22">dhruv review src/</text>
30
+ <text x="155" y="257" fill="#20D6C7" font-family="monospace" font-size="18">◈ Reviewing project context...</text>
31
+ <text x="155" y="300" fill="#AAB5D1" font-family="monospace" font-size="18">Code quality</text>
32
+ <rect x="330" y="286" width="500" height="11" rx="5.5" fill="#293451"/>
33
+ <rect x="330" y="286" width="430" height="11" rx="5.5" fill="#20D6C7"/>
34
+ <text x="850" y="300" fill="#20D6C7" font-family="monospace" font-size="18">86%</text>
35
+ <text x="155" y="345" fill="#AAB5D1" font-family="monospace" font-size="18">Findings</text>
36
+ <text x="330" y="345" fill="#E8ECF7" font-family="monospace" font-size="18">3 actionable suggestions</text>
37
+ <text x="155" y="390" fill="#AAB5D1" font-family="monospace" font-size="18">Next step</text>
38
+ <text x="330" y="390" fill="#E8ECF7" font-family="monospace" font-size="18">Run dhruv optimize package.json</text>
39
+ <path d="M155 438H1045" stroke="#2A3552" stroke-dasharray="5 9"/>
40
+ <text x="155" y="480" fill="#7C5CFC" font-family="monospace" font-size="18">✓ Local model ready</text>
41
+ <text x="1045" y="480" fill="#687694" font-family="monospace" font-size="18" text-anchor="end">gemma3:270m</text>
42
+ </svg>