forgemap 0.4.1-dev-main.74-6f280f6 โ 0.4.1-dev-main.86-4ebe4b0
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 +19 -4
- package/dist/bin/forgemap.mjs +3070 -2859
- package/dist/bin/forgemap.mjs.map +1 -1
- package/dist/config/define.mjs +6 -5
- package/dist/config/define.mjs.map +1 -1
- package/dist/index.mjs +1 -4
- package/package.json +8 -8
- package/dist/index.mjs.map +0 -1
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
|
|
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, delete, 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
|
|
@@ -103,10 +114,14 @@ forgemap status --format json # structured for jq + scripts
|
|
|
103
114
|
|
|
104
115
|
# --filter keeps only matching owners/forges. Repeatable, OR-combined.
|
|
105
116
|
forgemap status --format json --filter kirchDev --filter TitusKirch
|
|
117
|
+
|
|
118
|
+
forgemap status --no-cache # rescan the disk instead of using the cached tree
|
|
106
119
|
```
|
|
107
120
|
|
|
108
121
|
`--filter` works on `status`, `sync` and `search`. It matches an **owner** or a **forge name** exactly (case-insensitive) โ unlike `--query`, which is fuzzy.
|
|
109
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
|
+
|
|
110
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.
|
|
111
126
|
|
|
112
127
|
### Adopt an existing layout โ `import`
|