gdx 0.4.2 → 0.4.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 CHANGED
@@ -13,13 +13,14 @@
13
13
 
14
14
  `gdx` is a drop-in wrapper for the Git CLI. It doesn't replace Git; it just makes it less... unpleasant.
15
15
 
16
- It wraps standard git commands with intelligent shorthands and adds powerful new capabilities that Git is missing like safety rails for destructive actions (undoable `reset --hard`), introduces new workflows for parallel editing and local analytics.
16
+ It wraps standard git commands with intelligent shorthands and adds powerful new capabilities that Git is missing like safety rails for destructive actions (undoable `reset --hard`), new workflows for parallel editing and local analytics, git output enhancements, and AI-powered commit message generation.
17
17
 
18
18
  **Why gdx?**
19
19
 
20
20
  - **👍 Convenience:** Type less, do more. `git status`? how about `gdx s`?, `git reset HEAD~3`? why not `gdx res ~3`?
21
21
  - **🛡️ Safety:** `gdx clear` wipes your directory but saves a backup patch. No more "oops" moments.
22
- - **🧠 Logic:** Handles the things Git makes hard, like dropping a range of stashes (`drop 2..6`).
22
+ - **✨ Enhanced Output:** Git's output is... functional. `gdx` makes it beautiful and easier for _humans_ to digest.
23
+ - **🧠 Logic:** Handles the things Git makes hard, like dropping a range of stashes, working with worktrees, or submodules.
23
24
  - **📊 Local-First Stats:** Beautiful TrueColor graphs and stats generated from your local history.
24
25
  - **🤖 AI Integration:** Generate commit messages and roast your history with local or cloud LLMs.
25
26
 
@@ -130,8 +131,9 @@ Invoke-Expression (& { (gdx --init pwsh | Out-String) })
130
131
 
131
132
  ```bash
132
133
  gdx s # -> git status
134
+ gdx sta # -> git stash
135
+ gdx statu # -> git status
133
136
  gdx lg # -> git log --oneline --graph --all --decorate
134
- gdx lg export # -> Exports git log to a markdown file
135
137
  gdx pl -au # -> git pull --allow-unrelated-histories
136
138
  gdx ps -fl # -> git push --force-with-lease
137
139
  gdx reset ~2 # -> git reset HEAD~2
@@ -162,7 +164,9 @@ We've all accidentally reset files we meant to keep. `gdx clear` is the solution
162
164
 
163
165
  ### 4. Parallel Worktrees (Experimental)
164
166
 
165
- Need to work on the **same branch** in multiple isolated environments without checking out new branches?
167
+ A wrapper for `git worktree` that reduces the friction of managing multiple worktrees, it handles the setup, switching, syncing changes, and cleanup of parallel worktrees so you can focus on coding instead of git logistics.
168
+
169
+ It also works great with detached worktrees, allowing you to quickly spin up a fork without worrying about getting a branch locked to it.
166
170
 
167
171
  ```bash
168
172
  # Manage forked worktrees for the current branch
@@ -176,9 +180,9 @@ gdx parallel pick # Cherry-pick a commit from between forks
176
180
  gdx parallel remove # Remove a fork when you're done
177
181
  ```
178
182
 
179
- Additionally, `gdx parallel fork` can auto-initialize submodules and
180
- install dependencies using detected package managers (currently supports npm, pnpm, bun, and uv)
181
- if configured (see `parallel.init` config for options),
183
+ Additionally, `gdx parallel fork` can **auto-initialize submodules**, **install dependencies**
184
+ using detected package managers (see `parallel.init` config for options), and **copy
185
+ ignored env files** if configured (see `parallel.envPaths` config for options),
182
186
  getting the fork ready for work in no time.
183
187
 
184
188
  ### 5. Git Output for Human (Experimental)
@@ -199,6 +203,9 @@ but more commands will be added in the future. (feel free to request what comman
199
203
  >
200
204
  > If you want to disable the enhanced output altogether, you can set `enhancedOutput` to `false` in the config.
201
205
 
206
+ > [!TIP]
207
+ > Enhanced `gdx show` allows you to navigate between commits in the pager with ←→ keys. This is especially useful when viewing a file's history.
208
+
202
209
  ### 6. Advanced Stash Management
203
210
 
204
211
  Git stash is great until you need to clean it up.
@@ -223,6 +230,10 @@ gdx cmi auto --no-commit --copy
223
230
  # You can also configure which LLM to use with `gdx-config`
224
231
  ```
225
232
 
233
+ Unlike most AI commit message generators, by default `gdx` creates messages generation guidelines and instructions based on your repo's history and conventions.
234
+ This ensures the generated messages fit your project's style and tone.
235
+ Said guidelines are updated every month to reflect your evolving commit style.
236
+
226
237
  ### 8. Fun & Analytics
227
238
 
228
239
  Tools to help you feel productive without leaving the terminal.
@@ -237,28 +248,47 @@ Tools to help you feel productive without leaving the terminal.
237
248
 
238
249
  ## Command Reference
239
250
 
240
- | Command | Expansion / Function |
241
- | :---------------- | :----------------------------------------------------------------- |
242
- | `s`, `stat` | `git status` (use `-r` recursively run "status" on all submodules) |
243
- | `lg`, `lo` | `git log --oneline --graph --all --decorate` |
244
- | `sw`, `swit` | `git switch` |
245
- | `br`, `bra` | `git branch` |
246
- | `cmi`, `com` | `git commit` (Try `gdx cmi auto` for AI messages!) |
247
- | `res` | `git reset` (supports `res ~3`, `res -h` expansion) |
248
- | `dif` | `git diff` (supports `dif ~3`, `dif origin ~2` expansion) |
249
- | `sho` | `git show` (supports `sho ~3`, `sho origin ~2` expansion) |
250
- | `sta`, `st` | `git stash` |
251
- | `lint` | Run pre-push checks (spelling, secrets, etc.) |
252
- | `gdx-config` | Manage gdx configuration |
253
- | `reword`, `rew` | Rewrite commit messages |
254
- | `parallel`, `par` | Manage parallel worktrees for the current branch |
255
- | `stats` | Show contribution statistics and metrics for the current repo |
256
- | `graph` | Render a GitHub-style contribution heatmap in the terminal |
257
- | `nocap` | Roast your latest commit message with AI |
258
- | `clear` | Wipe changes in the working directory with a backup patch |
259
- | `cache` | Manage gdx cache |
260
-
261
- _Run `gdx ghelp` to see the full list of expansions._
251
+ ### Expansions & Custom Commands
252
+
253
+ | Command | Expansion / Function |
254
+ | :---------------- | :------------------------------------------------------------------------------------------- |
255
+ | `s`, `stat` | `git status` (use `-r` recursively run "status" on all submodules) |
256
+ | `lg`, `lo` | `git log --oneline --graph --all --decorate` |
257
+ | `sw`, `swit` | `git switch` |
258
+ | `br`, `bra` | `git branch` |
259
+ | `ps` | `git push` with option expansion `-fl`=`--force-with-lease` |
260
+ | `pu`, `pl` | `git pull` |
261
+ | `sub` | `git submodule` |
262
+ | `sta` | `git stash` |
263
+ | `cmi`, `com` | `git commit` (Try `gdx cmi auto` for AI messages!) |
264
+ | `res` | `git reset` with option expansion `-h`=`--hard`, `-s`=`--soft` (supports `res ~3` expansion) |
265
+ | `dif` | `git diff` (supports `dif ~3`, `dif origin ~2` expansion) |
266
+ | `sho` | `git show` (supports `sho ~3`, `sho origin ~2` expansion) |
267
+ | `sta`, `st` | `git stash` |
268
+ | `lint` | Run pre-push checks (spelling, secrets, etc.) |
269
+ | `gdx-config` | Manage gdx configuration |
270
+ | `reword`, `rew` | Rewrite commit messages |
271
+ | `parallel`, `par` | Manage parallel worktrees for the current branch |
272
+ | `stats` | Show contribution statistics and metrics for the current repo |
273
+ | `graph` | Render a GitHub-style contribution heatmap in the terminal |
274
+ | `nocap` | Roast your latest commit message with AI |
275
+ | `clear` | Wipe changes in the working directory with a backup patch |
276
+ | `cache` | Manage gdx cache |
277
+ | `macro` | Create custom gdx command macros to run multiple commands with a single macro |
278
+
279
+ _Run `gdx ghelp` to see the full list of expansions/commands._
280
+
281
+ ### Command Extensions
282
+
283
+ | Command | Expansion / Function |
284
+ | :-------------------------------- | :--------------------------------------------------------------------------------------------------- |
285
+ | `tag mv`, `tag move` | Move a tag to a new commit (supports ref expansion) |
286
+ | `lg export` | Export git log to a markdown file with enhanced formatting |
287
+ | `commit auto` | Generate commit messages with AI based on staged changes (supports `--no-commit` and `--copy` flags) |
288
+ | `stash drop` | Drop stashes with advanced options (e.g., `drop 2..6`) |
289
+ | `stash drop pardon` | Restore the last dropped stash |
290
+ | `submodule switch` | Jump into a submodule's directory from the parent repo (requires shell integration) |
291
+ | `status --recursive`, `status -r` | Show status for the main repo and all submodules recursively |
262
292
 
263
293
  ## Development
264
294
 
@@ -299,10 +329,9 @@ Since this is currently a solo "scratch your own itch" project, the roadmap is f
299
329
  - [x] **gdx clear Untracked files support**: `gdx clear` now automatically backs up untracked files in the patch.
300
330
  - [x] **Recursive status for submodules** with `gdx status --recursive` or `gdx s -r`
301
331
  - [x] **Submodule dir switching**: extension of `git submodule`, `gdx submodule switch` to jump into a submodule's directory from the parent repo (requires shell integration)
302
- - [ ] **Snapshot**: `gdx snap` to create snapshot of current state of your working directory (including uncommitted changes, untracked files) that can be easily switched back to later (similar to a lightweight, temporary branch that doesn't clutter your branch list)
332
+ - [x] **Snapshot**: `gdx snap` to create snapshot of current state of your working directory (including uncommitted changes, untracked files) that can be easily switched back to later (similar to a lightweight, temporary branch that doesn't clutter your branch list)
303
333
  - [ ] **Enhanced output for more commands**: Extend the "Git Output for Humans"
304
334
  - [ ] **Undo and Redo**: `gdx undo` and `gdx redo` to step backward and forward through git actions (reset, commit, stash, etc.) with safety nets.
305
- - [ ] **Edit commit history**: `gdx hist` for an intuitive interface to amend, reorder, squash commits without needing to remember complex rebase commands.
306
335
  - [x] **Edit commit messages**: `gdx reword` to quickly reword the last commit message or a specific commit without needing to do an interactive rebase.
307
336
 
308
337
  ## License