forgemap 0.4.1-dev-main.60-ca3147b → 0.4.1-dev-main.74-6f280f6
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 +22 -4
- package/dist/bin/forgemap.mjs +685 -339
- package/dist/bin/forgemap.mjs.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ forgemap cd laravel # fuzzy match → jump in; bare `forgem
|
|
|
56
56
|
`forgemap cd` resolves the slug, walks/picks across your cloned repos, and actually changes directory because the shell wrapper from `shell-init` intercepts it before the binary runs. Every other subcommand falls through to the real binary unchanged. Hacking on forgemap itself? See [CONTRIBUTING.md → Trying the CLI locally](CONTRIBUTING.md#trying-the-cli-locally) — covers `pnpm setup`, `pnpm link --global .` and the shell-wrapper source.
|
|
57
57
|
|
|
58
58
|
<details>
|
|
59
|
-
<summary><strong>All commands</strong> — clone, cd, search, open, sync/status, import, cleanup, validate, shell-init, config</summary>
|
|
59
|
+
<summary><strong>All commands</strong> — clone, cd, search, open, sync/status, import, cleanup, delete, validate, shell-init, config</summary>
|
|
60
60
|
|
|
61
61
|
### Clone & jump
|
|
62
62
|
|
|
@@ -83,7 +83,8 @@ forgemap pick kirch # picker pre-filtered by fuzzy query
|
|
|
83
83
|
### Open the folder in the OS file manager
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
forgemap open kirchDev/laravel-pbac
|
|
86
|
+
forgemap open kirchDev/laravel-pbac # exact slug
|
|
87
|
+
forgemap open laravel # fuzzy single match → same folder
|
|
87
88
|
```
|
|
88
89
|
|
|
89
90
|
- **WSL** → launches `explorer.exe` against `\\wsl$\<distro>\…`, Explorer opens the folder
|
|
@@ -99,8 +100,13 @@ forgemap sync --forge work --query api # restrict scope
|
|
|
99
100
|
|
|
100
101
|
forgemap status # tree: branch / dirty / ahead↑ / behind↓ / last commit
|
|
101
102
|
forgemap status --format json # structured for jq + scripts
|
|
103
|
+
|
|
104
|
+
# --filter keeps only matching owners/forges. Repeatable, OR-combined.
|
|
105
|
+
forgemap status --format json --filter kirchDev --filter TitusKirch
|
|
102
106
|
```
|
|
103
107
|
|
|
108
|
+
`--filter` works on `status`, `sync` and `search`. It matches an **owner** or a **forge name** exactly (case-insensitive) — unlike `--query`, which is fuzzy.
|
|
109
|
+
|
|
104
110
|
All tree output (`status`, `search`, `import`) groups as `forge → owner → repo`. Network operations (`sync`, `import`, `cleanup`) run with a hard timeout and non-interactive SSH, so an unreachable host can never wedge a run.
|
|
105
111
|
|
|
106
112
|
### Adopt an existing layout — `import`
|
|
@@ -123,10 +129,22 @@ For each repo `import` compares the folder's `<owner>/<repo>` against the git `o
|
|
|
123
129
|
forgemap cleanup # list deletable clones, then type "yes" to confirm
|
|
124
130
|
forgemap cleanup --dry-run # show candidates + why every other idle repo is kept
|
|
125
131
|
forgemap cleanup --days 540 # idle threshold in days (default 365)
|
|
126
|
-
forgemap cleanup --include-dirty --include-unpushed # also delete repos with local-only work (lost!)
|
|
132
|
+
forgemap cleanup --include-dirty --include-unpushed --include-stashed # also delete repos with local-only work (lost!)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
A repo is only deleted when it is idle for `--days`+ days (by last **local** commit), has a clean working tree, has nothing unpushed, has no stashed work, **and** its remote still exists — so everything removed is provably backed up. Repos without a remote (or with a gone/unreachable one) are never touched; empty owner directories left behind are pruned automatically. Deletion needs an explicit typed `yes` (or `--yes`).
|
|
136
|
+
|
|
137
|
+
### Drop one repo — `delete`
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
forgemap delete kirchDev/laravel-pbac # gates, then type "yes" to confirm
|
|
141
|
+
forgemap delete github:foo/bar # forge-qualified slug or full URL
|
|
142
|
+
forgemap delete foo/bar --dry-run # report the gates; never prompt or delete
|
|
143
|
+
forgemap delete foo/bar --yes # non-interactive (scripts)
|
|
144
|
+
forgemap delete foo/bar --include-dirty --include-unpushed --include-stashed # delete local-only work too (lost!)
|
|
127
145
|
```
|
|
128
146
|
|
|
129
|
-
|
|
147
|
+
The targeted counterpart to `cleanup`: same safety gates, no staleness requirement — for the repo you are done with *today*. It runs the identical checks (clean tree, nothing unpushed, no stashed work, remote still exists) and prints the local-only work at stake, naming the branches that carry unpushed commits and the stash count rather than just saying "unpushed". A gone or unreachable remote is a **hard stop that no flag overrides** — that local copy may be the only one left. After deleting, the repo is evicted from the scan cache and emptied owner directories are pruned.
|
|
130
148
|
|
|
131
149
|
### Preflight your config
|
|
132
150
|
|