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.26.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.26-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dotlocalslashbin-0.0.26.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.26.tar.gz
Algorithm Hash digest
SHA256 58b0ab9ee5f5c8d04fd113d1d8a8398714f714ae893cd2dab3a91ac2ec84b92c
MD5 566d9e20fb4bf2ddcab463d5125af545
BLAKE2b-256 2a309ab58e4eaac33e70eb68e10b11d85818c7770d6163754080b4e3a30867c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dotlocalslashbin-0.0.26.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.26-py3-none-any.whl.

File metadata

File hashes

Hashes for dotlocalslashbin-0.0.26-py3-none-any.whl
Algorithm Hash digest
SHA256 8362e638d0746eba2032c8dd781397da65593d55c8df54a6e6891f71280d6654
MD5 fec0d1ea36106499e518a12bfb45b001
BLAKE2b-256 dcfe3255bf6972654aaaf0904d50e6ff53713b76b800b84c770c8d0713868dde

See more details on using hashes here.

Provenance

The following attestation bundles were made for dotlocalslashbin-0.0.26-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