Skip to main content

Download and extract files to `~/.local/bin/`.

Project description

dotlocalslashbin → Download to ~/.local/bin/

Features

Uses a TOML configuration file, by default bin.toml and has no dependencies beyond the Python standard library. Supports the following actions after downloading the URL* to a cache:

  • extract to the output directory — from zip or tar files — or
  • create a symbolic link in the output directory or
  • run a command for example to correct the shebang line in a zipapp or
  • copy the downloaded file

Guesses the correct action if none is specified. By default caches downloads to ~/.cache/dotlocalslashbin/.

Optionally can:

  • run a command after download for example to correct a shebang line
  • confirm a SHA256 or SHA512 hex-digest of the downloaded file
  • invoke the target with an argument, for example --version
  • strip a prefix while extracting
  • ignore certain files while extracting

* if the URL is an absolute path on the local file system; it is not downloaded to the cache.

Installation

The recommended way to run dotlocalslashbin is with uv.

Command to install the latest released dotlocalslashbin from PyPI:

uv tool install dotlocalslashbin

Command to run latest development version of dotlocalslashbin directly from GitHub:

uv run https://raw.githubusercontent.com/maxwell-k/dotlocalslashbin/refs/heads/main/src/dotlocalslashbin.py --version

Examples

For example to download yq to the current working directory, first save the following as yq.toml, then install with uv (above) and then run the command below:

[yq]
expected = "cfbbb9ba72c9402ef4ab9d8f843439693dfb380927921740e51706d90869c7e1"
url = "https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_amd64"
version = "--version"

Command:

dotlocalslashbin --input=yq.toml --output=.

Further examples are available in bin.toml in maxwell-k/dotfiles.

See also

https://github.com/buildinspace/peru

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dotlocalslashbin-0.0.12.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

dotlocalslashbin-0.0.12-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dotlocalslashbin-0.0.12.tar.gz.

File metadata

  • Download URL: dotlocalslashbin-0.0.12.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dotlocalslashbin-0.0.12.tar.gz
Algorithm Hash digest
SHA256 765765f143e00a7352ee0f5ef61e7f0817950acb7c907a2f2f6531fc2613c8b3
MD5 1b619d86d84d2d801360d18c4545b1ca
BLAKE2b-256 da69f33cbbf695772fd45e112b8a19b636e4aaad8a997f2d73537c1fbf905f56

See more details on using hashes here.

File details

Details for the file dotlocalslashbin-0.0.12-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dotlocalslashbin-0.0.12-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b420076d4f1dc693e92c6c1a524fb9c3a83b768eba8f25ae16585a7d655a9e10
MD5 fdd100de5c5fb647a62ba14c3ce49cbf
BLAKE2b-256 95c366bd6e4938c8834bb5601358c3d7bca2576f5c149ab2970dd1ebd1316487

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page