@alexgorbatchev/dotfiles 0.0.5 → 0.0.10

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.
@@ -52,39 +52,39 @@ Research the tool’s runtime behavior:
52
52
  Select the most appropriate method based on your investigation. Prefer official, precompiled, and well-supported methods.
53
53
 
54
54
  - **`github-release`**: best for tools with prebuilt binaries on GitHub.
55
- - Guide: [GitHub Release Installation Guide](installation-methods.md#github-release.md)
55
+ - Guide: [GitHub Release Installation Guide](installation-methods/github-release.md)
56
56
  - Use `ghCli: true` to fetch releases via `gh` CLI instead of direct API access (useful for GitHub Enterprise or when `GITHUB_TOKEN` isn't configured)
57
57
  - Use `prerelease: true` to include prereleases when fetching latest (needed for repos that only publish prerelease versions)
58
58
 
59
59
  - **`gitea-release`**: best for tools with prebuilt binaries on Gitea, Forgejo, or Codeberg.
60
- - Guide: [Gitea/Forgejo Release Installation Guide](installation-methods.md#gitea-release.md)
60
+ - Guide: [Gitea/Forgejo Release Installation Guide](installation-methods/gitea-release.md)
61
61
  - Requires `instanceUrl` (e.g., `https://codeberg.org`) and `repo` (e.g., `Codeberg/pages-server`)
62
62
  - Supports optional `token` for private repos or rate-limited instances
63
63
  - Use `prerelease: true` to include prereleases when fetching latest
64
64
 
65
65
  - **`brew`**: use if the tool is officially available on Homebrew.
66
- - Guide: [Homebrew Installation Guide](installation-methods.md#homebrew.md)
66
+ - Guide: [Homebrew Installation Guide](installation-methods/brew.md)
67
67
 
68
68
  - **`cargo`**: prefer for Rust tools available on crates.io.
69
- - Guide: [Cargo Installation Guide](installation-methods.md#cargo.md)
69
+ - Guide: [Cargo Installation Guide](installation-methods/cargo.md)
70
70
 
71
71
  - **`npm`**: for tools published as npm packages.
72
- - Guide: [npm Installation Guide](installation-methods.md#npm.md)
72
+ - Guide: [npm Installation Guide](installation-methods/npm.md)
73
73
 
74
74
  - **`curl-script`**: for tools with an official install script.
75
- - Guide: [Curl Script Installation Guide](installation-methods.md#curl-script.md)
75
+ - Guide: [Curl Script Installation Guide](installation-methods/curl-script.md)
76
76
 
77
77
  - **`curl-tar`**: for direct archive downloads from a stable URL.
78
- - Guide: [Curl Tar Installation Guide](installation-methods.md#curl-tar.md)
78
+ - Guide: [Curl Tar Installation Guide](installation-methods/curl-tar.md)
79
79
 
80
80
  - **`curl-binary`**: for direct binary file downloads (no archive extraction).
81
- - Guide: [Curl Binary Installation Guide](installation-methods.md#curl-binary.md)
81
+ - Guide: [Curl Binary Installation Guide](installation-methods/curl-binary.md)
82
82
 
83
83
  - **`manual`**: for custom install logic or dotfiles-provided binaries/scripts. Can be called without params: `install('manual')`.
84
- - Guide: [Manual Installation Guide](installation-methods.md#manual.md)
84
+ - Guide: [Manual Installation Guide](installation-methods/manual.md)
85
85
 
86
86
  - **`zsh-plugin`**: for zsh plugins that are cloned from Git repositories.
87
- - Guide: [Zsh Plugin Installation Guide](installation-methods.md#zsh-plugin.md)
87
+ - Guide: [Zsh Plugin Installation Guide](installation-methods/zsh-plugin.md)
88
88
 
89
89
  ### Step 2: Configure Binary Specification
90
90
 
@@ -96,13 +96,13 @@ To disable usage tracking globally, set `DOTFILES_USAGE_TRACKING=0` in your envi
96
96
 
97
97
  ```ts
98
98
  // Single binary with default pattern
99
- install('github-release', { repo: 'owner/tool' }).bin('tool');
99
+ install("github-release", { repo: "owner/tool" }).bin("tool");
100
100
 
101
101
  // Multiple binaries - chain .bin() calls
102
- install('github-release', { repo: 'owner/tool' }).bin('tool').bin('tool-helper');
102
+ install("github-release", { repo: "owner/tool" }).bin("tool").bin("tool-helper");
103
103
 
104
104
  // Custom pattern for binary location in archive
105
- install('github-release', { repo: 'owner/tool' }).bin('tool', '*/bin/tool'); // Pattern: {,*/}tool by default
105
+ install("github-release", { repo: "owner/tool" }).bin("tool", "*/bin/tool"); // Pattern: {,*/}tool by default
106
106
  ```
107
107
 
108
108
  **Binary Pattern Matching (for archive-based installation methods only)**:
@@ -133,17 +133,17 @@ All installation methods support an `env` parameter for setting environment vari
133
133
 
134
134
  ```ts
135
135
  // Static environment variables
136
- install('github-release', {
137
- repo: 'owner/tool',
138
- env: { CUSTOM_FLAG: 'true' },
139
- }).bin('tool');
136
+ install("github-release", {
137
+ repo: "owner/tool",
138
+ env: { CUSTOM_FLAG: "true" },
139
+ }).bin("tool");
140
140
 
141
141
  // Dynamic environment variables (receives context with projectConfig, stagingDir)
142
- install('curl-script', {
143
- url: 'https://example.com/install.sh',
144
- shell: 'bash',
142
+ install("curl-script", {
143
+ url: "https://example.com/install.sh",
144
+ shell: "bash",
145
145
  env: (ctx) => ({ INSTALL_DIR: ctx.stagingDir }),
146
- }).bin('tool');
146
+ }).bin("tool");
147
147
  ```
148
148
 
149
149
  **Environment Context** (available in dynamic `env` functions):
@@ -158,8 +158,8 @@ install('curl-script', {
158
158
  Use the fluent shell configurator with `.zsh()`, `.bash()`, or `.powershell()` methods.
159
159
 
160
160
  ```ts
161
- install('github-release', { repo: 'owner/tool' })
162
- .bin('tool')
161
+ install("github-release", { repo: "owner/tool" })
162
+ .bin("tool")
163
163
  .zsh((shell) =>
164
164
  shell
165
165
  .env({
@@ -167,15 +167,15 @@ install('github-release', { repo: 'owner/tool' })
167
167
  TOOL_CONFIG_DIR: ctx.toolDir,
168
168
  })
169
169
  .aliases({
170
- t: 'tool',
171
- ts: 'tool status',
170
+ t: "tool",
171
+ ts: "tool status",
172
172
  })
173
- .completions('_tool') // Relative path resolves to toolDir/_tool
174
- .sourceFile('init.zsh') // Relative path resolves to toolDir/init.zsh (skips if missing)
173
+ .completions("_tool") // Relative path resolves to toolDir/_tool
174
+ .sourceFile("init.zsh") // Relative path resolves to toolDir/init.zsh (skips if missing)
175
175
  .always(/* zsh */ `
176
176
  # Fast runtime setup (runs every shell startup)
177
177
  ...
178
- `)
178
+ `),
179
179
  );
180
180
  ```
181
181
 
@@ -307,10 +307,10 @@ Reference: [Shell Integration Guide](shell-and-hooks.md) and [Completions Guide]
307
307
  Relative symlink source paths resolve to `ctx.toolDir` (the directory containing the `.tool.ts` file). Leading `./` is optional.
308
308
 
309
309
  ```ts
310
- install('github-release', { repo: 'owner/tool' })
311
- .bin('tool')
312
- .symlink('config.toml', '~/.config/tool/config.toml') // Resolves to ctx.toolDir/config.toml
313
- .symlink('./themes/', '~/.config/tool/themes'); // Leading ./ is optional
310
+ install("github-release", { repo: "owner/tool" })
311
+ .bin("tool")
312
+ .symlink("config.toml", "~/.config/tool/config.toml") // Resolves to ctx.toolDir/config.toml
313
+ .symlink("./themes/", "~/.config/tool/themes"); // Leading ./ is optional
314
314
  ```
315
315
 
316
316
  Reference: [Shell Integration Guide](shell-and-hooks.md#symbolic-links)
@@ -322,23 +322,25 @@ Reference: [Shell Integration Guide](shell-and-hooks.md#symbolic-links)
322
322
  Use `.platform()` for platform- and architecture-specific overrides. The callback receives an `install` function for that specific platform.
323
323
 
324
324
  ```ts
325
- import { Architecture, defineTool, Platform } from '@alexgorbatchev/dotfiles';
325
+ import { Architecture, defineTool, Platform } from "@alexgorbatchev/dotfiles";
326
326
 
327
327
  export default defineTool((install) =>
328
328
  install()
329
- .bin('tool')
329
+ .bin("tool")
330
330
  // macOS-specific installation (different method: brew)
331
- .platform(Platform.MacOS, (install) => install('brew', { formula: 'tool' }))
331
+ .platform(Platform.MacOS, (install) => install("brew", { formula: "tool" }))
332
332
  // Linux-specific installation (different method: github-release)
333
333
  .platform(Platform.Linux, (install) =>
334
- install('github-release', {
335
- repo: 'owner/tool',
336
- }))
334
+ install("github-release", {
335
+ repo: "owner/tool",
336
+ }),
337
+ )
337
338
  // Windows with Arm64
338
339
  .platform(Platform.Windows, Architecture.Arm64, (install) =>
339
- install('github-release', {
340
- repo: 'owner/tool',
341
- }))
340
+ install("github-release", {
341
+ repo: "owner/tool",
342
+ }),
343
+ ),
342
344
  );
343
345
  ```
344
346
 
@@ -349,11 +351,11 @@ Reference: [Platform Support Guide](configuration.md#platform-support)
349
351
  Use hooks for custom installation logic when fluent configuration is insufficient.
350
352
 
351
353
  ```ts
352
- install('github-release', { repo: 'owner/tool' })
353
- .bin('tool')
354
- .hook('after-install', async ({ log, $, installedDir }) => {
354
+ install("github-release", { repo: "owner/tool" })
355
+ .bin("tool")
356
+ .hook("after-install", async ({ log, $, installedDir }) => {
355
357
  await $`${installedDir}/tool init`;
356
- log.info('Tool initialized');
358
+ log.info("Tool initialized");
357
359
  });
358
360
  ```
359
361
 
@@ -362,22 +364,22 @@ install('github-release', { repo: 'owner/tool' })
362
364
  **Executing Installed Binaries**: In `after-install` hooks, the shell's PATH is automatically enhanced to include directories containing installed binaries. You can execute freshly installed tools by name:
363
365
 
364
366
  ```ts
365
- install('github-release', { repo: 'owner/tool' })
366
- .bin('tool')
367
- .hook('after-install', async ({ $, log }) => {
367
+ install("github-release", { repo: "owner/tool" })
368
+ .bin("tool")
369
+ .hook("after-install", async ({ $, log }) => {
368
370
  // Binary is automatically available by name - no full path needed
369
371
  await $`tool --version`;
370
372
  await $`tool init`;
371
- log.info('Tool initialized');
373
+ log.info("Tool initialized");
372
374
  });
373
375
  ```
374
376
 
375
377
  **File Modifications in Hooks**: Use `ctx.replaceInFile()` for regex-based file modifications:
376
378
 
377
379
  ```ts
378
- install('github-release', { repo: 'owner/tool' })
379
- .bin('tool')
380
- .hook('after-install', async (ctx) => {
380
+ install("github-release", { repo: "owner/tool" })
381
+ .bin("tool")
382
+ .hook("after-install", async (ctx) => {
381
383
  // Replace a value in a config file (returns true if replaced)
382
384
  const wasReplaced = await ctx.replaceInFile(
383
385
  `${ctx.installedDir}/config.toml`,
@@ -390,12 +392,12 @@ install('github-release', { repo: 'owner/tool' })
390
392
  `${ctx.installedDir}/settings.ini`,
391
393
  /version=(\d+)/,
392
394
  (match) => `version=${Number(match.captures[0]) + 1}`,
393
- { mode: 'line' },
395
+ { mode: "line" },
394
396
  );
395
397
 
396
398
  // With error message - logs "message: filePath: pattern" if pattern not found
397
399
  await ctx.replaceInFile(`${ctx.installedDir}/config.toml`, /api_key = ".*"/, 'api_key = "secret"', {
398
- errorMessage: 'Could not find api_key setting in config.toml',
400
+ errorMessage: "Could not find api_key setting in config.toml",
399
401
  });
400
402
  });
401
403
  ```
@@ -410,13 +412,13 @@ install('github-release', { repo: 'owner/tool' })
410
412
  **Resolving Glob Patterns**: Use `ctx.resolve()` to match a glob pattern to a single path:
411
413
 
412
414
  ```ts
413
- install('github-release', { repo: 'owner/tool' })
414
- .bin('tool')
415
+ install("github-release", { repo: "owner/tool" })
416
+ .bin("tool")
415
417
  .zsh((shell) =>
416
418
  shell.always(/* zsh */ `
417
419
  # Resolve versioned directory (e.g., tool-14.1.0-x86_64-linux)
418
- source "${ctx.resolve('completions/*.zsh')}"
419
- `)
420
+ source "${ctx.resolve("completions/*.zsh")}"
421
+ `),
420
422
  );
421
423
  ```
422
424
 
@@ -434,7 +436,7 @@ Reference: [Hooks Guide](shell-and-hooks.md#hooks) and [API Reference](api-refer
434
436
  Use `.disable()` to temporarily skip a tool during generation without removing its configuration. A warning will be logged when the tool is skipped.
435
437
 
436
438
  ```ts
437
- install('github-release', { repo: 'owner/tool' }).bin('tool').disable(); // Tool will be skipped with a warning
439
+ install("github-release", { repo: "owner/tool" }).bin("tool").disable(); // Tool will be skipped with a warning
438
440
  ```
439
441
 
440
442
  This is useful for:
@@ -449,13 +451,11 @@ Use `.hostname(pattern)` to restrict a tool to specific machines. When a hostnam
449
451
 
450
452
  ```ts
451
453
  // Exact hostname match
452
- install('github-release', { repo: 'owner/work-tools' })
453
- .bin('work-tool')
454
- .hostname('my-work-laptop');
454
+ install("github-release", { repo: "owner/work-tools" }).bin("work-tool").hostname("my-work-laptop");
455
455
 
456
456
  // Regex pattern match (any hostname starting with "work-")
457
- install('github-release', { repo: 'owner/work-tools' })
458
- .bin('work-tool')
457
+ install("github-release", { repo: "owner/work-tools" })
458
+ .bin("work-tool")
459
459
  .hostname(/^work-.*$/);
460
460
  ```
461
461
 
@@ -506,7 +506,7 @@ Do NOT include archive-structure narration in the comment (the code already show
506
506
  ### Example 1: Simple GitHub Release Tool
507
507
 
508
508
  ```ts
509
- import { defineTool } from '@alexgorbatchev/dotfiles';
509
+ import { defineTool } from "@alexgorbatchev/dotfiles";
510
510
 
511
511
  /**
512
512
  * ripgrep - A line-oriented search tool that recursively searches your current
@@ -515,16 +515,16 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
515
515
  * https://github.com/BurntSushi/ripgrep
516
516
  */
517
517
  export default defineTool((install) =>
518
- install('github-release', {
519
- repo: 'BurntSushi/ripgrep',
520
- }).bin('rg')
518
+ install("github-release", {
519
+ repo: "BurntSushi/ripgrep",
520
+ }).bin("rg"),
521
521
  );
522
522
  ```
523
523
 
524
524
  ### Example 1b: GitHub Release with gh CLI
525
525
 
526
526
  ```ts
527
- import { defineTool } from '@alexgorbatchev/dotfiles';
527
+ import { defineTool } from "@alexgorbatchev/dotfiles";
528
528
 
529
529
  /**
530
530
  * ripgrep - Using gh CLI for API access (GitHub Enterprise or auth via gh).
@@ -532,17 +532,17 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
532
532
  * https://github.com/BurntSushi/ripgrep
533
533
  */
534
534
  export default defineTool((install) =>
535
- install('github-release', {
536
- repo: 'BurntSushi/ripgrep',
535
+ install("github-release", {
536
+ repo: "BurntSushi/ripgrep",
537
537
  ghCli: true, // Use `gh api` instead of direct fetch
538
- }).bin('rg')
538
+ }).bin("rg"),
539
539
  );
540
540
  ```
541
541
 
542
542
  ### Example 2: Tool with Shell Integration
543
543
 
544
544
  ```ts
545
- import { defineTool } from '@alexgorbatchev/dotfiles';
545
+ import { defineTool } from "@alexgorbatchev/dotfiles";
546
546
 
547
547
  /**
548
548
  * fzf - Command-line fuzzy finder.
@@ -550,26 +550,27 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
550
550
  * https://github.com/junegunn/fzf
551
551
  */
552
552
  export default defineTool((install) =>
553
- install('github-release', {
554
- repo: 'junegunn/fzf',
553
+ install("github-release", {
554
+ repo: "junegunn/fzf",
555
555
  })
556
- .bin('fzf')
557
- .zsh((shell) =>
558
- shell
559
- .env({
560
- FZF_DEFAULT_OPTS: '--color=fg+:cyan,bg+:black,hl+:yellow',
561
- })
562
- .aliases({ f: 'fzf' })
563
- .completions('completion.zsh') // Resolves to ctx.toolDir/completion.zsh
564
- .sourceFile('key-bindings.zsh') // Resolves to ctx.toolDir/key-bindings.zsh
565
- )
556
+ .bin("fzf")
557
+ .zsh(
558
+ (shell) =>
559
+ shell
560
+ .env({
561
+ FZF_DEFAULT_OPTS: "--color=fg+:cyan,bg+:black,hl+:yellow",
562
+ })
563
+ .aliases({ f: "fzf" })
564
+ .completions("completion.zsh") // Resolves to ctx.toolDir/completion.zsh
565
+ .sourceFile("key-bindings.zsh"), // Resolves to ctx.toolDir/key-bindings.zsh
566
+ ),
566
567
  );
567
568
  ```
568
569
 
569
570
  ### Example 3: Manual Installation (Dotfiles Script)
570
571
 
571
572
  ```ts
572
- import { defineTool } from '@alexgorbatchev/dotfiles';
573
+ import { defineTool } from "@alexgorbatchev/dotfiles";
573
574
 
574
575
  /**
575
576
  * deploy - Custom deployment script included with dotfiles.
@@ -577,18 +578,18 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
577
578
  * https://example.com/deploy
578
579
  */
579
580
  export default defineTool((install) =>
580
- install('manual', {
581
- binaryPath: './scripts/deploy.sh',
581
+ install("manual", {
582
+ binaryPath: "./scripts/deploy.sh",
582
583
  })
583
- .bin('deploy')
584
- .symlink('./deploy.config.yaml', '~/.config/deploy/config.yaml')
584
+ .bin("deploy")
585
+ .symlink("./deploy.config.yaml", "~/.config/deploy/config.yaml"),
585
586
  );
586
587
  ```
587
588
 
588
589
  ### Example 3b: Manual Without Params
589
590
 
590
591
  ```ts
591
- import { defineTool } from '@alexgorbatchev/dotfiles';
592
+ import { defineTool } from "@alexgorbatchev/dotfiles";
592
593
 
593
594
  /**
594
595
  * tokscale - Token scaling utility via bun.
@@ -596,21 +597,21 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
596
597
  * https://example.com/tokscale
597
598
  */
598
599
  export default defineTool((install) =>
599
- install('manual')
600
- .bin('tokscale')
601
- .dependsOn('bun')
600
+ install("manual")
601
+ .bin("tokscale")
602
+ .dependsOn("bun")
602
603
  .zsh((shell) =>
603
604
  shell.functions({
604
605
  tokscale: `bun x tokscale@latest`,
605
- })
606
- )
606
+ }),
607
+ ),
607
608
  );
608
609
  ```
609
610
 
610
611
  ### Example 4: Configuration-Only Tool
611
612
 
612
613
  ```ts
613
- import { defineTool } from '@alexgorbatchev/dotfiles';
614
+ import { defineTool } from "@alexgorbatchev/dotfiles";
614
615
 
615
616
  /**
616
617
  * git - Git configuration and aliases.
@@ -619,22 +620,22 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
619
620
  */
620
621
  export default defineTool((install) =>
621
622
  install() // Configuration-only: no install params, no .bin()
622
- .symlink('./gitconfig', '~/.gitconfig')
623
+ .symlink("./gitconfig", "~/.gitconfig")
623
624
  .zsh((shell) =>
624
625
  shell.aliases({
625
- g: 'git',
626
- gs: 'git status',
627
- ga: 'git add',
628
- gc: 'git commit',
629
- })
630
- )
626
+ g: "git",
627
+ gs: "git status",
628
+ ga: "git add",
629
+ gc: "git commit",
630
+ }),
631
+ ),
631
632
  );
632
633
  ```
633
634
 
634
635
  ### Example 5: Rust Tool with Cargo
635
636
 
636
637
  ```ts
637
- import { defineTool } from '@alexgorbatchev/dotfiles';
638
+ import { defineTool } from "@alexgorbatchev/dotfiles";
638
639
 
639
640
  /**
640
641
  * eza - A modern replacement for ls.
@@ -642,28 +643,29 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
642
643
  * https://github.com/eza-community/eza
643
644
  */
644
645
  export default defineTool((install) =>
645
- install('cargo', {
646
- crateName: 'eza',
647
- githubRepo: 'eza-community/eza',
646
+ install("cargo", {
647
+ crateName: "eza",
648
+ githubRepo: "eza-community/eza",
648
649
  })
649
- .bin('eza')
650
- .zsh((shell) =>
651
- shell
652
- .aliases({
653
- ls: 'eza',
654
- ll: 'eza -l',
655
- la: 'eza -la',
656
- tree: 'eza --tree',
657
- })
658
- .completions('_eza') // Resolves to ctx.toolDir/_eza
659
- )
650
+ .bin("eza")
651
+ .zsh(
652
+ (shell) =>
653
+ shell
654
+ .aliases({
655
+ ls: "eza",
656
+ ll: "eza -l",
657
+ la: "eza -la",
658
+ tree: "eza --tree",
659
+ })
660
+ .completions("_eza"), // Resolves to ctx.toolDir/_eza
661
+ ),
660
662
  );
661
663
  ```
662
664
 
663
665
  ### Example 6: npm Tool
664
666
 
665
667
  ```ts
666
- import { defineTool } from '@alexgorbatchev/dotfiles';
668
+ import { defineTool } from "@alexgorbatchev/dotfiles";
667
669
 
668
670
  /**
669
671
  * prettier - An opinionated code formatter.
@@ -671,16 +673,16 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
671
673
  * https://prettier.io
672
674
  */
673
675
  export default defineTool((install) =>
674
- install('npm', {
675
- package: 'prettier',
676
- }).bin('prettier')
676
+ install("npm", {
677
+ package: "prettier",
678
+ }).bin("prettier"),
677
679
  );
678
680
  ```
679
681
 
680
682
  ### Example 6b: Tool with Shell Functions
681
683
 
682
684
  ```ts
683
- import { defineTool } from '@alexgorbatchev/dotfiles';
685
+ import { defineTool } from "@alexgorbatchev/dotfiles";
684
686
 
685
687
  /**
686
688
  * kubectl - Kubernetes command-line tool with custom wrappers.
@@ -688,20 +690,20 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
688
690
  * https://kubernetes.io/docs/reference/kubectl/
689
691
  */
690
692
  export default defineTool((install) =>
691
- install('github-release', {
692
- repo: 'kubernetes/kubectl',
693
+ install("github-release", {
694
+ repo: "kubernetes/kubectl",
693
695
  })
694
- .bin('kubectl')
696
+ .bin("kubectl")
695
697
  .zsh((shell) =>
696
698
  shell
697
699
  .env({
698
- KUBECONFIG: '~/.kube/config',
700
+ KUBECONFIG: "~/.kube/config",
699
701
  })
700
702
  .aliases({
701
- k: 'kubectl',
702
- kgp: 'kubectl get pods',
703
+ k: "kubectl",
704
+ kgp: "kubectl get pods",
703
705
  })
704
- .completions({ cmd: 'kubectl completion zsh' })
706
+ .completions({ cmd: "kubectl completion zsh" })
705
707
  .functions({
706
708
  kns: /* zsh */ `
707
709
  kubectl config set-context --current --namespace="$1"
@@ -709,15 +711,15 @@ export default defineTool((install) =>
709
711
  kctx: /* zsh */ `
710
712
  kubectl config use-context "$1"
711
713
  `,
712
- })
713
- )
714
+ }),
715
+ ),
714
716
  );
715
717
  ```
716
718
 
717
719
  ### Example 7: Tool with Dynamic Initialization
718
720
 
719
721
  ```ts
720
- import { defineTool } from '@alexgorbatchev/dotfiles';
722
+ import { defineTool } from "@alexgorbatchev/dotfiles";
721
723
 
722
724
  /**
723
725
  * zoxide - A smarter cd command with frecency tracking.
@@ -725,27 +727,27 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
725
727
  * https://github.com/ajeetdsouza/zoxide
726
728
  */
727
729
  export default defineTool((install) =>
728
- install('github-release', {
729
- repo: 'ajeetdsouza/zoxide',
730
+ install("github-release", {
731
+ repo: "ajeetdsouza/zoxide",
730
732
  })
731
- .bin('zoxide')
733
+ .bin("zoxide")
732
734
  .zsh((shell) =>
733
735
  shell
734
736
  .env({
735
- _ZO_DATA_DIR: '~/.local/share/zoxide',
737
+ _ZO_DATA_DIR: "~/.local/share/zoxide",
736
738
  })
737
- .completions({ cmd: 'zoxide completions zsh' }).always(/* zsh */ `
739
+ .completions({ cmd: "zoxide completions zsh" }).always(/* zsh */ `
738
740
  # Initialize zoxide with cd replacement
739
741
  eval "$(zoxide init zsh --cmd cd)"
740
- `)
741
- )
742
+ `),
743
+ ),
742
744
  );
743
745
  ```
744
746
 
745
747
  ### Example 8: Zsh Plugin (Git Repository)
746
748
 
747
749
  ```ts
748
- import { defineTool } from '@alexgorbatchev/dotfiles';
750
+ import { defineTool } from "@alexgorbatchev/dotfiles";
749
751
 
750
752
  /**
751
753
  * zsh-vi-mode - A better and friendly vi(vim) mode plugin for ZSH.
@@ -753,22 +755,21 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
753
755
  * https://github.com/jeffreytse/zsh-vi-mode
754
756
  */
755
757
  export default defineTool((install) =>
756
- install('zsh-plugin', {
757
- repo: 'jeffreytse/zsh-vi-mode',
758
- })
759
- .zsh((shell) =>
760
- shell.env({
761
- ZVM_VI_INSERT_ESCAPE_BINDKEY: 'jj',
762
- ZVM_CURSOR_STYLE_ENABLED: 'false',
763
- })
764
- )
758
+ install("zsh-plugin", {
759
+ repo: "jeffreytse/zsh-vi-mode",
760
+ }).zsh((shell) =>
761
+ shell.env({
762
+ ZVM_VI_INSERT_ESCAPE_BINDKEY: "jj",
763
+ ZVM_CURSOR_STYLE_ENABLED: "false",
764
+ }),
765
+ ),
765
766
  );
766
767
  ```
767
768
 
768
769
  ### Example 9: Gitea/Forgejo Release Tool
769
770
 
770
771
  ```ts
771
- import { defineTool } from '@alexgorbatchev/dotfiles';
772
+ import { defineTool } from "@alexgorbatchev/dotfiles";
772
773
 
773
774
  /**
774
775
  * pages-server - Codeberg Pages static site server.
@@ -776,10 +777,10 @@ import { defineTool } from '@alexgorbatchev/dotfiles';
776
777
  * https://codeberg.org/Codeberg/pages-server
777
778
  */
778
779
  export default defineTool((install) =>
779
- install('gitea-release', {
780
- instanceUrl: 'https://codeberg.org',
781
- repo: 'Codeberg/pages-server',
782
- }).bin('pages-server')
780
+ install("gitea-release", {
781
+ instanceUrl: "https://codeberg.org",
782
+ repo: "Codeberg/pages-server",
783
+ }).bin("pages-server"),
783
784
  );
784
785
  ```
785
786
 
@@ -792,7 +793,7 @@ After any `.tool.ts` file change, you **must** run `dotfiles generate` to sync t
792
793
  - An existing `.tool.ts` file is modified
793
794
 
794
795
  ```bash
795
- bun cli --config=<path-to-config.ts> generate
796
+ bun cli --config=<path-to-dotfiles.config.ts> generate
796
797
  ```
797
798
 
798
799
  Without this step, the generated shims and shell configuration will be out of sync with the tool definitions.
@@ -848,16 +849,16 @@ Without this step, the generated shims and shell configuration will be out of sy
848
849
 
849
850
  **Installation Methods**
850
851
 
851
- - [GitHub Release Installation](installation-methods.md#github-release.md)
852
- - [Gitea/Forgejo Release Installation](installation-methods.md#gitea-release.md)
853
- - [Homebrew Installation](installation-methods.md#homebrew.md)
854
- - [Cargo Installation](installation-methods.md#cargo.md)
855
- - [npm Installation](installation-methods.md#npm.md)
856
- - [Curl Script Installation](installation-methods.md#curl-script.md)
857
- - [Curl Tar Installation](installation-methods.md#curl-tar.md)
858
- - [Curl Binary Installation](installation-methods.md#curl-binary.md)
859
- - [Manual Installation](installation-methods.md#manual.md)
860
- - [Zsh Plugin Installation](installation-methods.md#zsh-plugin.md)
852
+ - [GitHub Release Installation](installation-methods/github-release.md)
853
+ - [Gitea/Forgejo Release Installation](installation-methods/gitea-release.md)
854
+ - [Homebrew Installation](installation-methods/brew.md)
855
+ - [Cargo Installation](installation-methods/cargo.md)
856
+ - [npm Installation](installation-methods/npm.md)
857
+ - [Curl Script Installation](installation-methods/curl-script.md)
858
+ - [Curl Tar Installation](installation-methods/curl-tar.md)
859
+ - [Curl Binary Installation](installation-methods/curl-binary.md)
860
+ - [Manual Installation](installation-methods/manual.md)
861
+ - [Zsh Plugin Installation](installation-methods/zsh-plugin.md)
861
862
 
862
863
  **Other Resources**
863
864