Skip to content

curl-tar

Download and extract tarballs directly from URLs.

import { defineTool } from "@alexgorbatchev/dotfiles";
export default defineTool((install) =>
install("curl-tar", {
url: "https://example.com/tool.tar.gz",
}).bin("tool"),
);
ParameterDescription
urlRequired. Direct URL to the tarball
versionArgsArguments for version check (e.g., ['--version'])
versionRegexRegex to extract version from output (string or RegExp)
envEnvironment variables (static or dynamic function)
install("curl-tar", {
url: "https://releases.example.com/tool-v1.0.0.tar.gz",
}).bin("tool", "bin/tool"); // Binary at bin/tool in archive
install("curl-tar", {
url: "https://releases.example.com/tool-v1.0.0.tar.gz",
versionArgs: ["--version"],
versionRegex: /tool (\d+\.\d+\.\d+)/,
}).bin("tool");
install("curl-tar", {
url: "https://releases.example.com/tool-v1.0.0.tar.gz",
})
.bin("tool")
.zsh((shell) => shell.aliases({ t: "tool" }));

.tar.gz, .tgz, .tar.bz2, .tbz2, .tar.xz, .txz, .tar

  • Direct tarball downloads from known URLs
  • Tools without GitHub releases
  • Simple archive structures

Prefer github-release when GitHub releases are available.