CLI Reference
This is an automatically generated api doc of the flags and arguments that can be passed to conda-lock and its various subcommands.
conda-lock
To get help for subcommands, use the conda-lock
Usage:
conda-lock [OPTIONS] COMMAND [ARGS]...
Options:
Name | Type | Description | Default |
---|---|---|---|
--version |
boolean | Show the version and exit. | False |
--help |
boolean | Show this message and exit. | False |
conda-lock install
Usage:
conda-lock install [OPTIONS] [LOCK_FILE]
Options:
Name | Type | Description | Default |
---|---|---|---|
--conda |
text | path (or name) of the conda/mamba executable to use. | None |
--mamba / --no-mamba |
boolean | don't attempt to use or install mamba. | False |
--micromamba / --no-micromamba |
boolean | don't attempt to use or install micromamba. | False |
--copy |
boolean | Install using --copy to prevent links. This is useful for building containers |
False |
-p , --prefix |
text | Full path to environment location (i.e. prefix). | None |
-n , --name |
text | Name of environment. | None |
--auth |
text | The auth file provided as string. Has precedence over --auth-file . |
`` |
--auth-file |
text | Path to the authentication file. | `` |
--validate-platform / --no-validate-platform |
boolean | Whether the platform compatibility between your lockfile and the host system should be validated. | True |
--log-level |
choice (DEBUG | INFO | WARNING | ERROR | CRITICAL ) |
Log level. | INFO |
--dev / --no-dev |
boolean | install dev dependencies from the lockfile (where applicable) | True |
-E , --extras |
text | include extra dependencies from the lockfile (where applicable) | [] |
--help |
boolean | Show this message and exit. | False |
conda-lock lock
Generate fully reproducible lock files for conda environments.
By default, the lock files are written to conda-{platform}.lock. These filenames can be customized using the --filename-template argument. The following tokens are available:
platform: The platform this lock file was generated for (conda subdir).
dev-dependencies: Whether or not dev dependencies are included in this lock file.
input-hash: A sha256 hash of the lock file input specification.
version: The version of conda-lock used to generate this lock file.
timestamp: The approximate timestamp of the output file in ISO8601 basic format.
Usage:
conda-lock lock [OPTIONS]
Options:
Name | Type | Description | Default |
---|---|---|---|
--conda |
text | path (or name) of the conda/mamba executable to use. | None |
--mamba / --no-mamba |
boolean | don't attempt to use or install mamba. | False |
--micromamba / --no-micromamba |
boolean | don't attempt to use or install micromamba. | False |
-p , --platform |
text | generate lock files for the following platforms | None |
-c , --channel |
text | Override the channels to use when solving the environment. These will replace the channels as listed in the various source files. | None |
--dev-dependencies / --no-dev-dependencies |
boolean | include dev dependencies in the lockfile (where applicable) | True |
-f , --file |
path | path to a conda environment specification(s) | [PosixPath('environment.yml')] |
-k , --kind |
text | Kind of lock file(s) to generate [should be one of 'lock', 'explicit', or 'env']. | ['lock'] |
--filename-template |
text | Template for single-platform (explicit, env) lock file names. Filename must include {platform} token, and must not end in '.yml'. For a full list and description of available tokens, see the command help text. | conda-{platform}.lock |
--lockfile |
text | Path to a conda-lock.yml to create or update | conda-lock.yml |
--strip-auth |
boolean | Strip the basic auth credentials from the lockfile. | False |
-e , --extras , --category |
text | When used in conjunction with input sources that support extras/categories (pyproject.toml) will add the deps from those extras to the render specification | [] |
--filter-categories , --filter-extras |
boolean | In conjunction with extras this will prune out dependencies that do not have the extras specified when loading files. | False |
--check-input-hash |
boolean | Check existing input hashes in lockfiles before regenerating lock files. If no files were updated exit with exit code 4. Incompatible with --strip-auth | False |
--log-level |
choice (DEBUG | INFO | WARNING | ERROR | CRITICAL ) |
Log level. | INFO |
--pdb |
boolean | Drop into a postmortem debugger if conda-lock crashes | False |
--virtual-package-spec |
path | Specify a set of virtual packages to use. | None |
--update |
text | Packages to update to their latest versions. If empty, update all. | None |
--pypi_to_conda_lookup_file |
text | Location of the lookup file containing Pypi package names to conda names. | None |
--md , --metadata |
choice (timestamp | git_sha | git_user_name | git_user_email | input_md5 | input_sha ) |
Metadata fields to include in lock-file | [] |
--mdy , --metadata-yaml , --metadata-json |
path | YAML or JSON file(s) containing structured metadata to add to metadata section of the lockfile. | [] |
--help |
boolean | Show this message and exit. | False |
conda-lock render
Render multi-platform lockfile into single-platform env or explicit file
Usage:
conda-lock render [OPTIONS] [LOCK_FILE]
Options:
Name | Type | Description | Default |
---|---|---|---|
--dev-dependencies / --no-dev-dependencies |
boolean | include dev dependencies in the lockfile (where applicable) | True |
-k , --kind |
choice (explicit | env ) |
Kind of lock file(s) to generate. | ['explicit'] |
--filename-template |
text | Template for the lock file names. Filename must include {platform} token, and must not end in '.yml'. For a full list and description of available tokens, see the command help text. | conda-{platform}.lock |
-e , --extras |
text | When used in conjunction with input sources that support extras (pyproject.toml) will add the deps from those extras to the input specification | [] |
--log-level |
choice (DEBUG | INFO | WARNING | ERROR | CRITICAL ) |
Log level. | INFO |
--pdb |
boolean | Drop into a postmortem debugger if conda-lock crashes | False |
-p , --platform |
text | render lock files for the following platforms | None |
--help |
boolean | Show this message and exit. | False |