neuro-commit 0.1.0 → 0.1.1

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 CHANGED
@@ -1,17 +1,43 @@
1
1
  <h1 align="center">NeuroCommit</h1>
2
2
  <p align="center">
3
- <a href="https://www.npmjs.com/package/neuro-commit"><img src="https://img.shields.io/npm/v/neuro-commit.svg?colorB=97CA00&label=version"></a>
4
- <a href="https://www.npmjs.com/package/neuro-commit"><img src="https://img.shields.io/npm/dm/neuro-commit.svg?colorB=97CA00&label=downloads"></a>
5
- <a href="https://github.com/cr1ma/neuro-commit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/cr1ma/neuro-commit"></a>
6
- <a href="https://github.com/cr1ma/neuro-commit/actions/workflows/publish.yml"><img src="https://github.com/cr1ma/neuro-commit/actions/workflows/publish.yml/badge.svg"></a>
3
+ <strong>AI-ready commit message generator powered by <code>git diff</code></strong>
7
4
  </p>
8
-
9
5
  <p align="center">
10
- A tool for generating high-quality commit messages based on <code>git diff</code>, designed for further use with neural networks.
6
+ <a href="https://www.npmjs.com/package/neuro-commit"><img src="https://img.shields.io/npm/v/neuro-commit.svg?colorB=97CA00&label=version" alt="npm version"></a>
7
+ <a href="https://www.npmjs.com/package/neuro-commit"><img src="https://img.shields.io/npm/dm/neuro-commit.svg?colorB=97CA00&label=downloads" alt="npm downloads"></a>
8
+ <a href="https://github.com/cr1ma/neuro-commit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/cr1ma/neuro-commit" alt="license"></a>
9
+ <a href="https://github.com/cr1ma/neuro-commit/actions/workflows/publish.yml"><img src="https://github.com/cr1ma/neuro-commit/actions/workflows/publish.yml/badge.svg" alt="publish status"></a>
10
+ <a href="https://github.com/cr1ma/neuro-commit/issues"><img src="https://img.shields.io/github/issues/cr1ma/neuro-commit" alt="open issues"></a>
11
11
  </p>
12
12
 
13
13
  ---
14
14
 
15
+ **NeuroCommit** is a zero-config CLI tool that analyzes your staged Git changes and generates a clean, structured Markdown summary — ready to be fed into any AI/LLM for high-quality commit message generation.
16
+
17
+ <p align="center">
18
+ <img src="docs/assets/neuro-commit-screenshot.png" alt="NeuroCommit CLI screenshot" width="700">
19
+ </p>
20
+
21
+ ## Table of Contents
22
+
23
+ - [Features](#-features)
24
+ - [Quick Start](#-quick-start)
25
+ - [How It Works](#-how-it-works)
26
+ - [Development](#-development)
27
+ - [Contributing](#-contributing)
28
+ - [Security](#-security)
29
+ - [License](#-license)
30
+ - [Star History](#-star-history)
31
+
32
+ ## ✨ Features
33
+
34
+ - **Zero configuration** — works out of the box with any Git repository
35
+ - **Interactive TUI** — beautiful terminal menu with keyboard navigation
36
+ - **Smart lock file handling** — detects lock files (`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `Cargo.lock`, etc.) and omits their noisy diffs
37
+ - **Token estimation** — reports estimated token count (using `o200k_base` tokenizer) so you know the prompt size before pasting into an LLM
38
+ - **Structured Markdown output** — generates a `neuro-commit.md` with file list, per-file stats, and full diff
39
+ - **Update notifications** — automatically notifies you when a new version is available
40
+
15
41
  ## 🚀 Quick Start
16
42
 
17
43
  ### Using npx (No Installation Required)
@@ -37,18 +63,29 @@ neuro-commit
37
63
  1. Stage your changes with `git add`
38
64
  2. Run `neuro-commit`
39
65
  3. Select **Commit** mode from the interactive menu
40
- 4. The tool collects your staged diff, file list and stats
41
- 5. A `neuro-commit.md` file is generated in the current directory with:
42
- - Combined file list with statuses (`M`, `A`, `D`, etc.) and per-file stats
43
- - Lock file updates mentioned without noisy diffs
44
- - Summary of total insertions / deletions
66
+ 4. The tool collects your staged diff, file list, and per-file stats
67
+ 5. A `neuro-commit.md` file is generated in the current directory containing:
68
+ - File list with statuses (`Added`, `Modified`, `Deleted`, etc.) and per-file insertions/deletions
69
+ - Lock file entries listed without their diffs
70
+ - Summary line with total files changed, insertions, and deletions
45
71
  - Full diff output in a fenced `diff` code block
72
+ 6. Copy the contents of `neuro-commit.md` into your preferred AI assistant and ask it to write a commit message
46
73
 
47
- > **Note:** Lock files (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `uv.lock`, `Cargo.lock`, etc.) are listed as updated but their diffs are omitted to keep the output clean.
74
+ > **Tip:** Lock files (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `uv.lock`, `Cargo.lock`, and others) are listed as changed but their diffs are omitted to keep the output clean and token-efficient.
48
75
 
49
76
  ## 🔧 Development
50
77
 
51
78
  ```bash
79
+ # Clone the repository
80
+ git clone https://github.com/cr1ma/neuro-commit.git
81
+ cd neuro-commit
82
+
83
+ # Install dependencies
84
+ npm install
85
+
86
+ # Run locally
87
+ npm start
88
+
52
89
  # Lint
53
90
  npm run lint
54
91
 
@@ -56,13 +93,19 @@ npm run lint
56
93
  npm run lint:fix
57
94
  ```
58
95
 
59
- ## 📝 License
96
+ ## 🤝 Contributing
60
97
 
61
- [Apache License 2.0](LICENSE)
98
+ Contributions, issues, and feature requests are welcome! Please read the [Contributing Guide](CONTRIBUTING.md) before submitting a pull request.
62
99
 
63
- ## 🤝 Contributing
100
+ Feel free to check the [open issues](https://github.com/cr1ma/neuro-commit/issues).
101
+
102
+ ## 🔒 Security
103
+
104
+ To report a vulnerability, please see our [Security Policy](SECURITY.md).
105
+
106
+ ## 📝 License
64
107
 
65
- Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/cr1ma/neuro-commit/issues).
108
+ This project is licensed under the [Apache License 2.0](LICENSE).
66
109
 
67
110
  ## ⭐ Star History
68
111
 
@@ -119,6 +119,21 @@ async function main() {
119
119
  console.clear();
120
120
  console.log(banner);
121
121
 
122
+ try {
123
+ const { default: updateNotifier } = await import("update-notifier");
124
+ const pkg = require("../package.json");
125
+
126
+ updateNotifier({
127
+ pkg,
128
+ updateCheckInterval: 1000 * 60 * 60 * 24,
129
+ }).notify({
130
+ defer: false,
131
+ isGlobal: true,
132
+ });
133
+ } catch {
134
+ // Ignore update check errors
135
+ }
136
+
122
137
  const choice = await showMenu();
123
138
 
124
139
  switch (choice) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neuro-commit",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "neuro-commit CLI utility",
5
5
  "author": "cr1ma.dev",
6
6
  "bin": {
@@ -38,6 +38,7 @@
38
38
  "globals": "^17.3.0"
39
39
  },
40
40
  "dependencies": {
41
- "tiktoken": "^1.0.22"
41
+ "tiktoken": "^1.0.22",
42
+ "update-notifier": "^7.3.1"
42
43
  }
43
44
  }