@rahul05ranjan/dhruv-cli 1.4.6 → 1.6.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 +16 -4
  7. package/README.md +145 -40
  8. package/__tests__/cli-contract.test.ts +170 -0
  9. package/__tests__/core.test.ts +193 -1
  10. package/__tests__/diagnostics.test.ts +179 -0
  11. package/__tests__/file-workflows.test.ts +234 -0
  12. package/__tests__/interactive.test.ts +134 -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 +44 -11
  17. package/dist/commands/health.d.ts +4 -1
  18. package/dist/commands/health.js +59 -16
  19. package/dist/commands/init.js +18 -7
  20. package/dist/commands/menu.js +125 -100
  21. package/dist/commands/metrics.d.ts +5 -1
  22. package/dist/commands/metrics.js +49 -10
  23. package/dist/commands/optimize.js +1 -1
  24. package/dist/commands/review.d.ts +4 -1
  25. package/dist/commands/review.js +66 -9
  26. package/dist/commands/security-check.d.ts +4 -1
  27. package/dist/commands/security-check.js +100 -6
  28. package/dist/commands/status.js +44 -4
  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 +106 -21
  36. package/dist/core/logger.js +1 -0
  37. package/dist/core/metrics.d.ts +28 -0
  38. package/dist/core/metrics.js +79 -0
  39. package/dist/index.js +98 -24
  40. package/dist/utils/projectType.d.ts +7 -1
  41. package/dist/utils/projectType.js +91 -13
  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 +50 -11
  53. package/src/commands/health.ts +62 -17
  54. package/src/commands/init.ts +18 -7
  55. package/src/commands/menu.ts +54 -30
  56. package/src/commands/metrics.ts +53 -9
  57. package/src/commands/optimize.ts +1 -1
  58. package/src/commands/review.ts +72 -9
  59. package/src/commands/security-check.ts +111 -6
  60. package/src/commands/status.ts +43 -5
  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 +108 -22
  65. package/src/core/logger.ts +1 -0
  66. package/src/core/metrics.ts +105 -0
  67. package/src/index.ts +97 -24
  68. package/src/utils/projectType.ts +85 -9
  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
@@ -7,10 +7,10 @@
7
7
  --dark-hl-2: #9ECBFF;
8
8
  --light-hl-3: #005CC5;
9
9
  --dark-hl-3: #79B8FF;
10
- --light-hl-4: #D73A49;
11
- --dark-hl-4: #F97583;
12
- --light-hl-5: #6A737D;
13
- --dark-hl-5: #6A737D;
10
+ --light-hl-4: #6A737D;
11
+ --dark-hl-4: #6A737D;
12
+ --light-hl-5: #D73A49;
13
+ --dark-hl-5: #F97583;
14
14
  --light-hl-6: #E36209;
15
15
  --dark-hl-6: #FFAB70;
16
16
  --light-code-background: #fff;
@@ -1,39 +1,161 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Dhruv CLI API - v1.4.0</title><meta name="description" content="Documentation for Dhruv CLI API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">Dhruv CLI API - v1.4.0</a><div id="tsd-toolbar-links"><a href="https://rahul05ranjan.github.io/dhruv-cli/">Home</a><a href="https://github.com/rahul05ranjan/dhruv-cli">GitHub</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>Dhruv CLI API - v1.4.0</h1></div><div class="tsd-panel tsd-typography"><h1 id="dhruv-cli" class="tsd-anchor-link">Dhruv CLI<a href="#dhruv-cli" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><p><a href="https://www.npmjs.com/package/@rahul05ranjan/dhruv-cli">📦 View on npm</a>
2
- <a href="https://rahul05ranjan.github.io/dhruv-cli/">📖 View Documentation on GitHub Pages</a></p>
3
- <p>AI-powered CLI assistant for developers using Ollama.</p>
4
- <h2 id="🚀-features" class="tsd-anchor-link">🚀 Features<a href="#🚀-features" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
5
- <li>Smart command suggestions: <code>suggest</code>, <code>explain</code>, <code>fix</code></li>
6
- <li>Project context detection (Node, React, Python, etc.)</li>
7
- <li>Code review: <code>review &lt;fileOrDir&gt;</code></li>
8
- <li>Code optimization: <code>optimize &lt;file&gt;</code></li>
9
- <li>Security analysis: <code>security-check [fileOrDir]</code></li>
10
- <li>Test/code generation: <code>generate &lt;type&gt; &lt;target&gt;</code></li>
11
- <li>Interactive setup: <code>init</code></li>
12
- <li>Streaming AI responses in terminal</li>
13
- <li>Syntax highlighting for code output</li>
14
- <li>Progress bars for long operations</li>
15
- <li>Plugin system: drop ESM modules in <code>plugins/</code></li>
16
- <li>Autocomplete: <code>completion [shell]</code></li>
17
- <li>Offline-first with local Ollama models</li>
18
- <li>Beautiful, modern CLI UX</li>
19
- </ul>
20
- <h2 id="🛠️-installation" class="tsd-anchor-link">🛠️ Installation<a href="#🛠️-installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-3">-g</span><span class="hl-1"> </span><span class="hl-2">@rahul05ranjan/dhruv-cli</span>
21
- </code><button type="button">Copy</button></pre>
22
-
23
- <p>Or visit the npm page: <a href="https://www.npmjs.com/package/@rahul05ranjan/dhruv-cli">https://www.npmjs.com/package/@rahul05ranjan/dhruv-cli</a></p>
24
- <h2 id="📝-usage-examples" class="tsd-anchor-link">📝 Usage Examples<a href="#📝-usage-examples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="bash"><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">suggest</span><span class="hl-1"> </span><span class="hl-2">&quot;deploy react app to vercel&quot;</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">explain</span><span class="hl-1"> </span><span class="hl-2">&quot;git rebase vs merge&quot;</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">fix</span><span class="hl-1"> </span><span class="hl-2">&quot;cors error in express&quot;</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">review</span><span class="hl-1"> </span><span class="hl-2">src/</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">optimize</span><span class="hl-1"> </span><span class="hl-2">package.json</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">security-check</span><span class="hl-1"> </span><span class="hl-2">src/</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">generate</span><span class="hl-1"> </span><span class="hl-2">tests</span><span class="hl-1"> </span><span class="hl-2">src/utils/helpers.js</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">init</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">completion</span><span class="hl-1"> </span><span class="hl-2">bash</span><span class="hl-1"> </span><span class="hl-4">&gt;</span><span class="hl-1"> </span><span class="hl-2">dhruv-complete.sh</span><span class="hl-1"> </span><span class="hl-5"># Enable tab completion</span>
25
- </code><button type="button">Copy</button></pre>
26
-
27
- <h2 id="🧩-plugins" class="tsd-anchor-link">🧩 Plugins<a href="#🧩-plugins" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Add new commands by dropping ESM modules in the <code>plugins/</code> directory. Example:</p>
28
- <pre><code class="js"><span class="hl-5">// plugins/hello.js</span><br/><span class="hl-4">export</span><span class="hl-1"> </span><span class="hl-4">default</span><span class="hl-1"> (</span><span class="hl-6">program</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> program.</span><span class="hl-0">command</span><span class="hl-1">(</span><span class="hl-2">&#39;hello-plugin&#39;</span><span class="hl-1">).</span><span class="hl-0">action</span><span class="hl-1">(() </span><span class="hl-4">=&gt;</span><span class="hl-1"> console.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Hello from plugin!&#39;</span><span class="hl-1">));</span><br/><span class="hl-1">};</span>
29
- </code><button type="button">Copy</button></pre>
30
-
31
- <h2 id="📦-configuration" class="tsd-anchor-link">📦 Configuration<a href="#📦-configuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
32
- <li>Run <code>dhruv init</code> to set model, response format, and verbosity.</li>
33
- <li>Project type auto-detected for context-aware suggestions.</li>
34
- </ul>
35
- <h2 id="🖥️-advanced-ux" class="tsd-anchor-link">🖥️ Advanced UX<a href="#🖥️-advanced-ux" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
36
- <li>Streaming output, syntax highlighting, progress bars, colored errors, and interactive menus.</li>
37
- </ul>
38
- <h2 id="license" class="tsd-anchor-link">License<a href="#license" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>MIT</p>
39
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#dhruv-cli"><span>Dhruv <wbr/>CLI</span></a><ul><li><a href="#🚀-features"><span>🚀 <wbr/>Features</span></a></li><li><a href="#🛠️-installation"><span>🛠️ <wbr/>Installation</span></a></li><li><a href="#📝-usage-examples"><span>📝 <wbr/>Usage <wbr/>Examples</span></a></li><li><a href="#🧩-plugins"><span>🧩 <wbr/>Plugins</span></a></li><li><a href="#📦-configuration"><span>📦 <wbr/>Configuration</span></a></li><li><a href="#🖥️-advanced-ux"><span>🖥️ <wbr/>Advanced <wbr/>UX</span></a></li><li><a href="#license"><span>License</span></a></li></ul></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://rahul05ranjan.github.io/dhruv-cli/" class="tsd-nav-link">Home</a><a href="https://github.com/rahul05ranjan/dhruv-cli" class="tsd-nav-link">GitHub</a></nav><nav class="tsd-navigation"><a href="modules.html">Dhruv CLI API - v1.4.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Dhruv CLI API - v1.4.0</title><meta name="description" content="Documentation for Dhruv CLI API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">Dhruv CLI API - v1.4.0</a><div id="tsd-toolbar-links"><a href="https://rahul05ranjan.github.io/dhruv-cli/">Home</a><a href="https://github.com/rahul05ranjan/dhruv-cli">GitHub</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>Dhruv CLI API - v1.4.0</h1></div><div class="tsd-panel tsd-typography"><p align="center">
2
+ <a href="https://github.com/rahul05ranjan/dhruv-cli">
3
+ <strong>⚡ Dhruv CLI</strong>
4
+ </a>
5
+ </p>
6
+ <p align="center">
7
+ A local-first AI command center for your terminal.
8
+ </p>
9
+ <p align="center">
10
+ Ask better questions. Understand unfamiliar code. Ship with confidence.
11
+ </p>
12
+ <p align="center">
13
+ <a href="https://rahul05ranjan.github.io/dhruv-cli/">Website</a>
14
+ ·
15
+ <a href="https://www.npmjs.com/package/@rahul05ranjan/dhruv-cli">npm</a>
16
+ ·
17
+ <a href="https://github.com/rahul05ranjan/dhruv-cli/issues">Issues</a>
18
+ ·
19
+ <a href="media/CONTRIBUTING.md">Contributing</a>
20
+ </p>
21
+ <p align="center">
22
+ <a href="https://github.com/rahul05ranjan/dhruv-cli/actions/workflows/deploy.yml"><img src="https://github.com/rahul05ranjan/dhruv-cli/actions/workflows/deploy.yml/badge.svg" alt="Deployment status"></a>
23
+ <a href="https://www.npmjs.com/package/@rahul05ranjan/dhruv-cli"><img src="https://img.shields.io/npm/v/%40rahul05ranjan%2Fdhruv-cli?style=flat-square&label=npm" alt="npm version"></a>
24
+ <a href="https://www.npmjs.com/package/@rahul05ranjan/dhruv-cli"><img src="https://img.shields.io/npm/dm/%40rahul05ranjan%2Fdhruv-cli?style=flat-square&label=downloads" alt="npm downloads"></a>
25
+ <img src="https://img.shields.io/github/license/rahul05ranjan/dhruv-cli?style=flat-square" alt="MIT license">
26
+ </p>
27
+ <p align="center">
28
+ <img src="media/dhruv-cli-preview.svg" alt="Dhruv CLI terminal preview" width="760">
29
+ </p>
30
+ <h2 id="why-dhruv" class="tsd-anchor-link">Why Dhruv?<a href="#why-dhruv" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Dhruv brings a focused AI toolkit into the terminal, powered by local Ollama models. It keeps your workflow close to the codebase, works without a hosted AI account, and turns everyday developer questions into fast, actionable output.</p>
31
+ <table>
32
+ <tr>
33
+ <td width="33%"><strong>✦ Think with you</strong><br>Explain concepts, suggest approaches, and turn errors into clear next steps.</td>
34
+ <td width="33%"><strong>◈ Inspect deeply</strong><br>Review code, optimize files, and scan projects for common security risks.</td>
35
+ <td width="33%"><strong>⌁ Fit your flow</strong><br>Use an interactive menu, shell completion, JSON output, or your own plugins.</td>
36
+ </tr>
37
+ </table>
38
+ <h2 id="start-in-60-seconds" class="tsd-anchor-link">Start in 60 seconds<a href="#start-in-60-seconds" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><h3 id="1-install-dhruv" class="tsd-anchor-link">1. Install Dhruv<a href="#1-install-dhruv" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-3">-g</span><span class="hl-1"> </span><span class="hl-2">@rahul05ranjan/dhruv-cli</span>
39
+ </code><button type="button">Copy</button></pre>
40
+
41
+ <h3 id="2-start-a-local-model" class="tsd-anchor-link">2. Start a local model<a href="#2-start-a-local-model" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Install <a href="https://ollama.com/">Ollama</a>, then run:</p>
42
+ <pre><code class="bash"><span class="hl-0">ollama</span><span class="hl-1"> </span><span class="hl-2">serve</span><br/><span class="hl-0">ollama</span><span class="hl-1"> </span><span class="hl-2">pull</span><span class="hl-1"> </span><span class="hl-2">gemma3:270m</span>
43
+ </code><button type="button">Copy</button></pre>
44
+
45
+ <h3 id="3-configure-once-then-go" class="tsd-anchor-link">3. Configure once, then go<a href="#3-configure-once-then-go" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="bash"><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">init</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">suggest</span><span class="hl-1"> </span><span class="hl-2">&quot;how should I structure this Node.js service?&quot;</span>
46
+ </code><button type="button">Copy</button></pre>
47
+
48
+ <p>Dhruv requires Node.js 18 or newer. The default model is <code>gemma3:270m</code>; choose any model available in your Ollama installation during setup.</p>
49
+ <h2 id="a-command-surface-built-for-shipping" class="tsd-anchor-link">A command surface built for shipping<a href="#a-command-surface-built-for-shipping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><table>
50
+ <thead>
51
+ <tr>
52
+ <th>Command</th>
53
+ <th>What it does</th>
54
+ </tr>
55
+ </thead>
56
+ <tbody>
57
+ <tr>
58
+ <td><code>dhruv suggest &lt;query&gt;</code></td>
59
+ <td>Generate practical suggestions for a development task</td>
60
+ </tr>
61
+ <tr>
62
+ <td><code>dhruv explain &lt;query&gt;</code></td>
63
+ <td>Explain a concept, command, or unfamiliar error</td>
64
+ </tr>
65
+ <tr>
66
+ <td><code>dhruv fix &lt;query&gt;</code></td>
67
+ <td>Analyze a coding issue and propose a fix</td>
68
+ </tr>
69
+ <tr>
70
+ <td><code>dhruv review &lt;file-or-dir&gt;</code></td>
71
+ <td>Review up to ten code files for quality and maintainability; add <code>--diff</code> for uncommitted changes</td>
72
+ </tr>
73
+ <tr>
74
+ <td><code>dhruv optimize &lt;file&gt;</code></td>
75
+ <td>Find actionable improvements for source or configuration files</td>
76
+ </tr>
77
+ <tr>
78
+ <td><code>dhruv security-check [file-or-dir]</code></td>
79
+ <td>Run a redacted local security analysis; add <code>--strict</code> for CI failure on high-confidence findings</td>
80
+ </tr>
81
+ <tr>
82
+ <td><code>dhruv generate &lt;type&gt; &lt;target&gt;</code></td>
83
+ <td>Preview generated tests by default; use <code>--apply</code>, <code>--output</code>, or <code>--overwrite</code> to write safely</td>
84
+ </tr>
85
+ <tr>
86
+ <td><code>dhruv status</code></td>
87
+ <td>Check Ollama connectivity and configured models</td>
88
+ </tr>
89
+ <tr>
90
+ <td><code>dhruv health</code></td>
91
+ <td>Show a concise health summary; use <code>--details</code> for diagnostics</td>
92
+ </tr>
93
+ <tr>
94
+ <td><code>dhruv metrics</code></td>
95
+ <td>Inspect local usage and performance metrics; use <code>--raw</code> or <code>--reset</code> explicitly</td>
96
+ </tr>
97
+ <tr>
98
+ <td><code>dhruv project-type</code></td>
99
+ <td>Detect the current project type</td>
100
+ </tr>
101
+ <tr>
102
+ <td><code>dhruv menu</code></td>
103
+ <td>Open the interactive command palette</td>
104
+ </tr>
105
+ <tr>
106
+ <td><code>dhruv completion [shell]</code></td>
107
+ <td>Generate Bash, Zsh, or Fish completion</td>
108
+ </tr>
109
+ </tbody>
110
+ </table>
111
+ <h3 id="common-workflows" class="tsd-anchor-link">Common workflows<a href="#common-workflows" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="bash"><span class="hl-4"># Understand and plan</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">explain</span><span class="hl-1"> </span><span class="hl-2">&quot;git rebase vs merge&quot;</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">suggest</span><span class="hl-1"> </span><span class="hl-2">&quot;deploy a React app to Vercel&quot;</span><br/><br/><span class="hl-4"># Improve an existing project</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">review</span><span class="hl-1"> </span><span class="hl-2">src/</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">review</span><span class="hl-1"> </span><span class="hl-3">--diff</span><span class="hl-1"> </span><span class="hl-2">.</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">optimize</span><span class="hl-1"> </span><span class="hl-2">package.json</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">security-check</span><span class="hl-1"> </span><span class="hl-2">src/</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">security-check</span><span class="hl-1"> </span><span class="hl-2">src/</span><span class="hl-1"> </span><span class="hl-3">--strict</span><br/><br/><span class="hl-4"># Generate and automate</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">generate</span><span class="hl-1"> </span><span class="hl-2">tests</span><span class="hl-1"> </span><span class="hl-2">src/utils/helpers.js</span><span class="hl-1"> </span><span class="hl-4"># preview only</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">generate</span><span class="hl-1"> </span><span class="hl-2">tests</span><span class="hl-1"> </span><span class="hl-2">src/utils/helpers.js</span><span class="hl-1"> </span><span class="hl-3">--apply</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">completion</span><span class="hl-1"> </span><span class="hl-2">zsh</span><span class="hl-1"> </span><span class="hl-5">&gt;</span><span class="hl-1"> </span><span class="hl-2">~/.zsh/completions/_dhruv</span>
112
+ </code><button type="button">Copy</button></pre>
113
+
114
+ <h2 id="configuration-that-stays-out-of-your-way" class="tsd-anchor-link">Configuration that stays out of your way<a href="#configuration-that-stays-out-of-your-way" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Run <code>dhruv init</code> to set the Ollama model, response format, verbosity, terminal theme, and whether settings are project-local or user-global. Local configuration is stored in <code>.dhruv-config.json</code>; global settings live under your user config directory.</p>
115
+ <p>For one-off runs, use global flags:</p>
116
+ <pre><code class="bash"><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">suggest</span><span class="hl-1"> </span><span class="hl-2">&quot;summarize this migration&quot;</span><span class="hl-1"> </span><span class="hl-3">--model</span><span class="hl-1"> </span><span class="hl-2">llama3.2</span><span class="hl-1"> </span><span class="hl-3">--json</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">review</span><span class="hl-1"> </span><span class="hl-2">src/</span><span class="hl-1"> </span><span class="hl-3">--verbose</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">explain</span><span class="hl-1"> </span><span class="hl-2">&quot;what changed?&quot;</span><span class="hl-1"> </span><span class="hl-3">--timeout</span><span class="hl-1"> </span><span class="hl-3">60000</span>
117
+ </code><button type="button">Copy</button></pre>
118
+
119
+ <h2 id="extend-it-with-plugins" class="tsd-anchor-link">Extend it with plugins<a href="#extend-it-with-plugins" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Drop an ESM module into your project's <code>plugins/</code> directory. Dhruv loads <code>.js</code> plugins before parsing the command line, so you can add commands without changing the core CLI.</p>
120
+ <pre><code class="js"><span class="hl-4">// plugins/hello.js</span><br/><span class="hl-5">export</span><span class="hl-1"> </span><span class="hl-5">default</span><span class="hl-1"> (</span><span class="hl-6">program</span><span class="hl-1">) </span><span class="hl-5">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> program</span><br/><span class="hl-1"> .</span><span class="hl-0">command</span><span class="hl-1">(</span><span class="hl-2">&#39;hello-plugin&#39;</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">description</span><span class="hl-1">(</span><span class="hl-2">&#39;Say hello from a project plugin&#39;</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">action</span><span class="hl-1">(() </span><span class="hl-5">=&gt;</span><span class="hl-1"> console.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Hello from Dhruv!&#39;</span><span class="hl-1">));</span><br/><span class="hl-1">};</span>
121
+ </code><button type="button">Copy</button></pre>
122
+
123
+ <p>Then run:</p>
124
+ <pre><code class="bash"><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">hello-plugin</span>
125
+ </code><button type="button">Copy</button></pre>
126
+
127
+ <h2 id="documentation--project-guides" class="tsd-anchor-link">Documentation &amp; project guides<a href="#documentation--project-guides" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><table>
128
+ <thead>
129
+ <tr>
130
+ <th>Resource</th>
131
+ <th>Link</th>
132
+ </tr>
133
+ </thead>
134
+ <tbody>
135
+ <tr>
136
+ <td>Product site</td>
137
+ <td><a href="https://rahul05ranjan.github.io/dhruv-cli/">rahul05ranjan.github.io/dhruv-cli</a></td>
138
+ </tr>
139
+ <tr>
140
+ <td>API reference</td>
141
+ <td><a href="https://rahul05ranjan.github.io/dhruv-cli/api/">Generated TypeDoc</a></td>
142
+ </tr>
143
+ <tr>
144
+ <td>Contributing</td>
145
+ <td><a href="media/CONTRIBUTING.md">CONTRIBUTING.md</a></td>
146
+ </tr>
147
+ <tr>
148
+ <td>Security policy</td>
149
+ <td><a href="media/SECURITY.md">SECURITY.md</a></td>
150
+ </tr>
151
+ <tr>
152
+ <td>Publishing notes</td>
153
+ <td><a href="media/publishing-fix.md">docs/publishing-fix.md</a></td>
154
+ </tr>
155
+ </tbody>
156
+ </table>
157
+ <h2 id="development" class="tsd-anchor-link">Development<a href="#development" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">type-check</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">test</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">lint</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">build</span>
158
+ </code><button type="button">Copy</button></pre>
159
+
160
+ <h2 id="license" class="tsd-anchor-link">License<a href="#license" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>MIT © <a href="https://github.com/rahul05ranjan">Rahul Ranjan</a></p>
161
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#why-dhruv"><span>Why <wbr/>Dhruv?</span></a><a href="#start-in-60-seconds"><span>Start in 60 seconds</span></a><ul><li><a href="#1-install-dhruv"><span>1. <wbr/>Install <wbr/>Dhruv</span></a></li><li><a href="#2-start-a-local-model"><span>2. <wbr/>Start a local model</span></a></li><li><a href="#3-configure-once-then-go"><span>3. <wbr/>Configure once, then go</span></a></li></ul><a href="#a-command-surface-built-for-shipping"><span>A command surface built for shipping</span></a><ul><li><a href="#common-workflows"><span>Common workflows</span></a></li></ul><a href="#configuration-that-stays-out-of-your-way"><span>Configuration that stays out of your way</span></a><a href="#extend-it-with-plugins"><span>Extend it with plugins</span></a><a href="#documentation--project-guides"><span>Documentation &amp; project guides</span></a><a href="#development"><span>Development</span></a><a href="#license"><span>License</span></a></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://rahul05ranjan.github.io/dhruv-cli/" class="tsd-nav-link">Home</a><a href="https://github.com/rahul05ranjan/dhruv-cli" class="tsd-nav-link">GitHub</a></nav><nav class="tsd-navigation"><a href="modules.html">Dhruv CLI API - v1.4.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,60 @@
1
+ # Contributing to Dhruv CLI
2
+
3
+ Thank you for your interest in contributing! 🎉
4
+
5
+ ## How to Contribute
6
+
7
+ - **Bug Reports & Feature Requests:**
8
+ - Use [GitHub Issues](../../issues) to report bugs or request features.
9
+ - **Pull Requests:**
10
+ - Fork the repo and create a new branch for your change.
11
+ - Write clear, concise commit messages.
12
+ - Ensure your code passes lint and build checks.
13
+ - Add or update tests as needed.
14
+ - Document your changes in the PR description.
15
+
16
+ ## Development Setup
17
+
18
+ 1. Clone the repo and install dependencies:
19
+ ```sh
20
+ git clone <repo-url>
21
+ cd devai-cli
22
+ npm install
23
+ ```
24
+ 2. Build and run locally:
25
+ ```sh
26
+ npm run build
27
+ npm start
28
+ ```
29
+ 3. For development:
30
+ ```sh
31
+ npm run dev
32
+ ```
33
+
34
+ ## Code Style
35
+ - Use TypeScript and follow the existing code style.
36
+ - Run `npx eslint .` before submitting a PR.
37
+
38
+ ## Testing
39
+ - Add tests for new features or bug fixes.
40
+ - Run tests with `npm test`.
41
+
42
+ ## Commit Message Guidelines
43
+ - Use [Conventional Commits](https://www.conventionalcommits.org/) for commit messages.
44
+ - **Allowed PR title types:**
45
+ - feat
46
+ - fix
47
+ - chore
48
+ - docs
49
+ - refactor
50
+ - style
51
+ - test
52
+ - ci
53
+ - Example: `fix: update version to 1.1.3 and improve streaming response handling`
54
+ - PR titles are checked automatically in CI. See `.github/workflows/contribution.yml` for details.
55
+
56
+ ## Code of Conduct
57
+ - Be respectful and inclusive. See [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
58
+
59
+ ## License
60
+ By contributing, you agree that your contributions will be licensed under the MIT License.
@@ -0,0 +1,8 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ If you discover a security vulnerability, please report it via GitHub Issues or contact the maintainers directly. We will respond as quickly as possible.
6
+
7
+ - Do not disclose security issues publicly until they are resolved.
8
+ - Provide as much detail as possible to help us resolve the issue quickly.
@@ -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>