Skip to main content

zipget-rs

Build and Publish

A tool for downloading and extracting files from URLs, GitHub releases, and S3 buckets, with caching and a TOML recipe format.

Features

  • Caching: Files are cached by URL hash to avoid re-downloading
  • Multi-Format Archive Support: Extract both ZIP and tar.gz (.tgz) archives automatically
  • GitHub Releases Integration: Download latest or specific tagged releases from GitHub repositories
  • S3 Support: Download files from AWS S3 buckets using s3:// URLs
  • Semantic TOML Recipes: Process multiple downloads from TOML recipes with meaningful section names
  • Version Management: Automatically upgrade GitHub releases to latest versions
  • Flexible Output: Extract to directories and/or save files with custom names
  • Direct Execution: Download and run executables directly with the run command
  • Cross-Platform Installation: Install executables directly to ~/.local/bin on any platform with --no-shim, or use Windows shims
  • Java JAR Support: Download and create launchers for Java JAR applications
  • Cross-Platform: Works on Windows, macOS, and Linux

Installation

Linux / macOS

sudo curl -fsSL https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-linux-x64-musl -o /usr/local/bin/zipget && sudo chmod +x /usr/local/bin/zipget

For Linux ARM64:

sudo curl -fsSL https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-linux-arm64-musl -o /usr/local/bin/zipget && sudo chmod +x /usr/local/bin/zipget

For macOS ARM (Apple Silicon):

curl -fsSL https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-macos-arm64 -o ~/.local/bin/zipget && chmod +x ~/.local/bin/zipget

Windows (PowerShell)

iwr https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-windows-x64.exe -OutFile ~/.local/bin/zipget.exe

Self-Update

Once installed, zipget can update itself:

zipget update

GitHub Actions

- name: Install zipget
  run: |
    curl -fsSL https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-linux-x64-musl -o /usr/local/bin/zipget
    chmod +x /usr/local/bin/zipget

- name: Download tools
  run: zipget recipe tools.toml

For Windows runners:

- name: Install zipget
  run: |
    Invoke-WebRequest -Uri "https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-windows-x64.exe" -OutFile "$env:USERPROFILE\.local\bin\zipget.exe"
    echo "$env:USERPROFILE\.local\bin" | Out-File -FilePath $env:GITHUB_PATH -Append

For macOS runners (ARM):

- name: Install zipget
  run: |
    curl -fsSL https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-macos-arm64 -o /usr/local/bin/zipget
    chmod +x /usr/local/bin/zipget

From Source

git clone https://github.com/vivainio/zipget-rs
cd zipget-rs
cargo build --release

The binary will be available at target/release/zipget.

Quick Start

# Download from TOML recipe
zipget recipe demo_recipe.toml

# Download from GitHub releases (auto-detects best binary for your platform)
zipget github sharkdp/bat --unzip-to ./tools

# Download and run executables directly
zipget run BurntSushi/ripgrep -- --version

# Install tools with shims (Windows only)
zipget install google/go-jsonnet

# Install tools directly (cross-platform)
zipget install google/go-jsonnet --no-shim

# Create launcher for a Java JAR
zipget shim ./myapp.jar

Commands

Install Command

Install executables from packages to your local system:

# Install with shims (Windows only) - creates shims in ~/.local/bin
zipget install sharkdp/bat

# Install directly to ~/.local/bin (cross-platform)
zipget install sharkdp/bat --no-shim

# Install specific executable from multi-binary package
zipget install google/go-jsonnet --exe jsonnet --no-shim

# Install from specific release tag
zipget install sharkdp/bat --tag v0.24.0 --no-shim

# Install from direct URL
zipget install https://example.com/tool.zip --no-shim

Shims vs Direct Installation:

  • Shims (Windows only): Creates wrapper executables that can handle different versions and provide additional functionality
  • Direct Installation (--no-shim): Copies executables directly to ~/.local/bin, works on all platforms

Shim Command

Create launchers/shims for executables or Java JAR files:

# Create a launcher for a JAR file
zipget shim ./plantuml.jar

# Create with a custom name
zipget shim ./plantuml.jar --name plantuml

# Create with Java options (for JARs)
zipget shim ./myapp.jar --java-opts="-Xmx1g -Xms256m"

# Create a shim for a native executable
zipget shim ./mytool

How it works:

  • For JAR files: Creates a shell script (Unix) or batch file (Windows) that runs java -jar
  • For executables: Creates a shell script wrapper (Unix) or Scoop-style shim (Windows)
  • Launchers are created in ~/.local/bin

Generated JAR launcher (Unix):

#!/bin/sh
exec java -Xmx1g -jar "/path/to/myapp.jar" "$@"

Generated JAR launcher (Windows):

@java -Xmx1g -jar "C:\path\to\myapp.jar" %*

Recipe Command

Process a TOML recipe file to download and extract multiple packages:

# Process a TOML recipe file
zipget recipe my_recipe.toml

# Upgrade all GitHub releases in recipe to latest versions
zipget recipe my_recipe.toml --upgrade

# Process only specific items by their section names (tags)
zipget recipe my_recipe.toml ripgrep

# Exclude specific items
zipget recipe my_recipe.toml --exclude aws-cli

# Override a variable (see Recipe Variables below)
zipget recipe my_recipe.toml --set goarch=arm64

# Show how variables expand, without downloading anything
zipget recipe my_recipe.toml --dry

# Pin each entry to its resolved release tag and SHA-256, rewriting the recipe
zipget recipe my_recipe.toml --lock

Recipe Variables

Recipes can declare variables in a [vars] section and reference them as ${name} anywhere in a string field, including url, github.asset, save_as and unzip_to:

[vars]
bin_dir = "~/.local/bin"
go_version = "1.25.0"

[go]
url = "https://go.dev/dl/go${go_version}.${os}-${goarch}.tar.gz"
unzip_to = "${bin_dir}"

These variables are always available, so a recipe can adapt to the host without declaring anything:

Variable Value
${os} Operating system: linux, macos, windows
${arch} CPU architecture: x86_64, aarch64
${home} The current user's home directory
${recipe_dir} Directory containing the recipe file

Values resolve by priority, highest first:

  1. --set key=value on the command line (repeatable)
  2. The recipe's [vars] section
  3. The built-in variables above

So a recipe can pin ${arch} in [vars] to force one architecture, and a caller can override any variable at the command line without editing the file.

Two further forms are supported:

  • ${env.VAR} reads an environment variable, and fails if it is not set
  • $${literal} escapes the substitution, producing a literal ${literal}

A leading ~/ expands to the home directory. Referencing an undefined variable is an error, so a typo fails the run rather than silently expanding to an empty string. Use --dry to print the fully expanded recipe before downloading:

$ zipget recipe linux-tools.toml --dry --set goarch=arm64
Active variables:
  arch = aarch64
  goarch = arm64

Note that --lock records the URL after substitution, so a lock file written on one machine pins that machine's architecture. Lock a recipe that uses ${arch} once per architecture, or keep the locked and templated recipes separate.

GitHub Command

Download the latest release binary from a GitHub repository:

# Download latest release (auto-detects best binary for your platform)
zipget github sharkdp/bat

# Download specific tagged release
zipget github sharkdp/bat --tag v0.24.0

# Save to specific file path
zipget github BurntSushi/ripgrep --save-as ./tools/ripgrep.zip

# Manually specify asset if needed (rarely required)
zipget github sharkdp/bat --asset windows-x86_64

Run Command

Download and run an executable from a package:

# Run a single executable from a GitHub release
zipget run BurntSushi/ripgrep -- --version

# Run a specific executable if multiple are found
zipget run sharkdp/bat --exe bat -- --help

# Run from a direct URL
zipget run https://example.com/tool.zip --exe mytool -- arg1 arg2

The run command:

  • Downloads and caches the package (honoring existing cache)
  • Extracts the package to a temporary directory
  • Automatically finds executable files in the extracted content
  • If only one executable is found, runs it directly
  • If multiple executables are found, prompts you to specify which one using --exe
  • Passes all arguments after -- to the executable
  • Cleans up temporary files after execution

Recipe Format

Zipget uses TOML recipe files with semantic section names. Each section name becomes an implicit tag for that download item:

[bat]
github = { repo = "sharkdp/bat", tag = "v0.24.0" }
unzip_to = "./tools"
save_as = "./downloads/bat.zip"
files = "*.exe"

[ripgrep]
github = { repo = "BurntSushi/ripgrep" }
save_as = "./tools/ripgrep.zip"

[public-tool]
url = "https://example.com/some-file.zip"
unzip_to = "./downloads"

Recipe Schema

Each section represents a download item and can have:

  • url: Direct URL to download from (supports HTTP/HTTPS, S3 URLs, and local file paths starting with / or .)
  • github: GitHub release specification (inline table format)
    • repo: Repository in "owner/repo" format
    • asset: Regex pattern to match release asset names (case-insensitive; optional, auto-detected if not specified)
    • tag: Specific release tag (optional, defaults to latest)
  • unzip_to: Directory where archives should be extracted (supports ZIP and tar.gz files)
  • save_as: Path where the downloaded file should be saved
  • files: Glob pattern for files to extract from archives (extracts all if not specified)
  • profile: AWS profile to use for S3 downloads
  • executable: Set to true to add executable permission to extracted files (Unix only)
  • install_exes: List of executables or JAR files to install to ~/.local/bin (supports glob patterns)
  • no_shim: Set to true to copy executables directly instead of creating shims/launchers

Java JAR Support

Zipget can download Java JAR applications and create launcher scripts for them.

Installing JARs from Recipes

[plantuml]
github = { repo = "plantuml/plantuml", asset = "plantuml.jar" }
save_as = "./tools/plantuml.jar"
install_exes = ["plantuml.jar"]

This will:

  1. Download plantuml.jar from the GitHub release
  2. Save it to ./tools/plantuml.jar
  3. Create a launcher at ~/.local/bin/plantuml

Installing JARs with the Shim Command

curl -LO https://github.com/plantuml/plantuml/releases/latest/download/plantuml.jar
zipget shim ./plantuml.jar
# Now you can run: plantuml -version

JARs with Custom Java Options

zipget shim ./memory-intensive-app.jar --java-opts="-Xmx4g -XX:+UseG1GC"

GitHub Integration

Latest Releases

[bat]
github = { repo = "sharkdp/bat" }

Specific Versions

[bat]
github = { repo = "sharkdp/bat", tag = "v0.24.0" }

Manual Asset Selection (Optional)

The asset field is a regex pattern (case-insensitive) matched against release asset names:

[bat]
# Simple substring match (still works — valid regex)
github = { repo = "sharkdp/bat", asset = "windows-x86_64", tag = "v0.24.0" }

[obsidian]
# Regex to select amd64 tarball, excluding arm64 variant
github = { repo = "obsidianmd/obsidian-releases", asset = "^obsidian-[\\d.]+\\.tar\\.gz$" }

Version Upgrading

zipget recipe my_recipe.toml --upgrade

This will:

  • Check the latest release for each GitHub repository
  • Update tags to the latest version
  • Save the updated recipe file
  • Show which versions were upgraded

How It Works

  1. Caching: Each URL is hashed using MD5, and the downloaded file is stored as {hash}_{filename} in a system temporary cache directory (%TEMP%\zipget-cache on Windows, /tmp/zipget-cache on Unix)
  2. Cache Check: Before downloading, zipget checks if the file already exists in the cache directory
  3. GitHub API: For GitHub releases, the tool queries the GitHub API to get download URLs
  4. S3 Downloads: For S3 URLs, the tool uses AWS CLI (aws s3 cp) to download files using your configured credentials
  5. Download: If not cached, the file is downloaded and stored in the cache directory
  6. Extract: If unzip_to is specified, the archive is extracted to the target directory (auto-detects ZIP and tar.gz formats)
  7. Save: If save_as is specified, the downloaded file is copied to the specified path
  8. Run: The run command additionally extracts to a temporary directory, finds executables, and executes them with provided arguments

Selective File Extraction

Use the files field to extract only specific files from archives using glob patterns.

When files is specified, the directory structure is flattened — files are extracted directly to unzip_to without preserving subdirectories:

[ripgrep]
# Archive contains: ripgrep-15.1.0-x86_64-unknown-linux-musl/rg
# Result: ./tools/rg (flattened, not ./tools/ripgrep-15.1.0-.../rg)
github = { repo = "BurntSushi/ripgrep", asset = "x86_64-unknown-linux-musl" }
unzip_to = "./tools"
files = "*/rg"

[bat-windows]
github = { repo = "sharkdp/bat", asset = "windows" }
unzip_to = "./tools"
files = "{bat.exe,LICENSE*}"

Common glob patterns:

  • *.exe - Extract only .exe files
  • *.{exe,dll} - Extract .exe and .dll files
  • */rg - Extract rg binary from any subdirectory (flattened)
  • {LICENSE,README*} - Extract LICENSE and README files

Setting Executable Permissions (Unix)

Use the executable field to automatically set executable permissions on extracted files:

[my-scripts]
url = "/path/to/scripts.tar.gz"
unzip_to = "./bin"
files = "*.sh"
executable = true

Local file paths (starting with / or .) are also supported in the url field.

License

MIT License

Release files for zipget 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for zipget 2.2.0
File
zipget-2.2.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
zipget-2.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
zipget-2.2.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
zipget-2.2.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 8.5 MB

Release files / zipget-2.2.0-py3-none-win_amd64.whl

Download URL zipget-2.2.0-py3-none-win_amd64.whl
Size 2.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
866063928f79a63970f169fc52bc46af8c0772ec3a538b8af4fd73891d81ddd8
BLAKE2b-256 checksum
How to use checksums
7e2b0b14538ec524a80ddf01b75294b36ff225e9cd17d9d5fe3ae05a91153fbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / zipget-2.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL zipget-2.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
37595c9f6e9e55db14e22d25ad6320c2aeaa7d353aabea857903dbfc573cd13c
BLAKE2b-256 checksum
How to use checksums
bf55f7fee554e79511727e07b2623cd7401a747cc7283175529f15d508b0f30e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / zipget-2.2.0-py3-none-macosx_11_0_arm64.whl

Download URL zipget-2.2.0-py3-none-macosx_11_0_arm64.whl
Size 2.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f37439f7385c33813031fdb6e75b70d9006877310a069d9657db94eee80a7acd
BLAKE2b-256 checksum
How to use checksums
29c117cc6470bfab233f038f0e125f4c929e75f5c7e70e77d0cc0859c1191104
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / zipget-2.2.0-py3-none-macosx_10_12_x86_64.whl

Download URL zipget-2.2.0-py3-none-macosx_10_12_x86_64.whl
Size 2.2 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0be83d3457c90604107dbc629142fe5700459c372752d27d0e08a907f96031c2
BLAKE2b-256 checksum
How to use checksums
900ab093a043c4c5ee5afc434ec80247ae7266e2a60b73c5a94f285c32d870d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

2.2.1

5 release files

This release

2.2.0 This release

4 release files

2.1.0

4 release files

2.0.2

4 release files

2.0.1

4 release files

2.0.0

4 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page