@jannael/glinter 1.2.3 → 1.2.4
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 +102 -93
- package/package.json +77 -77
package/README.md
CHANGED
|
@@ -1,93 +1,102 @@
|
|
|
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
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
+
</p>
|
|
10
|
+
|
|
11
|
+
Glinter is a high-performance, transparent Git wrapper built with **Bun**.
|
|
12
|
+
|
|
13
|
+
[Commands](https://glinter.jannael.com/#commands)
|
|
14
|
+
|
|
15
|
+
[Aliases](https://glinter.jannael.com/alias)
|
|
16
|
+
|
|
17
|
+
[Quick start](https://glinter.jannael.com/#quick-start)
|
|
18
|
+
|
|
19
|
+
## Preview
|
|
20
|
+
|
|
21
|
+
### Badge
|
|
22
|
+
|
|
23
|
+
| Preview | Copy |
|
|
24
|
+
| ------- | ---- |
|
|
25
|
+
| [](https://glinter.jannael.com) | `[](https://glinter.jannael.com)` |
|
|
26
|
+
|
|
27
|
+
<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%;">
|
|
28
|
+
Your browser does not support the video tag.
|
|
29
|
+
</video>
|
|
30
|
+
|
|
31
|
+
### Screenshots
|
|
32
|
+
|
|
33
|
+
| `g add` | `g commit` |
|
|
34
|
+
| ------------------------------------ | --------------------------------------- |
|
|
35
|
+
|  |  |
|
|
36
|
+
|
|
37
|
+
## Security
|
|
38
|
+
|
|
39
|
+
Security is a top priority for this project.
|
|
40
|
+
|
|
41
|
+
This project uses Bun as its runtime and package manager. You don't need to worry about package vulnerabilities — the `bunfig.toml` configuration includes `minimumReleaseAge = 259200` (3 days), which prevents newly published packages from being installed automatically. This protects against supply chain attacks that have become increasingly common in the npm ecosystem.
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
- **Abbreviation**: You can use `g` instead of `git`.
|
|
46
|
+
|
|
47
|
+
- **Safe by Default**: Automatically filters and prevents accidental staging of sensitive files: `.env` and `node_modules`.
|
|
48
|
+
|
|
49
|
+
- **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.
|
|
50
|
+
|
|
51
|
+
## Test environment
|
|
52
|
+
|
|
53
|
+
- for windows i used my own laptop (windows 11) so if you have a problem please create an issue
|
|
54
|
+
|
|
55
|
+
- for linux i used WSL (windows subsystem linux) with a kali-linux vm so if you have a problem please create an issue
|
|
56
|
+
|
|
57
|
+
## How it works
|
|
58
|
+
|
|
59
|
+
Glinter is designed to be as "natural" as possible, meaning it shouldn't feel like a wrapper at all.
|
|
60
|
+
|
|
61
|
+
### 1. The Transparent Proxy
|
|
62
|
+
|
|
63
|
+
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.
|
|
64
|
+
|
|
65
|
+
- **Result**: Git "knows" it's in a real terminal, so it correctly detects colors and allows for interactive prompts (like credential entry).
|
|
66
|
+
|
|
67
|
+
### 2. Reliable Status Parsing
|
|
68
|
+
|
|
69
|
+
For the interactive `add` feature, Glinter runs `git status --porcelain`.
|
|
70
|
+
|
|
71
|
+
- **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.
|
|
72
|
+
|
|
73
|
+
### 3. Interactive Selection
|
|
74
|
+
|
|
75
|
+
Using the `@clack/prompts` library, Glinter transforms the raw status data into a selectable list.
|
|
76
|
+
|
|
77
|
+
- 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.
|
|
78
|
+
|
|
79
|
+
## Installation
|
|
80
|
+
|
|
81
|
+
To use Glinter as your primary Git interface (e.g., using the command `g`):
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm install -g @jannael/glinter
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### For Development
|
|
88
|
+
|
|
89
|
+
1. **Clone the repo**
|
|
90
|
+
2. **Install dependencies**: `bun install`
|
|
91
|
+
3. **Link the binary**: `bun link`
|
|
92
|
+
|
|
93
|
+
now you can simply run:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
g add # Opens the interactive selector
|
|
97
|
+
g commit # Opens commit type + message prompt
|
|
98
|
+
g add <file> # Runs standard git add <file>
|
|
99
|
+
g commit -m "" # Runs standard git commit -m ""
|
|
100
|
+
g status # Runs standard git status
|
|
101
|
+
g push # Runs standard git push
|
|
102
|
+
```
|
package/package.json
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jannael/glinter",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "A high-performance, transparent Git wrapper with interactive staging",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"private": false,
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/Jannael/Glinter.git"
|
|
11
|
-
},
|
|
12
|
-
"author": {
|
|
13
|
-
"name": "Jannael",
|
|
14
|
-
"url": "https://github.com/jannael"
|
|
15
|
-
},
|
|
16
|
-
"homepage": "https://glinter.jannael.com",
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://github.com/jannael/glinter/issues"
|
|
19
|
-
},
|
|
20
|
-
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
22
|
-
},
|
|
23
|
-
"keywords": [
|
|
24
|
-
"git",
|
|
25
|
-
"cli",
|
|
26
|
-
"wrapper",
|
|
27
|
-
"interactive",
|
|
28
|
-
"staging"
|
|
29
|
-
],
|
|
30
|
-
"files": [
|
|
31
|
-
"dist"
|
|
32
|
-
],
|
|
33
|
-
"exports": {
|
|
34
|
-
".": "./dist/index.js"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"build": "bun build ./apps/cli/index.ts --outfile=./dist/index.js --target=bun",
|
|
38
|
-
"prepublishOnly": "bun run build",
|
|
39
|
-
"test": "vitest",
|
|
40
|
-
"lint": "oxlint",
|
|
41
|
-
"lint:fix": "oxlint --fix",
|
|
42
|
-
"format": "prettier --write .",
|
|
43
|
-
"format:check": "prettier --check .",
|
|
44
|
-
"type-check": "bunx tsc --noEmit",
|
|
45
|
-
"prepare": "husky"
|
|
46
|
-
},
|
|
47
|
-
"bin": {
|
|
48
|
-
"g": "./dist/index.js"
|
|
49
|
-
},
|
|
50
|
-
"engines": {
|
|
51
|
-
"bun": ">=1.0.0"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@types/bun": "
|
|
55
|
-
"husky": "9.1.7",
|
|
56
|
-
"oxlint": "1.
|
|
57
|
-
"prettier": "3.8.3",
|
|
58
|
-
"prettier-plugin-astro": "0.14.1",
|
|
59
|
-
"prettier-plugin-tailwindcss": "0.8.0",
|
|
60
|
-
"vitest": "4.1.
|
|
61
|
-
"lint-staged": "17.0.5",
|
|
62
|
-
"wrangler": "4.
|
|
63
|
-
},
|
|
64
|
-
"peerDependencies": {
|
|
65
|
-
"bun": "
|
|
66
|
-
"typescript": "6.0.3"
|
|
67
|
-
},
|
|
68
|
-
"dependencies": {
|
|
69
|
-
"@clack/prompts": "1.4.0"
|
|
70
|
-
},
|
|
71
|
-
"lint-staged": {
|
|
72
|
-
"*.{ts,tsx,js,jsx,astro}": [
|
|
73
|
-
"bun run lint:fix",
|
|
74
|
-
"bun run format"
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@jannael/glinter",
|
|
3
|
+
"version": "1.2.4",
|
|
4
|
+
"description": "A high-performance, transparent Git wrapper with interactive staging",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/Jannael/Glinter.git"
|
|
11
|
+
},
|
|
12
|
+
"author": {
|
|
13
|
+
"name": "Jannael",
|
|
14
|
+
"url": "https://github.com/jannael"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://glinter.jannael.com",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/jannael/glinter/issues"
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"git",
|
|
25
|
+
"cli",
|
|
26
|
+
"wrapper",
|
|
27
|
+
"interactive",
|
|
28
|
+
"staging"
|
|
29
|
+
],
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"exports": {
|
|
34
|
+
".": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "bun build ./apps/cli/index.ts --outfile=./dist/index.js --target=bun",
|
|
38
|
+
"prepublishOnly": "bun run build",
|
|
39
|
+
"test": "vitest",
|
|
40
|
+
"lint": "oxlint",
|
|
41
|
+
"lint:fix": "oxlint --fix",
|
|
42
|
+
"format": "prettier --write .",
|
|
43
|
+
"format:check": "prettier --check .",
|
|
44
|
+
"type-check": "bunx tsc --noEmit",
|
|
45
|
+
"prepare": "husky"
|
|
46
|
+
},
|
|
47
|
+
"bin": {
|
|
48
|
+
"g": "./dist/index.js"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"bun": ">=1.0.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/bun": "^1.3.14",
|
|
55
|
+
"husky": "9.1.7",
|
|
56
|
+
"oxlint": "1.66.0",
|
|
57
|
+
"prettier": "3.8.3",
|
|
58
|
+
"prettier-plugin-astro": "0.14.1",
|
|
59
|
+
"prettier-plugin-tailwindcss": "0.8.0",
|
|
60
|
+
"vitest": "4.1.7",
|
|
61
|
+
"lint-staged": "17.0.5",
|
|
62
|
+
"wrangler": "4.94.0"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"bun": "^1.3.14",
|
|
66
|
+
"typescript": "6.0.3"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@clack/prompts": "1.4.0"
|
|
70
|
+
},
|
|
71
|
+
"lint-staged": {
|
|
72
|
+
"*.{ts,tsx,js,jsx,astro}": [
|
|
73
|
+
"bun run lint:fix",
|
|
74
|
+
"bun run format"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|