@jannael/glinter 1.2.1 → 1.2.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.
Files changed (3) hide show
  1. package/README.md +93 -80
  2. package/dist/index.js +652 -598
  3. package/package.json +27 -14
package/README.md CHANGED
@@ -1,80 +1,93 @@
1
- <p align="center">
2
- <br>
3
- <br>
4
- <a href="https://glinter.jannael.com" target="_blank" rel="noopener noreferrer">
5
- <picture>
6
- <img alt="Glinter" src="https://github.com/Jannael/glinter/raw/main/apps/web/public/og.png">
7
- </picture>
8
- </a>
9
- <br>
10
- <br>
11
- <br>
12
- </p>
13
-
14
- Glinter is a high-performance, transparent Git wrapper built with **Bun**.
15
-
16
- [Commands](https://glinter.jannael.com/#commands)
17
-
18
- [Aliases](https://glinter.jannael.com/alias)
19
-
20
- [Quick start](https://glinter.jannael.com/#quick-start)
21
-
22
- ## Preview
23
-
24
- <video src="https://github.com/user-attachments/assets/63b401a0-e1e1-453c-9e38-c36cd14e200f" controls="false" autoplay="true" loop="true" muted="true" style="max-width: 100%;">
25
- Your browser does not support the video tag.
26
- </video>
27
-
28
- ### Screenshots
29
-
30
- | `g add` | `g commit` |
31
- |---|---|
32
- | ![glinter add](./screenshots/ga.png) | ![glinter commit](./screenshots/gc.png) |
33
-
34
- ## Features
35
-
36
- - **Abbreviation**: You can use `g` instead of `git`.
37
-
38
- - **Safe by Default**: Automatically filters and prevents accidental staging of sensitive files: `.env` and `node_modules`.
39
-
40
- - **Transparent Wrapper**: For every other command (like `commit`, `push`, `log`, or `status`), Glinter acts as a direct tunnel to Git. It preserves all original colors, formatting, and interactive features of the native Git CLI.
41
-
42
- ## How it works
43
-
44
- Glinter is designed to be as "natural" as possible, meaning it shouldn't feel like a wrapper at all.
45
-
46
- ### 1. The Transparent Proxy
47
- In `src/index.ts`, Glinter uses `Bun.spawn` with `stdio: 'inherit'`. This is a low-level operation that connects the standard input, output, and error streams of the Git process directly to your terminal.
48
- - **Result**: Git "knows" it's in a real terminal, so it correctly detects colors and allows for interactive prompts (like credential entry).
49
-
50
- ### 2. Reliable Status Parsing
51
- For the interactive `add` feature, Glinter runs `git status --porcelain`.
52
- - **Why?**: Standard `git status` output is designed for humans and can change based on your Git version or system language. `--porcelain` is a machine-readable format that is consistent across all environments, making the file detection 100% reliable.
53
-
54
- ### 3. Interactive Selection
55
- Using the `@clack/prompts` library, Glinter transforms the raw status data into a selectable list.
56
- - The selection logic uses Bun's high-speed shell to execute the final `git add` command, correctly escaping filenames to handle spaces and special characters.
57
-
58
- ## Installation
59
-
60
- To use Glinter as your primary Git interface (e.g., using the command `g`):
61
-
62
- ```bash
63
- npm install -g @jannael/glinter
64
- ```
65
-
66
- ### For Development
67
-
68
- 1. **Clone the repo**
69
- 2. **Install dependencies**: `bun install`
70
- 3. **Link the binary**: `bun link`
71
-
72
- now you can simply run:
73
- ```bash
74
- g add # Opens the interactive selector
75
- g commit # Opens commit type + message prompt
76
- g add <file> # Runs standard git add <file>
77
- g commit -m "" # Runs standard git commit -m ""
78
- g status # Runs standard git status
79
- g push # Runs standard git push
80
- ```
1
+ <p align="center">
2
+ <br>
3
+ <br>
4
+ <a href="https://glinter.jannael.com" target="_blank" rel="noopener noreferrer">
5
+ <picture>
6
+ <img alt="Glinter" src="https://github.com/Jannael/glinter/raw/main/apps/web/public/og.png">
7
+ </picture>
8
+ </a>
9
+ <br>
10
+ <br>
11
+ <br>
12
+ </p>
13
+
14
+ Glinter is a high-performance, transparent Git wrapper built with **Bun**.
15
+
16
+ [Commands](https://glinter.jannael.com/#commands)
17
+
18
+ [Aliases](https://glinter.jannael.com/alias)
19
+
20
+ [Quick start](https://glinter.jannael.com/#quick-start)
21
+
22
+ ## Preview
23
+
24
+ <video src="https://github.com/user-attachments/assets/63b401a0-e1e1-453c-9e38-c36cd14e200f" controls="false" autoplay="true" loop="true" muted="true" style="max-width: 100%;">
25
+ Your browser does not support the video tag.
26
+ </video>
27
+
28
+ ### Screenshots
29
+
30
+ | `g add` | `g commit` |
31
+ | ------------------------------------ | --------------------------------------- |
32
+ | ![glinter add](./screenshots/ga.png) | ![glinter commit](./screenshots/gc.png) |
33
+
34
+ ## Features
35
+
36
+ - **Abbreviation**: You can use `g` instead of `git`.
37
+
38
+ - **Safe by Default**: Automatically filters and prevents accidental staging of sensitive files: `.env` and `node_modules`.
39
+
40
+ - **Transparent Wrapper**: For every other command (like `commit`, `push`, `log`, or `status`), Glinter acts as a direct tunnel to Git. It preserves all original colors, formatting, and interactive features of the native Git CLI.
41
+
42
+ ## Test environment
43
+
44
+ - for windows i used my own laptop (windows 11) so if you have a problem please create an issue
45
+
46
+ - for linux i used WSL (windows subsystem linux) with a kali-linux vm so if you have a problem please create an issue
47
+
48
+ ## How it works
49
+
50
+ Glinter is designed to be as "natural" as possible, meaning it shouldn't feel like a wrapper at all.
51
+
52
+ ### 1. The Transparent Proxy
53
+
54
+ In `src/index.ts`, Glinter uses `Bun.spawn` with `stdio: 'inherit'`. This is a low-level operation that connects the standard input, output, and error streams of the Git process directly to your terminal.
55
+
56
+ - **Result**: Git "knows" it's in a real terminal, so it correctly detects colors and allows for interactive prompts (like credential entry).
57
+
58
+ ### 2. Reliable Status Parsing
59
+
60
+ For the interactive `add` feature, Glinter runs `git status --porcelain`.
61
+
62
+ - **Why?**: Standard `git status` output is designed for humans and can change based on your Git version or system language. `--porcelain` is a machine-readable format that is consistent across all environments, making the file detection 100% reliable.
63
+
64
+ ### 3. Interactive Selection
65
+
66
+ Using the `@clack/prompts` library, Glinter transforms the raw status data into a selectable list.
67
+
68
+ - The selection logic uses Bun's high-speed shell to execute the final `git add` command, correctly escaping filenames to handle spaces and special characters.
69
+
70
+ ## Installation
71
+
72
+ To use Glinter as your primary Git interface (e.g., using the command `g`):
73
+
74
+ ```bash
75
+ npm install -g @jannael/glinter
76
+ ```
77
+
78
+ ### For Development
79
+
80
+ 1. **Clone the repo**
81
+ 2. **Install dependencies**: `bun install`
82
+ 3. **Link the binary**: `bun link`
83
+
84
+ now you can simply run:
85
+
86
+ ```bash
87
+ g add # Opens the interactive selector
88
+ g commit # Opens commit type + message prompt
89
+ g add <file> # Runs standard git add <file>
90
+ g commit -m "" # Runs standard git commit -m ""
91
+ g status # Runs standard git status
92
+ g push # Runs standard git push
93
+ ```