scai 0.1.2 → 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/LICENSE +4 -0
- package/README.md +29 -13
- package/dist/commands/CommitSuggesterCmd.js +3 -1
- package/package.json +2 -2
package/LICENSE
ADDED
package/README.md
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
# scai — Smart Commit AI ✨
|
|
2
|
+
|
|
3
|
+
> AI-powered commit message suggestions from staged changes — directly in your terminal.
|
|
4
|
+
|
|
5
|
+
**scai** (Smart Commit AI) is a lightweight, privacy-focused CLI tool that uses a local AI model to generate clear, meaningful commit messages based on your staged Git changes. No internet required. No telemetry. Just smart commits.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🚀 Features
|
|
10
|
+
|
|
11
|
+
- 🔍 Automatically suggests commit messages based on `git diff`
|
|
12
|
+
- 🤖 Uses a local language model via [Ollama](https://ollama.com/) — no external API keys
|
|
13
|
+
- 🧱 Designed for local developer workflows and automation
|
|
14
|
+
- 📦 Works with any Git repository
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 📦 Installation
|
|
19
|
+
|
|
20
|
+
You'll need [Ollama](https://ollama.com/) installed and running locally, with a supported model like `mistral` pulled:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
ollama run mistral
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## License
|
|
27
|
+
|
|
28
|
+
This software is licensed for non-commercial use only.
|
|
29
|
+
See the [LICENSE](./LICENSE) file for details.
|
|
@@ -23,8 +23,10 @@ export async function suggestCommitMessage(options) {
|
|
|
23
23
|
if (response.error) {
|
|
24
24
|
throw new Error(`LLM error: ${response.error}`);
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
let message = response?.trim();
|
|
27
27
|
console.log(`${message}`);
|
|
28
|
+
// Remove double quotes from the message
|
|
29
|
+
message = message.replace(/^"(.*)"$/, '$1');
|
|
28
30
|
// 3) Optionally commit
|
|
29
31
|
if (options.commit) {
|
|
30
32
|
// If code not already staged
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"scai": "./dist/index.js"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "git+https://github.com/rzs/scai.git"
|
|
11
11
|
},
|
|
12
12
|
"author": "Rasmus Uhd Norgaard",
|
|
13
|
-
"license": "
|
|
13
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
14
14
|
"keywords": ["cli", "ai", "refactor", "devtools", "local", "typescript"],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "tsc",
|