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#
SPECSOne 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,--channelAdditional channel to search. Can be repeated. Conda also includes channels from
.condarcunless--override-channelsis present. When the effective conda context has no channels or onlydefaults, conda-presto uses channels from input files, thenCONDA_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,--platformTarget 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
--parseParse exactly one
--fileand return JSON without solving. Ordinary environment files returnspecsandchannels. 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
selectedlist. 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,--environmentSelect 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.--exportExport exactly one input file through the required
--formatwithout solving or downloading packages. Workspace manifests andconda.lockfiles accept named environments and logical targets through-eand-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
--exportwhen the requested output needs a solve.For workspace locks, use
conda-workspaces-lock-v1to 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,--validateor--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
--validateCompare exactly one workspace
conda.lockwith 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
consistentand atargetslist. Each target reports itsenvironment, logicalplatform, concretesubdir,consistentresult and a mismatchreason, ornullwhen 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,--platformand--environment. It is mutually exclusive with--parse,--export,--updateand--serve. PyPI dependencies, external package references andarchspecsystem 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
--updateUpdate exact direct conda dependency names in one saved workspace environment and logical target. Require exactly one
--file, a companion--manifest, one--environment, one--platformand 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.lockYAML 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,--validateand--serve. PyPI dependencies, external package references andarchspecsystem 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 isCONDA_PRESTO_SOLVE_TIMEOUT_S, with input parsing additionally capped byCONDA_PRESTO_PARSE_TIMEOUT_S.conda presto --update -f conda.lock --manifest conda.toml \ -e test -p cpu numpy > updated.lock
--manifestCompanion workspace manifest for
--export,--validateor--updateof a workspace lock. The file must be namedconda.toml,pixi.tomlorpyproject.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 /sbomfor a named environment/target collection. There is no separate CLI SBOM mode.-f,--filePath 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.tomland supportedpyproject.tomlworkspace tables) use exactly one input file and reject additional inline specs. Use--parseto inspect their declarations without solving.conda presto -f environment.yml -f extra-deps.yml -p linux-64
--formatRoute the output through a conda exporter plugin instead of emitting the default JSON. See Output formats for the full list.
Use
conda-workspaces-lock-v1for a combined workspace lock. Normalized manifest formats require one selected environment.conda presto --format explicit -c conda-forge -p linux-64 zlib
-O,--override-channelsIgnore channels configured in
.condarcand use only the channels given via-c.--solverStandard conda parser option. Direct
conda prestoresolves always use rattler through conda-rattler-solver, so this option does not select a different engine for the subcommand.--use-localAdd conda’s local build channel. Equivalent to
-c local.--repodata-fnSelect a repodata filename. Can be repeated. Conda adds
repodata.jsonas 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-zstEnable or disable compressed
repodata.json.zstmetadata.--repodata-use-shards,--no-repodata-use-shardsEnable or disable sharded repodata where a channel provides it.
-C,--use-index-cacheAccept cached channel metadata even when its normal time-to-live has expired.
-k,--insecureDisable TLS certificate verification for channel access.
--no-lockDisable conda locking while reading or updating the repodata cache. Avoid this when another conda process can use the same package cache.
--offlineRun without network access. Only packages already present in the local repodata cache are considered.
--serveStart the HTTP API server instead of solving. Combine with
--hostand--portto configure the bind address.conda presto --serve --port 9000
--hostBind address for the HTTP server. Default: the value of
CONDA_PRESTO_HOST, or127.0.0.1.--portPort for the HTTP server. Default: the value of
CONDA_PRESTO_PORT, or8000.
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. |
1 |
|
2 |
Argument parsing error from |