forgemap 0.4.1-dev-main.65-0830609 β†’ 0.4.1-dev-main.78-dfeebd5

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
@@ -27,11 +27,11 @@ That's it. Every repo lands at a predictable `<root>/<forge.dir>/<owner>/<repo>`
27
27
 
28
28
  - **πŸ—‚οΈ Predictable layout** β€” every clone goes to `<root>/<forge.dir>/<owner>/<repo>`, configured once.
29
29
  - **πŸšͺ Flexible slug syntax** β€” `owner/repo`, `forge:owner/repo`, full HTTPS URLs, or SSH (`git@…:…`).
30
- - **πŸ” Fuzzy search** β€” `forgemap search <term>` finds local repos by owner or repo name (powered by [Fuse.js](https://www.fusejs.io/)).
30
+ - **πŸ” Fuzzy search** β€” `forgemap search <term>` finds local repos by owner or repo name (powered by [Fuse.js](https://www.fusejs.io/)); `cd`, `path` and `open` take the same fuzzy terms.
31
31
  - **πŸ€– Forge-aware** β€” `type: 'github'` shells out to `gh`; `type: 'git'` uses plain `git clone` with no extra dependencies.
32
- - **πŸ” Mass sync + status** β€” `forgemap sync` fetches every clone in parallel, `forgemap status` shows branch / dirty / ahead / behind per repo.
32
+ - **πŸ” Mass sync + status** β€” `forgemap sync` fetches every clone in parallel, `forgemap status` shows branch / dirty / ahead / behind per repo β€” narrow either to given owners or forges with a repeatable `--filter`.
33
33
  - **πŸ“₯ Import existing trees** β€” `forgemap import <path>` adopts a folder already laid out as `<server>/<owner>/<repo>`, reconciles each repo against its git remote (spotting moved or deleted remotes), and derives a config.
34
- - **🧹 Safe cleanup** β€” `forgemap cleanup` deletes long-idle local clones, but only the ones that are clean, fully pushed, and still exist on their remote β€” so nothing unbacked-up is ever lost.
34
+ - **🧹 Safe cleanup** β€” `forgemap cleanup` deletes long-idle clones, `forgemap delete <slug>` drops a single one β€” both only when it is clean, fully pushed, free of stashed work, and still on its remote, so nothing unbacked-up is ever lost.
35
35
  - **πŸ›‘οΈ Preflight validate** β€” `forgemap validate` checks the config schema and required CLIs before you discover a problem mid-clone.
36
36
  - **🧰 Typed config** β€” `forgemap.config.ts` with `defineForgeMapConfig()`, parent walk-up discovery, and a global fallback.
37
37
  - **πŸš€ Shell-friendly** β€” `forgemap shell-init --install` wires up real `forgemap cd <slug>` **and** tab-completion in one step.
@@ -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, path, search, pick, open, sync/status, import, cleanup, delete, validate, shell-init, config</summary>
60
60
 
61
61
  ### Clone & jump
62
62
 
@@ -71,6 +71,17 @@ forgemap cd kirch # multiple matches β†’ interactive pick
71
71
  forgemap cd # no arg β†’ picker over every clone
72
72
  ```
73
73
 
74
+ ### Print a path β€” `path`
75
+
76
+ ```bash
77
+ forgemap path kirchDev/laravel-pbac # β†’ ~/projects/comGithub/kirchDev/laravel-pbac
78
+ forgemap path laravel # fuzzy single match β†’ same path
79
+ cd "$(forgemap path laravel)" # the manual form of `forgemap cd`
80
+ code "$(forgemap path forgemap)" # feed any tool that takes a directory
81
+ ```
82
+
83
+ Prints where a repo lives β€” or *would* live, if it isn't cloned yet, which makes it useful for scripting a clone target. An exact `owner/repo` never touches the disk, so a strict slug always wins over a fuzzy match; ambiguous fuzzy terms error with the candidate list rather than guessing.
84
+
74
85
  ### Search and pick on demand
75
86
 
76
87
  ```bash
@@ -83,7 +94,8 @@ forgemap pick kirch # picker pre-filtered by fuzzy query
83
94
  ### Open the folder in the OS file manager
84
95
 
85
96
  ```bash
86
- forgemap open kirchDev/laravel-pbac
97
+ forgemap open kirchDev/laravel-pbac # exact slug
98
+ forgemap open laravel # fuzzy single match β†’ same folder
87
99
  ```
88
100
 
89
101
  - **WSL** β†’ launches `explorer.exe` against `\\wsl$\<distro>\…`, Explorer opens the folder
@@ -99,8 +111,17 @@ forgemap sync --forge work --query api # restrict scope
99
111
 
100
112
  forgemap status # tree: branch / dirty / ahead↑ / behind↓ / last commit
101
113
  forgemap status --format json # structured for jq + scripts
114
+
115
+ # --filter keeps only matching owners/forges. Repeatable, OR-combined.
116
+ forgemap status --format json --filter kirchDev --filter TitusKirch
117
+
118
+ forgemap status --no-cache # rescan the disk instead of using the cached tree
102
119
  ```
103
120
 
121
+ `--filter` works on `status`, `sync` and `search`. It matches an **owner** or a **forge name** exactly (case-insensitive) β€” unlike `--query`, which is fuzzy.
122
+
123
+ `status`, `sync` and `cleanup` read a cached repo tree so repeated runs stay fast. Pass `--no-cache` to skip it and walk the disk again β€” the cache refreshes on its own, so you only need this right after cloning or moving repos by hand.
124
+
104
125
  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
126
 
106
127
  ### Adopt an existing layout β€” `import`
@@ -123,10 +144,22 @@ For each repo `import` compares the folder's `<owner>/<repo>` against the git `o
123
144
  forgemap cleanup # list deletable clones, then type "yes" to confirm
124
145
  forgemap cleanup --dry-run # show candidates + why every other idle repo is kept
125
146
  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!)
147
+ forgemap cleanup --include-dirty --include-unpushed --include-stashed # also delete repos with local-only work (lost!)
148
+ ```
149
+
150
+ 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`).
151
+
152
+ ### Drop one repo β€” `delete`
153
+
154
+ ```bash
155
+ forgemap delete kirchDev/laravel-pbac # gates, then type "yes" to confirm
156
+ forgemap delete github:foo/bar # forge-qualified slug or full URL
157
+ forgemap delete foo/bar --dry-run # report the gates; never prompt or delete
158
+ forgemap delete foo/bar --yes # non-interactive (scripts)
159
+ forgemap delete foo/bar --include-dirty --include-unpushed --include-stashed # delete local-only work too (lost!)
127
160
  ```
128
161
 
129
- A repo is only deleted when it is idle for `--days`+ days (by last **local** commit), has a clean working tree, has nothing unpushed, **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`).
162
+ 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
163
 
131
164
  ### Preflight your config
132
165