curl-tar
Download and extract tarballs directly from URLs.
Basic Usage
Section titled “Basic Usage”import { defineTool } from "@alexgorbatchev/dotfiles";
export default defineTool((install) => install("curl-tar", { url: "https://example.com/tool.tar.gz", }).bin("tool"),);Parameters
Section titled “Parameters”| Parameter | Description |
|---|---|
url | Required. Direct URL to the tarball |
versionArgs | Arguments for version check (e.g., ['--version']) |
versionRegex | Regex to extract version from output (string or RegExp) |
env | Environment variables (static or dynamic function) |
Examples
Section titled “Examples”Binary in Subdirectory
Section titled “Binary in Subdirectory”install("curl-tar", { url: "https://releases.example.com/tool-v1.0.0.tar.gz",}).bin("tool", "bin/tool"); // Binary at bin/tool in archiveWith Version Detection
Section titled “With Version Detection”install("curl-tar", { url: "https://releases.example.com/tool-v1.0.0.tar.gz", versionArgs: ["--version"], versionRegex: /tool (\d+\.\d+\.\d+)/,}).bin("tool");With Shell Configuration
Section titled “With Shell Configuration”install("curl-tar", { url: "https://releases.example.com/tool-v1.0.0.tar.gz",}) .bin("tool") .zsh((shell) => shell.aliases({ t: "tool" }));Supported Formats
Section titled “Supported Formats”.tar.gz, .tgz, .tar.bz2, .tbz2, .tar.xz, .txz, .tar
When to Use
Section titled “When to Use”- Direct tarball downloads from known URLs
- Tools without GitHub releases
- Simple archive structures
Prefer github-release when GitHub releases are available.