Skip to main content

installcmd

Cross platform package install commands.

I use a lot of cross platform software. One annoying thing about it is that every platform has its own package manager with a unique install command. What's even worse is that sometimes the packages themselves are listed under slightly different names in different repositories. Installcmd solves this by detecting your platform and providing the correct command.

Installation

Install with: pip install installcmd

Usage

  • installcmd prints the install command, eg.: apt-get install
  • installcmd refresh prints the package cache update command, eg.: apt-get update
  • installcmd noninteractive prints the non-interactive install command, eg.: apt-get install --assume-yes
  • installcmd pkgspec foo.yml prints the correct name of the package for that platform, based on information in the foo.yml.

Installcmd just prints the command, but it's easy to make your shell execute it:

# Without spec
$ $(installcmd) package-name

# With spec
$ $(installcmd pkgspec docker.yaml)

It's not magic. It searches through a built-in list of commands for various platforms (see contribution guide). The package name specs have to be provided by you (see package specs).

The main use of this is writing portable installation scripts, such as in your dotfiles repo or Dockerfiles. You can let installcmd handle the platform detection logic instead of having to reimplement it again and again, which makes the scripts a lot cleaner.

Release files for installcmd 0.4.7

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

Source distribution (sdist)

Source distribution for installcmd 0.4.7
File Size Uploaded
installcmd-0.4.7.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for installcmd 0.4.7
File Interpreter ABI Platform
installcmd-0.4.7-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / installcmd-0.4.7.tar.gz

Download URL installcmd-0.4.7.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ac3466ae111031cf8f83c495f0b30a043c1b9064e7534f5494b27555945d428d
BLAKE2b-256 checksum
How to use checksums
8c423934b6c8f3914ef2989296f7433e1631ccd60f6f24d4f8b9d32991da2b70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.60.0 importlib-metadata/4.0.1 keyring/23.0.1 rfc3986/1.4.0 colorama/0.4.4 CPython/3.10.5

Release files / installcmd-0.4.7-py3-none-any.whl

Download URL installcmd-0.4.7-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cbe345b86fb6078ad28dc8437778b41c86e817bc0608c416df7b8726a18a4fb
BLAKE2b-256 checksum
How to use checksums
b3f4a6c07df770e02ec0a1ef2b2d037b63f75439e59879d981087a3fa49318ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.60.0 importlib-metadata/4.0.1 keyring/23.0.1 rfc3986/1.4.0 colorama/0.4.4 CPython/3.10.5

Release history Release notifications | RSS feed

This release

0.4.7 This release

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.2.3

2 release files

0.2.1

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