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
  • clear the cache beforehand

* 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 tool run git+https://github.com/maxwell-k/dotlocalslashbin --version

Example

For example to download tofu to the current working directory, first save the following as tofu.toml then run the command below.

[tofu]
url = "https://github.com/opentofu/opentofu/releases/download/v1.10.3/tofu_1.10.3_linux_amd64.zip"
expected = "acf330602ec6ae29ba68dd5d8eb1f645811ae9809231ecdccd4774b21d5c79bc"
version = "version"
ignore = ["LICENSE", "README.md", "CHANGELOG.md"]

Command:

uv tool run dotlocalslashbin --output=. tofu.toml

Further examples are available in files like linux-amd64.toml and github.toml in the bin directory of 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.27.tar.gz (41.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotlocalslashbin-0.0.27-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dotlocalslashbin-0.0.27.tar.gz
  • Upload date:
  • Size: 41.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dotlocalslashbin-0.0.27.tar.gz
Algorithm Hash digest
SHA256 a280d290cb60d9378b4a1bab7ebdd28a6679723c78260a7b80fe7a50afcc485d
MD5 69985b7bbdff517102d874d6f4277d2e
BLAKE2b-256 48e9ec7c7543a38132095d3f71a989345aff65d611b32c71545b2bbacd2d9eb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for dotlocalslashbin-0.0.27.tar.gz:

Publisher: main.yaml on maxwell-k/dotlocalslashbin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dotlocalslashbin-0.0.27-py3-none-any.whl.

File metadata

File hashes

Hashes for dotlocalslashbin-0.0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 ec3fdfcd9e5980031273175c9fbb375a9cf516d0ed7274845a10c149d1e21903
MD5 acbf6d00047ec702e26308efeb5fa358
BLAKE2b-256 68e1108233fed4e824611fd96fde5b3bfb64885ed57f54fea0719dd6ddb55e91

See more details on using hashes here.

Provenance

The following attestation bundles were made for dotlocalslashbin-0.0.27-py3-none-any.whl:

Publisher: main.yaml on maxwell-k/dotlocalslashbin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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