CLI reference#

conda-presto registers as a conda subcommand plugin. After installation, conda presto is available alongside other conda commands. The standalone conda-presto command accepts the same options.

Synopsis#

conda presto [OPTIONS] [SPECS...]

Resolve package specs or environment files to fully pinned package lists without installing anything. Use --parse to inspect declarations or saved workspace locks, --export to render declarations or saved records, --validate to compare a workspace manifest with its lock without solving, and --update to update selected dependencies in a saved lock.

Positional arguments#

SPECS

One or more conda match specs, e.g. python=3.12 numpy. These are combined with ordinary environment files passed via --file. Workspace manifests do not accept additional inline specs. With --update, supply exact declared direct conda dependency names instead of match specs. Versions, wildcards and PyPI dependency names are rejected.

Options#

-c, --channel

Additional channel to search. Can be repeated. Conda also includes channels from .condarc unless --override-channels is present. When the effective conda context has no channels or only defaults, conda-presto uses channels from input files, then CONDA_PRESTO_CHANNELS. Workspace solves use the manifest’s channels and reject explicit channel overrides.

conda presto -c conda-forge -c bioconda python=3.12
-p, --platform

Target platform subdir (e.g. linux-64, osx-arm64, win-64). Can be repeated to solve for multiple platforms. Ordinary inputs default to the host platform. Workspace inputs accept logical target names or their unambiguous conda subdirectories and default to the selected environments’ declared targets.

conda presto -p linux-64 -p osx-arm64 python=3.12
--parse

Parse exactly one --file and return JSON without solving. Ordinary environment files return specs and channels. Workspace manifests return their format, environment declarations and selected target requirements, using the same response as POST /parse.

Without environment or platform selectors, workspace parsing returns discovery metadata and an empty selected list. With either selector, omitted environments mean all environments and omitted platforms mean each selected environment’s declared platforms. An environment without declared platforms requires an explicit --platform.

Parse mode rejects multiple files, positional specs, explicit channels and --format. It also rejects empty, unknown or ambiguous selectors.

conda presto --parse -f conda.toml
conda presto --parse -f conda.toml -e test -p linux-64
-e, --environment

Select a workspace environment for parsing, solving, export or update. Can be repeated except with --update, which requires exactly one environment. Workspace solves default to all environments. This option is rejected for ordinary inputs.

--export

Export exactly one input file through the required --format without solving or downloading packages. Workspace manifests and conda.lock files accept named environments and logical targets through -e and -p. Omitted selectors include all declared or saved environments and targets. Empty, unknown and ambiguous selections fail.

Manifest, environment YAML and requirements inputs produce normalized dependency output through conda’s exporter registry. Ordinary environment and requirements export rejects platform and environment selectors and renders the parsed environment unchanged. Unsolved declarations cannot produce locks, explicit package lists or SBOMs. Omit --export when the requested output needs a solve.

For workspace locks, use conda-workspaces-lock-v1 to extract source entries with their package URLs, hashes and metadata. Other formats require one selected environment. Exporters without a multiplatform callback require one target. Targets sharing a concrete subdir cannot be combined outside workspace lock output. Normalized formats do not preserve all source metadata, comments, tasks or feature composition.

Export mode rejects additional specs, multiple input files and channel overrides. Workspace locks require --parse, --export, --validate or --update. Existing conda-lockfiles lock-to-lock conversion remains available with its supported formats and restrictions. See Extract a named environment from a saved lock.

conda presto --export -f environment.yml --format requirements
conda presto --export -f conda.toml -e test -p linux-64 --format environment-yaml
conda presto --parse -f conda.lock
conda presto --export -f conda.lock -e test -p linux-64 --format workspace-lock
--validate

Compare exactly one workspace conda.lock with a required --manifest. Check every declared environment and logical target through conda-workspaces without solving, fetching repodata, downloading packages or modifying either file. The check uses each target’s concrete platform and declared virtual packages, independently of the machine running Presto.

Output is JSON with consistent and a targets list. Each target reports its environment, logical platform, concrete subdir, consistent result and a mismatch reason, or null when consistent. Workspace-wide declaration mismatches can appear in several target results and name another affected environment. Exit status is 0 when all targets agree, 1 for a completed check with mismatches, and 2 for invalid or unsupported input, unreadable files or a parser timeout. Invalid input writes an error to stderr without a JSON report.

This mode rejects additional specs, channel overrides, --format, --platform and --environment. It is mutually exclusive with --parse, --export, --update and --serve. PyPI dependencies, external package references and archspec system requirements are unsupported. The check compares saved records with the supplied declarations. It does not assess newer package versions, package payloads or vulnerabilities. See Validate a workspace lock against its manifest.

conda presto --validate -f conda.lock --manifest conda.toml
--update

Update exact direct conda dependency names in one saved workspace environment and logical target. Require exactly one --file, a companion --manifest, one --environment, one --platform and at least one positional dependency name. The target selector must name a declared logical target. No environment or target is inferred.

The complete baseline must satisfy the unchanged manifest before solving. Presto calls conda-workspaces’ selective update API in an isolated worker, then checks the complete result before writing the updated conda.lock YAML to stdout. Unselected environment and target package selections remain unchanged. Serialization may canonicalize the lock. Updated targets follow the provider’s selective solve behavior, which may change transitive dependencies and does not promise the newest version of every requested root.

This mode rejects channel overrides, --format, version constraints, wildcards, unknown roots, and unsupported baseline records. It is mutually exclusive with --parse, --export, --validate and --serve. PyPI dependencies, external package references and archspec system requirements are unsupported. Input errors exit with status 2. Solver or worker failures exit with status 1. No lock content is written to stdout on failure, and Presto does not modify either input file. The shared update deadline is CONDA_PRESTO_SOLVE_TIMEOUT_S, with input parsing additionally capped by CONDA_PRESTO_PARSE_TIMEOUT_S.

conda presto --update -f conda.lock --manifest conda.toml \
  -e test -p cpu numpy > updated.lock
--manifest

Companion workspace manifest for --export, --validate or --update of a workspace lock. The file must be named conda.toml, pixi.toml or pyproject.toml. For export, the selected environment, target, concrete platform, ordered channels and direct requirements must agree with the saved records. This supplies declared roots to exporters such as conda-sboms. PyPI declarations are unsupported.

Without this option, SBOM roots are inferred from the saved dependency graph. Manifest context is rejected for parse, solve and serve modes, ordinary inputs and source workspace-lock extraction.

conda presto --export -f conda.lock -e test -p linux-64 \
  --format cyclonedx-json-v1.7 --manifest conda.toml > test-linux.cdx.json

The CLI exports one selected target per SBOM document. Use HTTP POST /sbom for a named environment/target collection. There is no separate CLI SBOM mode.

-f, --file

Path to an environment file. Can be repeated. Each file is selected and parsed through conda’s installed environment-specifier plugins. The base installation supports environment YAML and requirements files, while the required conda-lockfiles package adds conda-lock and rattler-lock formats. The adapter does not accept conda’s explicit-file specifier as input. Specs from all files are merged with positional specs. Workspace manifests (conda.toml, pixi.toml and supported pyproject.toml workspace tables) use exactly one input file and reject additional inline specs. Use --parse to inspect their declarations without solving.

conda presto -f environment.yml -f extra-deps.yml -p linux-64
--format

Route the output through a conda exporter plugin instead of emitting the default JSON. See Output formats for the full list.

Use conda-workspaces-lock-v1 for a combined workspace lock. Normalized manifest formats require one selected environment.

conda presto --format explicit -c conda-forge -p linux-64 zlib
-O, --override-channels

Ignore channels configured in .condarc and use only the channels given via -c.

--solver

Standard conda parser option. Direct conda presto resolves always use rattler through conda-rattler-solver, so this option does not select a different engine for the subcommand.

--use-local

Add conda’s local build channel. Equivalent to -c local.

--repodata-fn

Select a repodata filename. Can be repeated. Conda adds repodata.json as a final fallback.

--experimental {jlap,lock}

Deprecated option inherited from conda’s networking parser. Both choices are no longer supported and the option has no conda-presto-specific behavior.

--repodata-use-zst, --no-repodata-use-zst

Enable or disable compressed repodata.json.zst metadata.

--repodata-use-shards, --no-repodata-use-shards

Enable or disable sharded repodata where a channel provides it.

-C, --use-index-cache

Accept cached channel metadata even when its normal time-to-live has expired.

-k, --insecure

Disable TLS certificate verification for channel access.

--no-lock

Disable conda locking while reading or updating the repodata cache. Avoid this when another conda process can use the same package cache.

--offline

Run without network access. Only packages already present in the local repodata cache are considered.

--serve

Start the HTTP API server instead of solving. Combine with --host and --port to configure the bind address.

conda presto --serve --port 9000
--host

Bind address for the HTTP server. Default: the value of CONDA_PRESTO_HOST, or 127.0.0.1.

--port

Port for the HTTP server. Default: the value of CONDA_PRESTO_PORT, or 8000.

Examples#

Discover workspace environments and inspect one target’s requirements:

conda presto --parse -f conda.toml
conda presto --parse -f conda.toml -e test -p linux-64

See Parse and solve a workspace manifest for a complete example.

Solve two workspace environments across two targets into one lock:

conda presto -f conda.toml -e default -e test \
  -p linux-64 -p osx-arm64 \
  --format conda-workspaces-lock-v1 > conda.lock

Omitting both workspace selectors solves every declared environment and target. An environment without declared platforms requires an explicit --platform.

Resolve a single package for one platform:

conda presto -c conda-forge -p linux-64 zlib

Resolve an environment file for multiple platforms:

conda presto -f environment.yml -p linux-64 -p osx-arm64

Merge inline specs with a file and produce an explicit lockfile:

conda presto -f environment.yml -p linux-64 --format explicit scipy

Solve environment.yml and write pixi.lock:

conda presto -f environment.yml -p linux-64 --format pixi-lock-v6 > pixi.lock

Render declared requirements without solving:

conda presto --export -f environment.yml --format conda-toml > conda.toml

Convert a supported lockfile format without solving or downloading packages:

conda presto --export -f pixi.lock -p linux-64 --format conda-lock-v1 > conda-lock.yml

Start the HTTP server on a custom port:

conda presto --serve --host 0.0.0.0 --port 9000

Exit codes#

Code

Meaning

0

Command completed. --validate found all targets consistent. Default solve JSON output may still contain per-platform error fields.

1

--validate completed with mismatches. --update failed during solving or worker execution. In other modes, invalid input, unknown format, or solver failure on an exporter-format path.

2

Argument parsing error from argparse, or invalid input, unsupported input or a parser timeout in --validate or --update mode.

See also#