eckra 1.0.0 β 1.0.2
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 +72 -109
- package/package.json +1 -1
- package/src/index.js +2 -2
- package/src/ui/modules/about.js +37 -0
- package/src/ui/modules/more.js +5 -0
- package/src/ui/modules/tag.js +7 -2
package/README.md
CHANGED
|
@@ -1,109 +1,72 @@
|
|
|
1
|
-
# Eckra
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
##
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
eckra
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- `
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
| OpenAI | API | Cloud-based GPT models |
|
|
74
|
-
| Anthropic | API | Cloud-based Claude models |
|
|
75
|
-
|
|
76
|
-
## Configuration
|
|
77
|
-
|
|
78
|
-
Configuration is managed through JSON files. The application follows a cascading priority:
|
|
79
|
-
|
|
80
|
-
1. **Global Configuration**: Located at `~/.eckra/config.json`.
|
|
81
|
-
2. **Local Configuration**: Defined in a `.eckrarc` file within the project root.
|
|
82
|
-
|
|
83
|
-
### Configuration Example
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"aiProvider": "ollama",
|
|
88
|
-
"ollamaModel": "llama3",
|
|
89
|
-
"aiInstruction": "Ensure commit messages follow Conventional Commits specification."
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## Development and Testing
|
|
94
|
-
|
|
95
|
-
The project uses Jest for unit testing. To execute the test suite:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
npm test
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## License
|
|
102
|
-
|
|
103
|
-
This project is licensed under the MIT License.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
<p align="center">
|
|
108
|
-
Developed by <b>Eren Γakar</b>
|
|
109
|
-
</p>
|
|
1
|
+
# Eckra
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/sudoeren/eckra/master/screenshot.jpg" alt="eckra terminal preview" width="800">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>The AI-powered Git CLI that turns "working on stuff" into meaningful commits.</strong>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/eckra"><img src="https://img.shields.io/badge/npm-v1.0.2-blue.svg?style=flat-square" alt="NPM Version"></a>
|
|
13
|
+
<a href="LICENSE"><img src="https://img.shields.io/npm/l/eckra.svg?style=flat-square" alt="License"></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## π‘ Overview
|
|
19
|
+
|
|
20
|
+
**eckra** is an interactive Git management tool designed for developers who value both speed and clarity. By integrating with local LLMs via **LM Studio**, it analyzes your staged changes and suggests context-aware commit messages, ensuring your project history remains professional and descriptive without the manual overhead.
|
|
21
|
+
|
|
22
|
+
## π Key Features
|
|
23
|
+
|
|
24
|
+
- **π€ AI-Powered Suggestions**: Automatically generates commit messages based on actual code diffs using LM Studio.
|
|
25
|
+
- **π Select & Edit**: Pick an AI suggestion and refine it instantly to match your specific needs.
|
|
26
|
+
- **π Staged Diff Review**: Inspect your changes in a beautiful, syntax-highlighted format directly before committing.
|
|
27
|
+
- **π― Interactive Dashboard**: A comprehensive menu system for staging files, managing branches, stashing changes, and syncing with remotes.
|
|
28
|
+
- **β‘ Built for Speed**: Zero-config required for standard Git operations. Fast, responsive, and intuitive.
|
|
29
|
+
|
|
30
|
+
## π¦ Installation
|
|
31
|
+
|
|
32
|
+
Install eckra globally using npm:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install -g eckra
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## π Usage
|
|
39
|
+
|
|
40
|
+
Just type `eckra` in any Git repository to launch the interactive dashboard:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
eckra
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Quick Commands
|
|
47
|
+
|
|
48
|
+
Skip the menu and jump straight into action:
|
|
49
|
+
|
|
50
|
+
| Command | Action |
|
|
51
|
+
| :------------- | :-------------------------------------------- |
|
|
52
|
+
| `eckra commit` | Start the AI-assisted commit flow |
|
|
53
|
+
| `eckra status` | Check repository status and staged files |
|
|
54
|
+
| `eckra push` | Sync local commits with the remote repository |
|
|
55
|
+
| `eckra branch` | Open the interactive branch manager |
|
|
56
|
+
|
|
57
|
+
## βοΈ AI Configuration
|
|
58
|
+
|
|
59
|
+
By default, eckra connects to **LM Studio**'s local server:
|
|
60
|
+
|
|
61
|
+
- **URL**: `http://localhost:1234`
|
|
62
|
+
- **Requirement**: Ensure LM Studio is running and the "Local Server" is started with a loaded model.
|
|
63
|
+
|
|
64
|
+
## π€ Contributing
|
|
65
|
+
|
|
66
|
+
Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
|
|
67
|
+
|
|
68
|
+
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
|
|
69
|
+
|
|
70
|
+
## π License
|
|
71
|
+
|
|
72
|
+
Distributed under the MIT License. See `LICENSE` for more information.
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const { Command } = require("commander");
|
|
4
4
|
const { startApp, quickStatus, quickCommit, quickPush } = require("./ui/app");
|
|
@@ -21,7 +21,7 @@ async function checkGitRepo() {
|
|
|
21
21
|
program
|
|
22
22
|
.name("eckra")
|
|
23
23
|
.description("AI-powered Git management CLI")
|
|
24
|
-
.version("1.0.
|
|
24
|
+
.version("1.0.2");
|
|
25
25
|
|
|
26
26
|
program
|
|
27
27
|
.command("start")
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const boxen = require("boxen");
|
|
2
|
+
const chalk = require("chalk");
|
|
3
|
+
const packageJson = require("../../../package.json");
|
|
4
|
+
const { clear, pause } = require("../common");
|
|
5
|
+
|
|
6
|
+
async function doAbout() {
|
|
7
|
+
clear();
|
|
8
|
+
|
|
9
|
+
const content = [
|
|
10
|
+
chalk.cyan.bold("E C K R A"),
|
|
11
|
+
chalk.white("AI-Powered Git Assistant"),
|
|
12
|
+
chalk.gray(`version ${packageJson.version}`),
|
|
13
|
+
"",
|
|
14
|
+
chalk.dim("Developed by"),
|
|
15
|
+
chalk.cyan("Eren Γakar"),
|
|
16
|
+
"",
|
|
17
|
+
chalk.blue("https://github.com/sudoeren/eckra"),
|
|
18
|
+
chalk.blue("https://www.npmjs.com/package/eckra"),
|
|
19
|
+
"",
|
|
20
|
+
chalk.dim("License: MIT"),
|
|
21
|
+
].join("\n");
|
|
22
|
+
|
|
23
|
+
console.log(
|
|
24
|
+
boxen(content, {
|
|
25
|
+
padding: { top: 1, bottom: 1, left: 4, right: 4 },
|
|
26
|
+
margin: 1,
|
|
27
|
+
borderStyle: "round",
|
|
28
|
+
borderColor: "cyan",
|
|
29
|
+
textAlignment: "center",
|
|
30
|
+
minWidth: 50,
|
|
31
|
+
}),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
await pause();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
module.exports = { doAbout };
|
package/src/ui/modules/more.js
CHANGED
|
@@ -12,6 +12,7 @@ const { doBlame } = require("./blame");
|
|
|
12
12
|
const { doWorktree } = require("./worktree");
|
|
13
13
|
const { doSettings } = require("./settings");
|
|
14
14
|
const { doRebase } = require("./rebase");
|
|
15
|
+
const { doAbout } = require("./about");
|
|
15
16
|
|
|
16
17
|
async function doMore() {
|
|
17
18
|
clear();
|
|
@@ -42,6 +43,7 @@ async function doMore() {
|
|
|
42
43
|
{ name: s.text(" π³ Worktrees"), value: "worktree" },
|
|
43
44
|
{ type: "separator", line: " " },
|
|
44
45
|
{ name: s.text(" β Settings"), value: "settings" },
|
|
46
|
+
{ name: s.text(" βΉ About"), value: "about" },
|
|
45
47
|
{ name: s.muted(" β Main Menu"), value: "back" },
|
|
46
48
|
],
|
|
47
49
|
pageSize: 15,
|
|
@@ -88,6 +90,9 @@ async function doMore() {
|
|
|
88
90
|
case "settings":
|
|
89
91
|
await doSettings();
|
|
90
92
|
break;
|
|
93
|
+
case "about":
|
|
94
|
+
await doAbout();
|
|
95
|
+
break;
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
98
|
|
package/src/ui/modules/tag.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
const inquirer = require("inquirer");
|
|
2
2
|
const ora = require("ora");
|
|
3
|
-
const {
|
|
3
|
+
const {
|
|
4
|
+
listTags,
|
|
5
|
+
createTag,
|
|
6
|
+
deleteTag,
|
|
7
|
+
pushTags,
|
|
8
|
+
} = require("../../helpers/git");
|
|
4
9
|
const { s, header, clear, pause, sleep } = require("../common");
|
|
5
10
|
|
|
6
11
|
async function doTag() {
|
|
@@ -39,7 +44,7 @@ async function doTag() {
|
|
|
39
44
|
{
|
|
40
45
|
type: "input",
|
|
41
46
|
name: "name",
|
|
42
|
-
message: s.muted("Tag name (e.g. v1.0.
|
|
47
|
+
message: s.muted("Tag name (e.g. v1.0.2):"),
|
|
43
48
|
validate: (v) => v.length > 0,
|
|
44
49
|
},
|
|
45
50
|
]);
|