Skip to main content

A lightweight, single-binary conda bootstrapper — powered by rattler

Project description

conda-express (cx)

A lightweight, single-binary bootstrapper for conda, powered by rattler. The cx binary is short for conda express.

cx replaces the miniconda/constructor installation pattern with a ~17 MB static binary that bootstraps a fully functional conda environment in seconds.

Quick start

# Bootstrap a conda installation (first run only, ~3–5 s)
cx bootstrap

# Use conda normally — cx delegates transparently
cx install -n myenv numpy pandas
cx create -n science python=3.12 scipy

# Activate environments using conda-spawn (no shell init needed)
cx shell myenv

On first use, cx automatically installs conda and its plugins into ~/.cx from an embedded lockfile. Subsequent invocations hand off directly to the installed conda binary with no overhead.

What gets installed

cx installs a minimal conda stack from conda-forge:

Package Role
python >= 3.12 Runtime
conda >= 25.1 Package manager
conda-rattler-solver Rust-based solver (replaces libmamba)
conda-spawn Subprocess-based environment activation
conda-pypi PyPI interoperability
conda-self Base environment self-management

The conda-libmamba-solver and its 27 exclusive native dependencies (libsolv, libarchive, libcurl, spdlog, etc.) are excluded by default, reducing the install from 113 to 86 packages.

Installation

Homebrew (recommended)

The easiest way to install on macOS and Linux:

brew tap jezdez/conda-express https://github.com/jezdez/conda-express
brew install jezdez/conda-express/cx

Update later with brew upgrade cx.

Shell script

macOS / Linux:

curl -fsSL https://jezdez.github.io/conda-express/get-cx.sh | sh

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://jezdez.github.io/conda-express/get-cx.ps1 | iex"

The script detects your platform, downloads the right binary, verifies the checksum, updates your shell profile / PATH, and runs cx bootstrap. Customize with environment variables:

  • CX_INSTALL_DIR — where to place the binary (default: ~/.local/bin or %USERPROFILE%\.local\bin)
  • CX_VERSION — specific version to install (default: latest)
  • CX_NO_PATH_UPDATE — set to skip shell profile / PATH modification
  • CX_NO_BOOTSTRAP — set to skip running cx bootstrap

From GitHub Releases

Download the binary for your platform from the latest release:

Platform File
Linux x86_64 cx-x86_64-unknown-linux-gnu
Linux ARM64 cx-aarch64-unknown-linux-gnu
macOS x86_64 (Intel) cx-x86_64-apple-darwin
macOS ARM64 (Apple Silicon) cx-aarch64-apple-darwin
Windows x86_64 cx-x86_64-pc-windows-msvc.exe

Each file has a matching .sha256 checksum.

From PyPI

pip install conda-express

From crates.io

cargo install conda-express

The package is published as conda-express on PyPI and crates.io.

Building from source

Requires pixi (recommended) or Rust (edition 2024).

With pixi (recommended)

pixi manages the Rust toolchain from conda-forge for reproducible builds:

git clone https://github.com/jezdez/conda-express.git
cd conda-express

pixi run build          # cargo build --release
pixi run test           # cargo test
pixi run lint           # fmt-check + clippy

With system Rust

git clone https://github.com/jezdez/conda-express.git
cd conda-express

# Build (first build solves packages at compile time — needs network)
cargo build --release

# Binary is at target/release/cx
./target/release/cx --help

The first build runs a compile-time solve via build.rs, generating a rattler-lock v6 lockfile that gets embedded into the binary. Subsequent builds reuse the cached lockfile unless pixi.toml changes.

Configuration

Package specs, channels, and exclusions live in the [tool.cx] section of pixi.toml:

[tool.cx]
channels = ["conda-forge"]
packages = [
    "python >=3.12",
    "conda >=25.1",
    "conda-rattler-solver",
    "conda-spawn",
    "conda-pypi",
    "conda-self",
]
exclude = ["conda-libmamba-solver"]

Edit this section to customize what cx installs, then rebuild. You can also override these values at build time using environment variables — see Building custom cx binaries below.

CLI reference

cx bootstrap [OPTIONS]           Bootstrap a fresh conda installation
  --force                        Re-bootstrap even if prefix exists
  --prefix DIR                   Target directory (default: ~/.cx)
  --channel CH                   Channels (default: conda-forge)
  --package PKG                  Additional packages to install
  --exclude PKG                  Packages to exclude (default: conda-libmamba-solver)
  --no-exclude                   Disable default exclusions
  --no-lock                      Ignore embedded lockfile, do a live solve
  --lockfile PATH                Use an external lockfile instead

cx status [--prefix DIR]         Show cx installation status
cx shell [ENV]                   Alias for conda spawn (activate via subshell)
cx uninstall [OPTIONS]           Remove cx, conda prefix, and all environments
  --prefix DIR                   Target directory (default: ~/.cx)
  -y, --yes                      Skip confirmation prompt

cx help                          Getting-started guide
cx <conda-args>                  Passed through to conda

Disabled commands

cx uses conda-spawn instead of traditional shell-based activation. The following commands are intentionally disabled:

Command Instead
conda activate / deactivate cx shell myenv
conda init Add condabin to your PATH (see below)

Frozen base prefix

The ~/.cx prefix is protected with a CEP 22 frozen marker after bootstrap. This prevents accidental modification of the base environment (e.g., conda install numpy into base). Users should create named environments for their work:

cx create -n myenv numpy pandas
cx shell myenv

Updating the base installation is handled by conda self update (via conda-self).

Building custom cx binaries

You can build a cx binary with your own set of packages using the composite GitHub Action or the reusable workflow.

Composite action (uses: jezdez/conda-express@main)

Use in a step within your own workflow. You control the platform matrix:

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: jezdez/conda-express@main
        id: cx
        with:
          packages: "python >=3.12, conda >=25.1, conda-rattler-solver, conda-spawn, numpy, pandas"

      - uses: actions/upload-artifact@v4
        with:
          name: ${{ steps.cx.outputs.asset-name }}
          path: ${{ steps.cx.outputs.binary-path }}

Reusable workflow

Builds all 5 platforms in one call:

jobs:
  build-cx:
    uses: jezdez/conda-express/.github/workflows/build.yml@main
    with:
      packages: "python >=3.12, conda >=25.1, conda-rattler-solver, conda-spawn, numpy, pandas"

Build-time environment variables

When building from source, you can override the package configuration without editing pixi.toml:

Variable Overrides Format
CX_PACKAGES [tool.cx].packages Comma-separated match specs
CX_CHANNELS [tool.cx].channels Comma-separated channel names
CX_EXCLUDE [tool.cx].exclude Comma-separated package names
CX_PACKAGES="python >=3.12, conda >=25.1, numpy" pixi run build

Uninstalling

To completely remove cx, the conda prefix, all environments, and the cx binary:

cx uninstall

This will show what will be removed and ask for confirmation. Use --yes to skip the prompt. The command also cleans up PATH entries from shell profiles that were added by the installer.

How it works

  1. Compile time: build.rs reads [tool.cx] from pixi.toml, solves dependencies using rattler, filters excluded packages, and writes a rattler-lock v6 lockfile embedded into the binary.

  2. First run: cx parses the embedded lockfile, downloads packages from conda-forge, and installs them into the prefix. No repodata fetch or solve needed at runtime.

  3. Subsequent runs: cx detects the existing prefix and replaces its own process with the installed conda binary, passing all arguments through.

Activation model

cx ships with conda-spawn instead of traditional conda activate. There is no need to run conda init or modify shell profiles.

# Add cx to PATH (one-time setup)
export PATH="$HOME/.cx/condabin:$PATH"

# Activate an environment (spawns a subshell)
cx shell myenv

# Deactivate by exiting the subshell
exit

Lockfile format

The embedded lockfile uses the rattler-lock v6 format (same as pixi.lock). It can be:

  • Read by pixi
  • Imported by conda-lockfiles
  • Checked into version control for reproducibility auditing

License

BSD 3-Clause. See LICENSE.

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

conda_express-0.2.0.tar.gz (121.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

conda_express-0.2.0-py3-none-win_amd64.whl (8.0 MB view details)

Uploaded Python 3Windows x86-64

conda_express-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

conda_express-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

conda_express-0.2.0-py3-none-macosx_11_0_arm64.whl (7.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

conda_express-0.2.0-py3-none-macosx_10_12_x86_64.whl (7.8 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file conda_express-0.2.0.tar.gz.

File metadata

  • Download URL: conda_express-0.2.0.tar.gz
  • Upload date:
  • Size: 121.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for conda_express-0.2.0.tar.gz
Algorithm Hash digest
SHA256 de410495890eb87829e7ee389bd846a628398adb6a4a7ed0c5f290e46998e9b2
MD5 35e966252a2a05b7d018dad2eefa9d6b
BLAKE2b-256 183ba8951eed8a7dd4baf19a533a78372176d54fef50a26a7cc87a7029543247

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_express-0.2.0.tar.gz:

Publisher: release.yml on jezdez/conda-express

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_express-0.2.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for conda_express-0.2.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e0c4d8107170391cd3ea401e121025386c3a455eed79cfabd9eb2ecf814d6cc8
MD5 c1cdca775cfa8ebcb04f6154791582a0
BLAKE2b-256 1dc6a53e38c78d7de48cefc08c2e41a9e4f0a0869bb1189229f0418456c549a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_express-0.2.0-py3-none-win_amd64.whl:

Publisher: release.yml on jezdez/conda-express

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_express-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for conda_express-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fe3824dd74eba7929c848b035323c9f6e196d34d243687ab8df842f223353a56
MD5 26bd7d52182acc60b2bc893d365093de
BLAKE2b-256 d3eb633d8cf123293f3c49cc06e5d6abeefa657d13890742ce67997a7caeb978

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_express-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on jezdez/conda-express

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_express-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for conda_express-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5425e8171ccb2e58b9eb9e30b6c1f53dcad6394cfc38b0e22207c41b27708f61
MD5 1bb4fbbfbefad514c3c61eb6ae8cebc3
BLAKE2b-256 8d9a949aa69080751d62c808abd0c7e059a229a2481b3b4651a4dc79d93a4523

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_express-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on jezdez/conda-express

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_express-0.2.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for conda_express-0.2.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0a2efda870f0a8704a890b580a84f7309e91c9a461c5b90bb7ee67ce937b44f4
MD5 02cedabe735495146c6b7edfa710060f
BLAKE2b-256 6459a348cc0190f8e571c9d17c8c42053bfed9675fbd399d12b7808e05fabde3

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_express-0.2.0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on jezdez/conda-express

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_express-0.2.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for conda_express-0.2.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2e2c34e825427099942b7ce132ceaf9c8b57ca6e6f4efd80db7847e1bb8e874c
MD5 bc4e0da15c61a0e765a6e99ae6ad7b50
BLAKE2b-256 0da39d2b883ebc576640de7c815a43d023999fbcc9cb90ba94cb6abbdb6e2db3

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_express-0.2.0-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on jezdez/conda-express

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page