Skip to content

Commit b9360a9

Browse files
committed
feat: code
1 parent 0e20522 commit b9360a9

4 files changed

Lines changed: 361 additions & 13 deletions

File tree

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# plscommit
2+
3+
A simple CLI tool for creating well-formatted Git commit messages, written in Zig.
4+
5+
## Features
6+
7+
- Helps format commits with standardized prefixes (feat, fix, refactor, etc.)
8+
- Intelligently identifies changed files from git diff
9+
- Interactive prompts for selecting files and commit message details
10+
- Simple and intuitive CLI interface
11+
12+
## Installation
13+
14+
### Prerequisites
15+
16+
- [Zig](https://ziglang.org/) compiler (0.11.0 or later)
17+
18+
### Building from source
19+
20+
```bash
21+
git clone https://github.com/yourusername/zig-plscommit.git
22+
cd zig-plscommit
23+
zig build -Doptimize=ReleaseSafe
24+
```
25+
26+
This will build the executable in `zig-out/bin/plscommit`. You can add this to your PATH or create a symlink to use it system-wide.
27+
28+
## Usage
29+
30+
### Basic usage
31+
32+
Run the tool in a git repository:
33+
34+
```bash
35+
plscommit
36+
```
37+
38+
This will scan for modified files and prompt you to commit them.
39+
40+
### Specifying files
41+
42+
You can also specify files to commit:
43+
44+
```bash
45+
plscommit path/to/file.zig
46+
```
47+
48+
## Commit Types
49+
50+
The tool supports the following commit types:
51+
52+
- `feat`: A new feature
53+
- `fix`: A bug fix
54+
- `refactor`: Code refactoring
55+
- `revert`: Reverting changes
56+
- `build`: Changes to build system
57+
- `chore`: Maintenance tasks
58+
- `ci`: CI/CD changes
59+
- `docs`: Documentation updates
60+
- `perf`: Performance improvements
61+
- `style`: Code style changes
62+
- `test`: Adding/updating tests
63+
64+
## License
65+
66+
GPL-3.0-or-later

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub fn build(b: *std.Build) void {
6161
// This creates another `std.Build.Step.Compile`, but this one builds an executable
6262
// rather than a static library.
6363
const exe = b.addExecutable(.{
64-
.name = "zig_plscommit",
64+
.name = "plscommit",
6565
.root_module = exe_mod,
6666
});
6767

plscommit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit d910fe3e82f2c3da26d0b500f768aa317adf85de

0 commit comments

Comments
 (0)