gdx 0.1.2 → 0.3.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.
Files changed (3) hide show
  1. package/README.md +36 -24
  2. package/dist/index.js +782 -640
  3. package/package.json +13 -11
package/README.md CHANGED
@@ -87,21 +87,27 @@ Your compiled binary will be in `./dist/` folder.
87
87
 
88
88
  ### Optional: Shell Integration
89
89
 
90
- To enable features like `gdx parallel switch` (auto-cd into worktrees), you need to add shell integration.
90
+ To enable features like `gdx parallel switch` (auto-cd into worktrees) and **tab completion**, you need to add shell integration.
91
91
 
92
- To do this add the following line to the **End** of your shell profile (`~/.bashrc`, `~/.zshrc`, etc.):
92
+ Shell integration provides:
93
+
94
+ - **Auto-cd support**: Allows `gdx parallel switch` to change directories
95
+ - **Tab completion**: Intelligent completion for gdx commands, shorthands, and git subcommands
96
+ - **Git fallback**: Falls back to native git completion when gdx has no suggestions (git fallback requires you to install git's completion scripts separately)
97
+
98
+ To add shell integration, add the following line to the **End** of your shell profile (`~/.bashrc`, `~/.zshrc`, etc.):
93
99
 
94
100
  #### For bash and zsh:
95
101
 
96
102
  ```bash
97
- eval "$(gdx --init --shell bash)" # for bash
98
- eval "$(gdx --init --shell zsh)" # for zsh
103
+ eval "$(gdx --init bash)" # for bash
104
+ eval "$(gdx --init zsh)" # for zsh
99
105
  ```
100
106
 
101
107
  #### For fish:
102
108
 
103
109
  ```fish
104
- gdx --init --shell fish | source
110
+ gdx --init fish | source
105
111
  ```
106
112
 
107
113
  #### For PowerShell:
@@ -109,12 +115,12 @@ gdx --init --shell fish | source
109
115
  To find your profile path, run `$PROFILE` in PowerShell.
110
116
 
111
117
  ```powershell
112
- Invoke-Expression (& { (gdx --init --shell pwsh | Out-String) })
118
+ Invoke-Expression (& { (gdx --init pwsh | Out-String) })
113
119
  ```
114
120
 
115
121
  > [!TIP]
116
- > you can add `--cmd` to the `gdx --init` command to create custom aliases.
117
- > For example, `gdx --init --shell zsh --cmd g` will create `g` as an alias for `gdx`.
122
+ > You can add `--cmd` to the `gdx --init` command to create custom aliases.
123
+ > For example, `gdx --init zsh --cmd g` will create `g` as an alias for `gdx`.
118
124
 
119
125
  ## Core Features
120
126
 
@@ -133,6 +139,8 @@ gdx reset ~2 # -> git reset HEAD~2
133
139
 
134
140
  > [!NOTE]
135
141
  > This wrapper forwards unrecognized commands directly to `git`, so you can use it as a full git replacement.
142
+ >
143
+ > If GDX still gets in your way, just run `gdx --bypass <git-commands>` to skip gdx intervention altogether.
136
144
 
137
145
  ### 2. Smart Linting
138
146
 
@@ -165,6 +173,11 @@ gdx parallel open # Open any fork in your default editor
165
173
  gdx parallel join # Merge changes from a fork back to main
166
174
  ```
167
175
 
176
+ Additionally, `gdx parallel fork` can auto-initialize submodules and
177
+ install dependencies using detected package managers (currently supports npm, pnpm, bun, and uv)
178
+ if configured (see `parallel.init` config for options),
179
+ getting the fork ready for work in no time.
180
+
168
181
  ### 5. Advanced Stash Management
169
182
 
170
183
  Git stash is great until you need to clean it up.
@@ -199,17 +212,17 @@ Tools to help you feel productive without leaving the terminal.
199
212
 
200
213
  ## Command Reference
201
214
 
202
- | Command | Expansion / Function |
203
- | :----------- | :-------------------------------------------------- |
204
- | `s`, `stat` | `git status` |
205
- | `lg`, `lo` | `git log --oneline --graph --all --decorate` |
206
- | `sw`, `swit` | `git switch` |
207
- | `br`, `bra` | `git branch` |
208
- | `cmi`, `com` | `git commit` (Try `gdx cmi auto` for AI messages!) |
209
- | `res` | `git reset` (supports `res ~3`, `res -h` expansion) |
210
- | `sta`, `st` | `git stash` |
211
- | `lint` | Run pre-push checks (spelling, secrets, etc.) |
212
- | `gdx-config` | Manage gdx configuration |
215
+ | Command | Expansion / Function |
216
+ | :----------- | :----------------------------------------------------------------- |
217
+ | `s`, `stat` | `git status` (use `-r` recursively run "status" on all submodules) |
218
+ | `lg`, `lo` | `git log --oneline --graph --all --decorate` |
219
+ | `sw`, `swit` | `git switch` |
220
+ | `br`, `bra` | `git branch` |
221
+ | `cmi`, `com` | `git commit` (Try `gdx cmi auto` for AI messages!) |
222
+ | `res` | `git reset` (supports `res ~3`, `res -h` expansion) |
223
+ | `sta`, `st` | `git stash` |
224
+ | `lint` | Run pre-push checks (spelling, secrets, etc.) |
225
+ | `gdx-config` | Manage gdx configuration |
213
226
 
214
227
  _Run `gdx ghelp` to see the full list of expansions._
215
228
 
@@ -235,10 +248,8 @@ This project uses **Bun** for development because it's fast and the developer ex
235
248
 
236
249
  Since this is currently a solo "scratch your own itch" project, the roadmap is fluid, but here is what is on the horizon:
237
250
 
238
- - [x] **Configurability:** Allow users to define their own shorthands in a `.gdxrc.toml` file.
239
- - [ ] **Shell Integration:** Auto-completion scripts for Zsh/Bash/Fish/Powershell.
240
- - [ ] **Commit with specified editor:** like, `gdx commit --vim` to open Vim for commit messages.
241
- - [ ] **Quick commit:** `add`, `commit`, and `push` in one command like `gdx qc -pa` (`git add . && gdx commit auto && git push`)
251
+ - [x] **Configurability:** Allow users to define their own shorthands in a `.gdxrc.toml` file (default: `~/.gdx/.gdxrc.toml`).
252
+ - [x] **Shell Integration:** Auto-completion scripts for Zsh/Bash/Fish/Powershell with git fallback.
242
253
  - [x] **Quick linting before push:** `gdx lint` to run following checks before pushing:
243
254
  - commit message spelling
244
255
  - env or sensitive content scanning
@@ -246,13 +257,14 @@ Since this is currently a solo "scratch your own itch" project, the roadmap is f
246
257
  - abnormal file sizes
247
258
  with an option to automatically run lint before every push (bypass with `gdx push --no-lint`)
248
259
  - [x] **Undoable stash drop**
249
- - [x] **Parallel worktree switching** `gdx parallel switch` Jump between forks (auto-cd) (requires shell integration with `gdx --init --shell`)
260
+ - [x] **Parallel worktree switching** `gdx parallel switch` Jump between forks (auto-cd) (requires shell integration with `gdx --init`)
250
261
  - [ ] **Seamless Integration with fzf and cloc**
251
262
  automatically detect and use fzf and/or cloc if installed for:
252
263
  - Interactive fuzzy search for branches, commits, stash, log and files instead of `less`
253
264
  - Code line statistics in `gdx stats` using `cloc`
254
265
  - [x] **gdx clear Untracked files support**: `gdx clear` now automatically backs up untracked files in the patch.
255
266
  - [ ] **gdx migrate**: move dirty changes to another branch/worktree without committing.
267
+ - [x] **Recursive status for submodules** with `gdx status --recursive` or `gdx s -r`
256
268
 
257
269
  ## License
258
270