gityo 0.0.0
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 +152 -0
- package/dist/index.js +81185 -0
- package/dist/token-error-CU3wZACz.js +70 -0
- package/dist/token-lups7Xof.js +44 -0
- package/dist/token-util-C6IM_A2g.js +4 -0
- package/dist/token-util-C_UzU8Nz.js +342 -0
- package/package.json +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# gityo
|
|
2
|
+
|
|
3
|
+
`gityo` is a CLI that helps you stage changes, write or generate a commit message, commit, and optionally run a post-commit git action.
|
|
4
|
+
|
|
5
|
+
It is built for people who want a faster commit flow without turning git into a wall of commands.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g gityo
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or run it without installing globally:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx gityo
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## What it does
|
|
20
|
+
|
|
21
|
+
- lets you choose which changed files to stage
|
|
22
|
+
- lets you write your own commit message
|
|
23
|
+
- can generate a commit message with AI
|
|
24
|
+
- creates the commit for you
|
|
25
|
+
- can run a post-commit action like `git push`
|
|
26
|
+
|
|
27
|
+
## Quick use
|
|
28
|
+
|
|
29
|
+
Run it inside a git repository:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
gityo
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Typical flow:
|
|
36
|
+
|
|
37
|
+
1. Pick files to stage
|
|
38
|
+
2. Type a commit message or generate one
|
|
39
|
+
3. Create the commit
|
|
40
|
+
4. Optionally run the configured post-commit action
|
|
41
|
+
|
|
42
|
+
## Common commands
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
gityo
|
|
46
|
+
gityo --stage
|
|
47
|
+
gityo --generate
|
|
48
|
+
gityo --message "fix login redirect bug"
|
|
49
|
+
gityo --yolo
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## AI setup
|
|
53
|
+
|
|
54
|
+
If you want AI-generated commit messages, set a model once and reuse it:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
gityo config set model openai gpt-4.1 YOUR_API_KEY
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Then use:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
gityo --generate
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Supported providers include OpenAI, Anthropic, Google, OpenRouter, and compatible custom endpoints.
|
|
67
|
+
|
|
68
|
+
## Config
|
|
69
|
+
|
|
70
|
+
View your current config:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
gityo config
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
You can also write config manually.
|
|
77
|
+
|
|
78
|
+
Project config goes in:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
.gityo.config.json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Global config goes in:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
~/.config/gityo.json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
You can also add repo-specific writing instructions in:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
.gityo.md
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
That file is useful when you want commit messages in a certain tone or format for one project.
|
|
97
|
+
|
|
98
|
+
If you want editor autocomplete and validation, use this schema:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
https://github.com/NazmusSayad/gityo/raw/refs/heads/schema/schema.json
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Example:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"$schema": "https://github.com/NazmusSayad/gityo/raw/refs/heads/schema/schema.json",
|
|
109
|
+
"model": {
|
|
110
|
+
"provider": "openai",
|
|
111
|
+
"name": "gpt-4.1"
|
|
112
|
+
},
|
|
113
|
+
"autoAcceptMessage": false,
|
|
114
|
+
"postCommand": "push",
|
|
115
|
+
"autoRunPostCommand": false,
|
|
116
|
+
"instructions": "Write short, clear commit messages."
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Example instructions file:
|
|
121
|
+
|
|
122
|
+
```md
|
|
123
|
+
Use imperative commit messages.
|
|
124
|
+
Mention the user-facing change first.
|
|
125
|
+
Keep the subject line under 72 characters.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Priority is simple:
|
|
129
|
+
|
|
130
|
+
- `.gityo.md` for repo-specific instructions
|
|
131
|
+
- `.gityo.config.json` for project config
|
|
132
|
+
- `~/.config/gityo.json` for your defaults
|
|
133
|
+
|
|
134
|
+
A few useful examples:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
gityo config set postCommand push
|
|
138
|
+
gityo config set autoRunPostCommand true
|
|
139
|
+
gityo config set autoAcceptCommitMessage true
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Good for
|
|
143
|
+
|
|
144
|
+
- quick everyday commits
|
|
145
|
+
- cleaner staging and commit flow
|
|
146
|
+
- AI-assisted commit messages without losing control
|
|
147
|
+
|
|
148
|
+
## Notes
|
|
149
|
+
|
|
150
|
+
- run it inside a git repo
|
|
151
|
+
- if there are no changed files, it exits early
|
|
152
|
+
- `--yolo` is the fastest mode and skips the usual prompts
|