forgemap 0.4.0-dev.45-f644e6e โ†’ 0.4.0-dev.46-3e37b68

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 (2) hide show
  1. package/README.md +40 -41
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -37,53 +37,41 @@ That's it. Every repo lands at a predictable `<root>/<forge.dir>/<owner>/<repo>`
37
37
  - **๐Ÿงฐ Typed config** โ€” `forgemap.config.ts` with `defineForgeMapConfig()`, parent walk-up discovery, and a global fallback.
38
38
  - **๐Ÿš€ Shell-friendly** โ€” `forgemap shell-init --install` wires up real `forgemap cd <slug>` **and** tab-completion in one step.
39
39
 
40
- ## ๐Ÿ“ฆ Installation
40
+ ## ๐Ÿ“ฆ Install & run
41
+
42
+ > [!IMPORTANT]
43
+ > Needs **Node 24+** and **`git`** on `PATH`. [`gh`](https://cli.github.com/) (GitHub CLI) is only required when a `type: 'github'` forge is configured โ€” run `forgemap validate` for an exact rundown of what your config needs.
41
44
 
42
45
  ```bash
43
- npm install -g forgemap
44
- # or
45
- pnpm add -g forgemap
46
- ```
46
+ npm install -g forgemap # or: pnpm add -g forgemap
47
47
 
48
- **Requirements**
48
+ cd ~/projects # the directory that should hold all your repos
49
+ forgemap config init # write a starter forgemap.config.ts
50
+ forgemap shell-init --install # cd wrapper + completion โ†’ your rc file (idempotent)
51
+ source ~/.zshrc # re-source once, then it's automatic
49
52
 
50
- - Node 24+
51
- - `git` on `PATH`
52
- - [`gh`](https://cli.github.com/) (GitHub CLI) โ€” only when a `type: 'github'` forge is configured
53
+ forgemap clone kirchDev/laravel-pbac # any slug form works: owner/repo, forge:owner/repo, URL, SSH
54
+ forgemap cd laravel # fuzzy match โ†’ jump in; bare `forgemap cd` opens a picker
55
+ ```
53
56
 
54
- Run `forgemap validate` after setup for an exact rundown of what's needed for your config.
57
+ `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.
55
58
 
56
- 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.
59
+ <details>
60
+ <summary><strong>All commands</strong> โ€” clone, cd, search, open, sync/status, import, cleanup, validate, shell-init, config</summary>
57
61
 
58
- ## ๐Ÿš€ Quick start
62
+ ### Clone & jump
59
63
 
60
64
  ```bash
61
- # 1. Pick a directory that should hold all your repos and drop a config there.
62
- cd ~/projects
63
- forgemap config init
64
-
65
- # 2. Wire up the shell integration once โ€” real `forgemap cd` + tab-completion.
66
- forgemap shell-init --install # appends loaders to ~/.zshrc (or bashrc/fish)
67
- source ~/.zshrc # re-source once, then it's automatic
68
- # Prefer manual? eval "$(forgemap shell-init)" ยท fish: forgemap shell-init fish | source
69
-
70
- # 3. Clone โ€” any slug form works.
71
- forgemap clone kirchDev/laravel-pbac
65
+ forgemap clone kirchDev/laravel-pbac # default forge
72
66
  forgemap clone github:TitusKirch/forgemap
73
67
  forgemap clone https://github.com/foo/bar
74
68
 
75
- # 4. Jump into a repo from anywhere.
76
69
  forgemap cd kirchDev/laravel-pbac # exact slug โ†’ direct cd
77
70
  forgemap cd laravel # fuzzy single match โ†’ direct cd
78
71
  forgemap cd kirch # multiple matches โ†’ interactive picker
79
72
  forgemap cd # no arg โ†’ picker over every clone
80
73
  ```
81
74
 
82
- `forgemap cd` resolves the slug, walks/picks across your cloned repos,
83
- and actually changes directory because the shell wrapper from
84
- `shell-init` intercepts it before the binary runs. Every other
85
- subcommand falls through to the real binary unchanged.
86
-
87
75
  ### Search and pick on demand
88
76
 
89
77
  ```bash
@@ -156,6 +144,7 @@ Validates the schema, required CLI tools (`git` always, `gh` when a `type: 'gith
156
144
  forgemap shell-init --install # cd wrapper + completion โ†’ your rc file (idempotent)
157
145
  forgemap completion --install # completion only, if you don't want the cd wrapper
158
146
  forgemap shell-init # print the wrapper (manual: eval "$(โ€ฆ)")
147
+ forgemap shell-init fish | source # fish: source the wrapper directly
159
148
  forgemap completion bash # print the completion script for bash/zsh/fish
160
149
  ```
161
150
 
@@ -168,6 +157,8 @@ forgemap config init # write a starter forgemap.config.ts
168
157
  forgemap config show # print the resolved config + which file it came from
169
158
  ```
170
159
 
160
+ </details>
161
+
171
162
  ## โš™๏ธ Configuration
172
163
 
173
164
  `forgemap config init` writes a `forgemap.config.ts` like this:
@@ -194,6 +185,14 @@ export default defineForgeMapConfig({
194
185
  });
195
186
  ```
196
187
 
188
+ The config is discovered by walking **up** from your current directory (so `forgemap cd` works from inside any clone), then falling back to `~/.config/forgemap/`. Override with `--config <path>` or the `FORGEMAP_CONFIG` env var.
189
+
190
+ > [!TIP]
191
+ > Already have a directory full of repos? Skip writing this by hand โ€” `forgemap import <path>` derives `root` + `forges` from the existing layout.
192
+
193
+ <details>
194
+ <summary><strong>All configuration options</strong></summary>
195
+
197
196
  | Key | What it controls |
198
197
  | :------------------- | :-------------------------------------------------------------------------------------------------------- |
199
198
  | `root` | Base directory for all clones. Relative paths resolve against the config file's directory. |
@@ -205,10 +204,10 @@ export default defineForgeMapConfig({
205
204
 
206
205
  The config file is discovered by walking **up** from your current directory (so `forgemap cd` works from inside any clone, not just the root), then falling back to a global `$XDG_CONFIG_HOME/forgemap/forgemap.config.*` (i.e. `~/.config/forgemap/`) so commands work from anywhere. Override with `--config <path>` or the `FORGEMAP_CONFIG` env var.
207
206
 
208
- > [!TIP]
209
- > Already have a directory full of repos? Skip writing this by hand โ€” `forgemap import <path>` derives `root` + `forges` from the existing layout.
207
+ </details>
210
208
 
211
- ## ๐Ÿ—‚๏ธ Layout
209
+ <details>
210
+ <summary><strong>Repo layout &amp; slug syntax</strong></summary>
212
211
 
213
212
  ```
214
213
  <root>/
@@ -229,8 +228,6 @@ Example with the default config rooted at `~/projects`:
229
228
  โ””โ”€โ”€ forgemap/
230
229
  ```
231
230
 
232
- ## ๐Ÿšช Slug syntax
233
-
234
231
  | Form | Resolves to |
235
232
  | :---------------------------------- | :----------------------------------------------------- |
236
233
  | `kirchDev/laravel-pbac` | Default forge, `kirchDev/laravel-pbac`. |
@@ -239,7 +236,14 @@ Example with the default config rooted at `~/projects`:
239
236
  | `https://github.com/foo/bar.git` | Same, `.git` suffix stripped. |
240
237
  | `git@github.com:foo/bar.git` | SSH form, host matched against `forges[].host`. |
241
238
 
242
- ## ๐Ÿงช Testing
239
+ </details>
240
+
241
+ ## ๐Ÿค Contributing
242
+
243
+ PRs welcome. Conventional Commits required (enforced via commitlint); Husky runs lint-staged on every commit. Run `pnpm check:fix` before pushing โ€” CI will catch what husky missed.
244
+
245
+ <details>
246
+ <summary><strong>Dev scripts</strong></summary>
243
247
 
244
248
  ```bash
245
249
  pnpm install
@@ -251,12 +255,7 @@ pnpm bench # microbench scanRepos / cache hit / cache rebuild
251
255
 
252
256
  Tune the bench layout via env vars (`FORGEMAP_BENCH_FORGES`, `FORGEMAP_BENCH_OWNERS`, `FORGEMAP_BENCH_REPOS`, `FORGEMAP_BENCH_RUNS`).
253
257
 
254
- ## ๐Ÿค Contributing
255
-
256
- PRs welcome. Conventional Commits required (enforced via commitlint). Husky runs lint-staged on every commit.
257
-
258
- > [!TIP]
259
- > Run `pnpm check:fix` before pushing โ€” CI will catch what husky missed.
258
+ </details>
260
259
 
261
260
  ## ๐Ÿ›ฃ๏ธ Versioning
262
261
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package.json",
3
3
  "name": "forgemap",
4
- "version": "0.4.0-dev.45-f644e6e",
4
+ "version": "0.4.0-dev.46-3e37b68",
5
5
  "description": "CLI that manages a local repo layout grouped by git server, organization and repository name.",
6
6
  "keywords": [
7
7
  "cli",