Helper to install (web) locked environments
Project description
install-locked-env
A minimalist CLI tool easing the local installation of "locked environments" described in lock files available in repositories on the web.
Installation
The simplest way to install and run install-locked-env is by using the UV command
uvx:
uvx install-locked-env <url>
Of course, install-locked-env can also be installed with uv tool, pipx or even
pip.
Usage
Basic Usage
Install a locked environment from a web source:
install-locked-env https://github.com/fluiddyn/fluidsim/tree/branch/default/pixi-envs/env-fluidsim
Different lock file formats (pylock.toml, uv.lock, pdm.lock, pixi.lock, ...) produced by different tools (UV, PDM, Pixi, ...) are supported.
⚠️ Caution
Use only with trusted repositories and lock files!
install-locked-envpotentially executes code in the installed environment.
Options
install-locked-env [OPTIONS] URL
╭─ Options ────────────────────────────────────────────────────────────────────────────╮
│ --output -o PATH Output directory (default: auto-generated) │
│ --no-install Download files only, don't install │
│ --no-register-kernel Don't register Jupyter kernel if ipykernel is │
│ present │
│ --version │
│ --minimal Only download the files necessary to create the │
│ environment │
│ --clone Clone the repo (only for repository url) │
│ --download-method -d TEXT Download method (default: auto): can be │
│ 'archive', 'file-per-file' or 'clone' │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy │
│ it or customize the installation. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────╯
Examples
Install from a repository URL:
Lockfile located in the root directory of a repository:
install-locked-env https://foss.heptapod.net/py-edu-fr/py-edu-fr
GitHub, GitLab and Heptapod are supported.
Install from a reference/directory URL:
install-locked-env https://github.com/fluiddyn/fluidsim/tree/branch/default/pixi-envs/env-fluidsim
or, with a precise commit reference:
install-locked-env https://github.com/fluiddyn/fluidsim/tree/5266c974e3368d17819f59b0e700b723591e0d1a/pixi-envs/env-fluidsim-mpi
For GitLab and Heptapod, the URLs have this format:
install-locked-env https://gitlab.com/user/project/-/tree/branch-name/envs/dev
For example:
install-locked-env https://foss.heptapod.net/fluiddyn/fluidsim/-/tree/branch/default/pixi-envs/env-fluidsim
It should be possible (not yet implemented) to give a lock file address (something like https://github.com/fluiddyn/fluidsim/tree/branch/default/pylock.toml).
Download only (no installation):
install-locked-env --no-install --output ./my-env https://github.com/user/repo
Skip Jupyter kernel registration:
install-locked-env --no-register-kernel https://github.com/user/repo
Supported Environment Types
Current (v0.2.0)
- ✅ Pixi (pixi.toml, pixi.lock)
- ✅ uv (pyproject.toml, uv.lock/pylock.toml)
- ✅ PDM (pyproject.toml, pdm.lock/pylock.toml)
Planned
- ⏳ Poetry (pyproject.toml, poetry.lock)
How it works
- URL parsing: Extracts repository information (platform, owner, repo, ref, path)
- File detection: Attempts to download supported lock files
- Environment type detection: Determines the type based on downloaded files
- Installation: Creates output directory and runs the appropriate installer
- Jupyter registration: If ipykernel is present, registers the environment as a Jupyter kernel
Requirements
- Python 3.11+
- Pixi (for Pixi environments)
- UV (for uv.lock and pylock.toml)
- PDM (for pdm.lock)
Contributing
Contributions are welcome! See our contributing guide.
License
BSD-3-Clause
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file install_locked_env-0.3.0.tar.gz.
File metadata
- Download URL: install_locked_env-0.3.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.26.2 CPython/3.14.2 Linux/6.12.43+deb13-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
460a1fa4ac7c576cfda8b711753b73b4f17d20b291b1ec7f36a909ced557aa69
|
|
| MD5 |
d7274e6f2b7234a062480850c560d823
|
|
| BLAKE2b-256 |
cefcdd3befe2291cf6bd74166bfcd82bb9a43d0c000a4d46300f5748ed42becd
|
File details
Details for the file install_locked_env-0.3.0-py3-none-any.whl.
File metadata
- Download URL: install_locked_env-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.26.2 CPython/3.14.2 Linux/6.12.43+deb13-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65358c099850adc611e5f46ec662c39bfa7a2dc06e47e6de056d2738d674c936
|
|
| MD5 |
85d44bdb350c81c97e646ce9896b98f7
|
|
| BLAKE2b-256 |
ba8618028834bd7766bbc9a0638a01f98a1cdba3aeb3ac3026a1f5ec3aeb556b
|