@alexgorbatchev/dotfiles 0.0.6 → 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.
- package/README.md +45 -47
- package/cli.js +157 -157
- package/cli.js.map +274 -274
- package/dashboard-vf1askzj.js +159 -0
- package/{dashboard-0ebz5sqb.js.map → dashboard-vf1askzj.js.map} +33 -33
- package/dashboard.js +11 -11
- package/package.json +1 -1
- package/schemas.d.ts +106 -100
- package/skill/SKILL.md +7 -5
- package/skill/references/api-reference.md +49 -49
- package/skill/references/configuration.md +184 -174
- package/skill/references/installation-methods/brew.md +18 -18
- package/skill/references/installation-methods/cargo.md +19 -19
- package/skill/references/installation-methods/curl-binary.md +29 -27
- package/skill/references/installation-methods/curl-script.md +28 -28
- package/skill/references/installation-methods/curl-tar.md +27 -19
- package/skill/references/installation-methods/dmg.md +24 -24
- package/skill/references/installation-methods/gitea-release.md +24 -24
- package/skill/references/installation-methods/github-release.md +20 -20
- package/skill/references/installation-methods/manual.md +18 -18
- package/skill/references/installation-methods/npm.md +19 -19
- package/skill/references/installation-methods/overview.md +74 -75
- package/skill/references/installation-methods/zsh-plugin.md +31 -32
- package/skill/references/make-tool.md +168 -167
- package/skill/references/shell-and-hooks.md +78 -77
- package/dashboard-0ebz5sqb.js +0 -159
|
@@ -7,29 +7,29 @@ Shims are not supported for Homebrew-installed tools. The `.bin()` method should
|
|
|
7
7
|
## Basic Usage
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
import { defineTool } from
|
|
10
|
+
import { defineTool } from "@alexgorbatchev/dotfiles";
|
|
11
11
|
|
|
12
|
-
export default defineTool((install) => install(
|
|
12
|
+
export default defineTool((install) => install("brew", { formula: "ripgrep" }));
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
|
-
| Parameter | Description
|
|
18
|
-
| -------------- |
|
|
19
|
-
| `formula` | Formula or cask name (defaults to tool name)
|
|
20
|
-
| `cask` | Set `true` for cask installation
|
|
21
|
-
| `tap` | Tap(s) to add before installing
|
|
22
|
-
| `versionArgs` | Arguments for version check (e.g., `['--version']`)
|
|
23
|
-
| `versionRegex` | Regex to extract version from output
|
|
24
|
-
| `env` | Environment variables (static or dynamic function)
|
|
17
|
+
| Parameter | Description |
|
|
18
|
+
| -------------- | ----------------------------------------------------------- |
|
|
19
|
+
| `formula` | Formula or cask name (defaults to tool name) |
|
|
20
|
+
| `cask` | Set `true` for cask installation |
|
|
21
|
+
| `tap` | Tap(s) to add before installing |
|
|
22
|
+
| `versionArgs` | Arguments for version check (e.g., `['--version']`) |
|
|
23
|
+
| `versionRegex` | Regex to extract version from output (`string` or `RegExp`) |
|
|
24
|
+
| `env` | Environment variables (static or dynamic function) |
|
|
25
25
|
|
|
26
26
|
## Examples
|
|
27
27
|
|
|
28
28
|
### Homebrew Cask
|
|
29
29
|
|
|
30
30
|
```typescript
|
|
31
|
-
install(
|
|
32
|
-
formula:
|
|
31
|
+
install("brew", {
|
|
32
|
+
formula: "visual-studio-code",
|
|
33
33
|
cask: true,
|
|
34
34
|
});
|
|
35
35
|
```
|
|
@@ -37,19 +37,19 @@ install('brew', {
|
|
|
37
37
|
### With Custom Tap
|
|
38
38
|
|
|
39
39
|
```typescript
|
|
40
|
-
install(
|
|
41
|
-
formula:
|
|
40
|
+
install("brew", {
|
|
41
|
+
formula: "aerospace",
|
|
42
42
|
cask: true,
|
|
43
|
-
tap:
|
|
43
|
+
tap: "nikitabobko/tap",
|
|
44
44
|
});
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
### Multiple Taps
|
|
48
48
|
|
|
49
49
|
```typescript
|
|
50
|
-
install(
|
|
51
|
-
formula:
|
|
52
|
-
tap: [
|
|
50
|
+
install("brew", {
|
|
51
|
+
formula: "custom-tool",
|
|
52
|
+
tap: ["custom/tap", "another/tap"],
|
|
53
53
|
});
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -5,12 +5,12 @@ Installs Rust tools from crates.io using pre-compiled binaries via cargo-quickin
|
|
|
5
5
|
## Basic Usage
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
|
-
import { defineTool } from
|
|
8
|
+
import { defineTool } from "@alexgorbatchev/dotfiles";
|
|
9
9
|
|
|
10
10
|
export default defineTool((install, ctx) =>
|
|
11
|
-
install(
|
|
12
|
-
crateName:
|
|
13
|
-
}).bin(
|
|
11
|
+
install("cargo", {
|
|
12
|
+
crateName: "ripgrep",
|
|
13
|
+
}).bin("rg"),
|
|
14
14
|
);
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -42,12 +42,12 @@ export default defineTool((install, ctx) =>
|
|
|
42
42
|
|
|
43
43
|
```typescript
|
|
44
44
|
export default defineTool((install, ctx) =>
|
|
45
|
-
install(
|
|
46
|
-
crateName:
|
|
47
|
-
binarySource:
|
|
48
|
-
githubRepo:
|
|
49
|
-
assetPattern:
|
|
50
|
-
}).bin(
|
|
45
|
+
install("cargo", {
|
|
46
|
+
crateName: "bat",
|
|
47
|
+
binarySource: "github-releases",
|
|
48
|
+
githubRepo: "sharkdp/bat",
|
|
49
|
+
assetPattern: "bat-v{version}-{arch}-{platform}.tar.gz",
|
|
50
|
+
}).bin("bat"),
|
|
51
51
|
);
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -55,10 +55,10 @@ export default defineTool((install, ctx) =>
|
|
|
55
55
|
|
|
56
56
|
```typescript
|
|
57
57
|
export default defineTool((install, ctx) =>
|
|
58
|
-
install(
|
|
59
|
-
crateName:
|
|
60
|
-
customBinaries: [
|
|
61
|
-
}).bin(
|
|
58
|
+
install("cargo", {
|
|
59
|
+
crateName: "fd-find",
|
|
60
|
+
customBinaries: ["fd"],
|
|
61
|
+
}).bin("fd"),
|
|
62
62
|
);
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -66,13 +66,13 @@ export default defineTool((install, ctx) =>
|
|
|
66
66
|
|
|
67
67
|
```typescript
|
|
68
68
|
export default defineTool((install, ctx) =>
|
|
69
|
-
install(
|
|
70
|
-
crateName:
|
|
69
|
+
install("cargo", {
|
|
70
|
+
crateName: "tool",
|
|
71
71
|
})
|
|
72
|
-
.bin(
|
|
73
|
-
.hook(
|
|
72
|
+
.bin("tool")
|
|
73
|
+
.hook("after-install", async (ctx) => {
|
|
74
74
|
// Post-installation setup
|
|
75
|
-
})
|
|
75
|
+
}),
|
|
76
76
|
);
|
|
77
77
|
```
|
|
78
78
|
|
|
@@ -5,62 +5,64 @@ Download standalone binary files directly from URLs. Unlike `curl-tar`, this met
|
|
|
5
5
|
## Basic Usage
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
|
-
import { defineTool } from
|
|
8
|
+
import { defineTool } from "@alexgorbatchev/dotfiles";
|
|
9
9
|
|
|
10
10
|
export default defineTool((install) =>
|
|
11
|
-
install(
|
|
12
|
-
url:
|
|
13
|
-
}).bin(
|
|
11
|
+
install("curl-binary", {
|
|
12
|
+
url: "https://example.com/tool-v1.0.0-linux-amd64",
|
|
13
|
+
}).bin("tool"),
|
|
14
14
|
);
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Parameters
|
|
18
18
|
|
|
19
|
-
| Parameter | Description
|
|
20
|
-
| -------------- |
|
|
21
|
-
| `url` | **Required**. Direct URL to the binary file
|
|
22
|
-
| `versionArgs` | Arguments for version check (e.g., `['--version']`)
|
|
23
|
-
| `versionRegex` | Regex to extract version from output
|
|
24
|
-
| `env` | Environment variables (static or dynamic function)
|
|
19
|
+
| Parameter | Description |
|
|
20
|
+
| -------------- | ----------------------------------------------------------- |
|
|
21
|
+
| `url` | **Required**. Direct URL to the binary file |
|
|
22
|
+
| `versionArgs` | Arguments for version check (e.g., `['--version']`) |
|
|
23
|
+
| `versionRegex` | Regex to extract version from output (`string` or `RegExp`) |
|
|
24
|
+
| `env` | Environment variables (static or dynamic function) |
|
|
25
25
|
|
|
26
26
|
## Examples
|
|
27
27
|
|
|
28
28
|
### With Version Detection
|
|
29
29
|
|
|
30
30
|
```typescript
|
|
31
|
-
install(
|
|
32
|
-
url:
|
|
33
|
-
versionArgs: [
|
|
34
|
-
versionRegex:
|
|
35
|
-
}).bin(
|
|
31
|
+
install("curl-binary", {
|
|
32
|
+
url: "https://example.com/tool-v1.0.0-linux-amd64",
|
|
33
|
+
versionArgs: ["--version"],
|
|
34
|
+
versionRegex: /v(\d+\.\d+\.\d+)/,
|
|
35
|
+
}).bin("tool");
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
### With Shell Configuration
|
|
39
39
|
|
|
40
40
|
```typescript
|
|
41
|
-
install(
|
|
42
|
-
url:
|
|
41
|
+
install("curl-binary", {
|
|
42
|
+
url: "https://example.com/tool-v1.0.0-linux-amd64",
|
|
43
43
|
})
|
|
44
|
-
.bin(
|
|
45
|
-
.zsh((shell) => shell.aliases({ t:
|
|
44
|
+
.bin("tool")
|
|
45
|
+
.zsh((shell) => shell.aliases({ t: "tool" }));
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
### Platform-Specific URLs
|
|
49
49
|
|
|
50
50
|
```typescript
|
|
51
|
-
import { Architecture, defineTool, Platform } from
|
|
51
|
+
import { Architecture, defineTool, Platform } from "@alexgorbatchev/dotfiles";
|
|
52
52
|
|
|
53
53
|
export default defineTool((install) =>
|
|
54
54
|
install()
|
|
55
|
-
.bin(
|
|
55
|
+
.bin("tool")
|
|
56
56
|
.platform(Platform.MacOS, Architecture.Arm64, (install) =>
|
|
57
|
-
install(
|
|
58
|
-
url:
|
|
59
|
-
})
|
|
57
|
+
install("curl-binary", {
|
|
58
|
+
url: "https://example.com/tool-darwin-arm64",
|
|
59
|
+
}),
|
|
60
|
+
)
|
|
60
61
|
.platform(Platform.Linux, Architecture.X86_64, (install) =>
|
|
61
|
-
install(
|
|
62
|
-
url:
|
|
63
|
-
})
|
|
62
|
+
install("curl-binary", {
|
|
63
|
+
url: "https://example.com/tool-linux-amd64",
|
|
64
|
+
}),
|
|
65
|
+
),
|
|
64
66
|
);
|
|
65
67
|
```
|
|
66
68
|
|
|
@@ -5,13 +5,13 @@ Downloads and executes shell installation scripts.
|
|
|
5
5
|
## Basic Usage
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
|
-
import { defineTool } from
|
|
8
|
+
import { defineTool } from "@alexgorbatchev/dotfiles";
|
|
9
9
|
|
|
10
10
|
export default defineTool((install, ctx) =>
|
|
11
|
-
install(
|
|
12
|
-
url:
|
|
13
|
-
shell:
|
|
14
|
-
}).bin(
|
|
11
|
+
install("curl-script", {
|
|
12
|
+
url: "https://bun.sh/install",
|
|
13
|
+
shell: "bash",
|
|
14
|
+
}).bin("bun"),
|
|
15
15
|
);
|
|
16
16
|
```
|
|
17
17
|
|
|
@@ -24,7 +24,7 @@ export default defineTool((install, ctx) =>
|
|
|
24
24
|
| `args` | `string[] \| (ctx) => string[]` | No | Arguments to pass to the script |
|
|
25
25
|
| `env` | `Record<string, string> \| (ctx) => Record<...>` | No | Environment variables (static or dynamic) |
|
|
26
26
|
| `versionArgs` | `string[]` | No | Args to pass to binary for version check |
|
|
27
|
-
| `versionRegex` | `string`
|
|
27
|
+
| `versionRegex` | `string \| RegExp` | No | Regex to extract version from output |
|
|
28
28
|
|
|
29
29
|
> **Note:** The `env` and `args` parameters support both static values and dynamic functions. Dynamic functions receive a context with `projectConfig`, `scriptPath`, and `stagingDir`.
|
|
30
30
|
|
|
@@ -54,10 +54,10 @@ Then use `args` or `env` with the dynamic context to redirect:
|
|
|
54
54
|
|
|
55
55
|
```typescript
|
|
56
56
|
// Using args (if script accepts command-line arguments)
|
|
57
|
-
args: (
|
|
57
|
+
args: (ctx) => ["--install-dir", ctx.stagingDir];
|
|
58
58
|
|
|
59
59
|
// Using env (if script reads environment variables)
|
|
60
|
-
env: (
|
|
60
|
+
env: (ctx) => ({ FLYCTL_INSTALL: ctx.stagingDir });
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
## Examples
|
|
@@ -66,11 +66,11 @@ env: ((ctx) => ({ FLYCTL_INSTALL: ctx.stagingDir }));
|
|
|
66
66
|
|
|
67
67
|
```typescript
|
|
68
68
|
export default defineTool((install, ctx) =>
|
|
69
|
-
install(
|
|
70
|
-
url:
|
|
71
|
-
shell:
|
|
72
|
-
args: [
|
|
73
|
-
}).bin(
|
|
69
|
+
install("curl-script", {
|
|
70
|
+
url: "https://fnm.vercel.app/install",
|
|
71
|
+
shell: "bash",
|
|
72
|
+
args: ["--skip-shell", "--install-dir", "$LOCAL_BIN"],
|
|
73
|
+
}).bin("fnm"),
|
|
74
74
|
);
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -78,11 +78,11 @@ export default defineTool((install, ctx) =>
|
|
|
78
78
|
|
|
79
79
|
```typescript
|
|
80
80
|
export default defineTool((install, ctx) =>
|
|
81
|
-
install(
|
|
82
|
-
url:
|
|
83
|
-
shell:
|
|
84
|
-
args: (argsCtx) => [
|
|
85
|
-
}).bin(
|
|
81
|
+
install("curl-script", {
|
|
82
|
+
url: "https://fnm.vercel.app/install",
|
|
83
|
+
shell: "bash",
|
|
84
|
+
args: (argsCtx) => ["--install-dir", argsCtx.stagingDir],
|
|
85
|
+
}).bin("fnm"),
|
|
86
86
|
);
|
|
87
87
|
```
|
|
88
88
|
|
|
@@ -98,11 +98,11 @@ Use dynamic `env` to redirect installation to `stagingDir`:
|
|
|
98
98
|
|
|
99
99
|
```typescript
|
|
100
100
|
export default defineTool((install, ctx) =>
|
|
101
|
-
install(
|
|
102
|
-
url:
|
|
103
|
-
shell:
|
|
101
|
+
install("curl-script", {
|
|
102
|
+
url: "https://fly.io/install.sh",
|
|
103
|
+
shell: "sh",
|
|
104
104
|
env: (ctx) => ({ FLYCTL_INSTALL: ctx.stagingDir }),
|
|
105
|
-
}).bin(
|
|
105
|
+
}).bin("flyctl", "fly"),
|
|
106
106
|
);
|
|
107
107
|
```
|
|
108
108
|
|
|
@@ -118,14 +118,14 @@ The `env` context provides:
|
|
|
118
118
|
|
|
119
119
|
```typescript
|
|
120
120
|
export default defineTool((install, ctx) =>
|
|
121
|
-
install(
|
|
122
|
-
url:
|
|
123
|
-
shell:
|
|
121
|
+
install("curl-script", {
|
|
122
|
+
url: "https://example.com/install.sh",
|
|
123
|
+
shell: "bash",
|
|
124
124
|
})
|
|
125
|
-
.bin(
|
|
126
|
-
.hook(
|
|
125
|
+
.bin("tool")
|
|
126
|
+
.hook("after-download", async (ctx) => {
|
|
127
127
|
// Verify script before execution
|
|
128
|
-
})
|
|
128
|
+
}),
|
|
129
129
|
);
|
|
130
130
|
```
|
|
131
131
|
|
|
@@ -5,44 +5,52 @@ Download and extract tarballs directly from URLs.
|
|
|
5
5
|
## Basic Usage
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
|
-
import { defineTool } from
|
|
8
|
+
import { defineTool } from "@alexgorbatchev/dotfiles";
|
|
9
9
|
|
|
10
10
|
export default defineTool((install) =>
|
|
11
|
-
install(
|
|
12
|
-
url:
|
|
13
|
-
}).bin(
|
|
11
|
+
install("curl-tar", {
|
|
12
|
+
url: "https://example.com/tool.tar.gz",
|
|
13
|
+
}).bin("tool"),
|
|
14
14
|
);
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Parameters
|
|
18
18
|
|
|
19
|
-
| Parameter
|
|
20
|
-
|
|
|
21
|
-
| `url`
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `versionRegex` | Regex to extract version from output |
|
|
26
|
-
| `env` | Environment variables (static or dynamic function) |
|
|
19
|
+
| Parameter | Description |
|
|
20
|
+
| -------------- | ----------------------------------------------------------- |
|
|
21
|
+
| `url` | **Required**. Direct URL to the tarball |
|
|
22
|
+
| `versionArgs` | Arguments for version check (e.g., `['--version']`) |
|
|
23
|
+
| `versionRegex` | Regex to extract version from output (`string` or `RegExp`) |
|
|
24
|
+
| `env` | Environment variables (static or dynamic function) |
|
|
27
25
|
|
|
28
26
|
## Examples
|
|
29
27
|
|
|
30
28
|
### Binary in Subdirectory
|
|
31
29
|
|
|
32
30
|
```typescript
|
|
33
|
-
install(
|
|
34
|
-
url:
|
|
35
|
-
}).bin(
|
|
31
|
+
install("curl-tar", {
|
|
32
|
+
url: "https://releases.example.com/tool-v1.0.0.tar.gz",
|
|
33
|
+
}).bin("tool", "bin/tool"); // Binary at bin/tool in archive
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### With Version Detection
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
install("curl-tar", {
|
|
40
|
+
url: "https://releases.example.com/tool-v1.0.0.tar.gz",
|
|
41
|
+
versionArgs: ["--version"],
|
|
42
|
+
versionRegex: /tool (\d+\.\d+\.\d+)/,
|
|
43
|
+
}).bin("tool");
|
|
36
44
|
```
|
|
37
45
|
|
|
38
46
|
### With Shell Configuration
|
|
39
47
|
|
|
40
48
|
```typescript
|
|
41
|
-
install(
|
|
42
|
-
url:
|
|
49
|
+
install("curl-tar", {
|
|
50
|
+
url: "https://releases.example.com/tool-v1.0.0.tar.gz",
|
|
43
51
|
})
|
|
44
|
-
.bin(
|
|
45
|
-
.zsh((shell) => shell.aliases({ t:
|
|
52
|
+
.bin("tool")
|
|
53
|
+
.zsh((shell) => shell.aliases({ t: "tool" }));
|
|
46
54
|
```
|
|
47
55
|
|
|
48
56
|
## Supported Formats
|
|
@@ -13,15 +13,15 @@ Shims are not supported for DMG-installed applications. The `.bin()` method shou
|
|
|
13
13
|
## Basic Usage
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { defineTool } from
|
|
16
|
+
import { defineTool } from "@alexgorbatchev/dotfiles";
|
|
17
17
|
|
|
18
18
|
export default defineTool((install) =>
|
|
19
|
-
install(
|
|
19
|
+
install("dmg", {
|
|
20
20
|
source: {
|
|
21
|
-
type:
|
|
22
|
-
url:
|
|
21
|
+
type: "url",
|
|
22
|
+
url: "https://example.com/MyApp-1.0.0.dmg",
|
|
23
23
|
},
|
|
24
|
-
})
|
|
24
|
+
}),
|
|
25
25
|
);
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -33,7 +33,7 @@ export default defineTool((install) =>
|
|
|
33
33
|
| `appName` | Name of the `.app` bundle (e.g., `'MyApp.app'`). Auto-detected if omitted |
|
|
34
34
|
| `binaryPath` | Relative path to binary inside `.app`. Defaults to `Contents/MacOS/{bin name}` |
|
|
35
35
|
| `versionArgs` | Arguments for version check (e.g., `['--version']`) |
|
|
36
|
-
| `versionRegex` | Regex to extract version from output
|
|
36
|
+
| `versionRegex` | Regex to extract version from output (`string` or `RegExp`) |
|
|
37
37
|
| `env` | Environment variables (static or dynamic function) |
|
|
38
38
|
|
|
39
39
|
### Source Variants
|
|
@@ -48,22 +48,22 @@ export default defineTool((install) =>
|
|
|
48
48
|
### Explicit App Name
|
|
49
49
|
|
|
50
50
|
```typescript
|
|
51
|
-
install(
|
|
51
|
+
install("dmg", {
|
|
52
52
|
source: {
|
|
53
|
-
type:
|
|
54
|
-
url:
|
|
53
|
+
type: "url",
|
|
54
|
+
url: "https://example.com/MyApp-1.0.0.dmg",
|
|
55
55
|
},
|
|
56
|
-
appName:
|
|
57
|
-
}).version(
|
|
56
|
+
appName: "MyApp.app",
|
|
57
|
+
}).version("1.0.0");
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
### From Archive Containing DMG
|
|
61
61
|
|
|
62
62
|
```typescript
|
|
63
|
-
install(
|
|
63
|
+
install("dmg", {
|
|
64
64
|
source: {
|
|
65
|
-
type:
|
|
66
|
-
url:
|
|
65
|
+
type: "url",
|
|
66
|
+
url: "https://github.com/example/app/releases/download/v1.0.0/MyApp.dmg.zip",
|
|
67
67
|
},
|
|
68
68
|
});
|
|
69
69
|
```
|
|
@@ -71,26 +71,26 @@ install('dmg', {
|
|
|
71
71
|
### GitHub Release Source
|
|
72
72
|
|
|
73
73
|
```typescript
|
|
74
|
-
install(
|
|
74
|
+
install("dmg", {
|
|
75
75
|
source: {
|
|
76
|
-
type:
|
|
77
|
-
repo:
|
|
78
|
-
assetPattern:
|
|
76
|
+
type: "github-release",
|
|
77
|
+
repo: "manaflow-ai/cmux",
|
|
78
|
+
assetPattern: "*macos*.dmg",
|
|
79
79
|
},
|
|
80
|
-
appName:
|
|
80
|
+
appName: "cmux.app",
|
|
81
81
|
});
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
### With Version Detection
|
|
85
85
|
|
|
86
86
|
```typescript
|
|
87
|
-
install(
|
|
87
|
+
install("dmg", {
|
|
88
88
|
source: {
|
|
89
|
-
type:
|
|
90
|
-
url:
|
|
89
|
+
type: "url",
|
|
90
|
+
url: "https://example.com/MyApp-1.0.0.dmg",
|
|
91
91
|
},
|
|
92
|
-
versionArgs: [
|
|
93
|
-
versionRegex:
|
|
92
|
+
versionArgs: ["--version"],
|
|
93
|
+
versionRegex: /v(\d+\.\d+\.\d+)/,
|
|
94
94
|
});
|
|
95
95
|
```
|
|
96
96
|
|
|
@@ -5,13 +5,13 @@ Download and install tools from Gitea or Forgejo instance releases with automati
|
|
|
5
5
|
## Basic Usage
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
|
-
import { defineTool } from
|
|
8
|
+
import { defineTool } from "@alexgorbatchev/dotfiles";
|
|
9
9
|
|
|
10
10
|
export default defineTool((install) =>
|
|
11
|
-
install(
|
|
12
|
-
instanceUrl:
|
|
13
|
-
repo:
|
|
14
|
-
}).bin(
|
|
11
|
+
install("gitea-release", {
|
|
12
|
+
instanceUrl: "https://codeberg.org",
|
|
13
|
+
repo: "Codeberg/pages-server",
|
|
14
|
+
}).bin("pages-server"),
|
|
15
15
|
);
|
|
16
16
|
```
|
|
17
17
|
|
|
@@ -33,34 +33,34 @@ export default defineTool((install) =>
|
|
|
33
33
|
### With Asset Pattern
|
|
34
34
|
|
|
35
35
|
```typescript
|
|
36
|
-
install(
|
|
37
|
-
instanceUrl:
|
|
38
|
-
repo:
|
|
39
|
-
assetPattern:
|
|
40
|
-
}).bin(
|
|
36
|
+
install("gitea-release", {
|
|
37
|
+
instanceUrl: "https://codeberg.org",
|
|
38
|
+
repo: "owner/tool",
|
|
39
|
+
assetPattern: "*linux_amd64.tar.gz",
|
|
40
|
+
}).bin("tool");
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### Custom Asset Selector
|
|
44
44
|
|
|
45
45
|
```typescript
|
|
46
|
-
install(
|
|
47
|
-
instanceUrl:
|
|
48
|
-
repo:
|
|
46
|
+
install("gitea-release", {
|
|
47
|
+
instanceUrl: "https://codeberg.org",
|
|
48
|
+
repo: "owner/tool",
|
|
49
49
|
assetSelector: ({ assets, systemInfo }) => {
|
|
50
|
-
const platform = systemInfo.platform ===
|
|
50
|
+
const platform = systemInfo.platform === "darwin" ? "macos" : systemInfo.platform;
|
|
51
51
|
return assets.find((a) => a.name.includes(platform));
|
|
52
52
|
},
|
|
53
|
-
}).bin(
|
|
53
|
+
}).bin("tool");
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
### Specific Version
|
|
57
57
|
|
|
58
58
|
```typescript
|
|
59
|
-
install(
|
|
60
|
-
instanceUrl:
|
|
61
|
-
repo:
|
|
62
|
-
version:
|
|
63
|
-
}).bin(
|
|
59
|
+
install("gitea-release", {
|
|
60
|
+
instanceUrl: "https://codeberg.org",
|
|
61
|
+
repo: "owner/tool",
|
|
62
|
+
version: "v2.1.0",
|
|
63
|
+
}).bin("tool");
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
### With Authentication Token
|
|
@@ -68,11 +68,11 @@ install('gitea-release', {
|
|
|
68
68
|
For private repositories or to avoid rate limits:
|
|
69
69
|
|
|
70
70
|
```typescript
|
|
71
|
-
install(
|
|
72
|
-
instanceUrl:
|
|
73
|
-
repo:
|
|
71
|
+
install("gitea-release", {
|
|
72
|
+
instanceUrl: "https://gitea.example.com",
|
|
73
|
+
repo: "org/private-tool",
|
|
74
74
|
token: process.env.GITEA_TOKEN,
|
|
75
|
-
}).bin(
|
|
75
|
+
}).bin("tool");
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
## Asset Pattern Matching
|