Skip to main content

Culsma

PyPI Python versions Release check bioRxiv Software DOI Reference DOI License

Culsma is the public reference implementation of the current Culsma language and execution stack. The public release is distributed as a Python-based CLI.

The executable core is organized in:

  • src/culsma/parser/
  • src/culsma/pipeline/
  • src/culsma/runtime/
  • src/culsma/driver/
  • src/culsma/stdlib/
  • tests/

The repository also maintains the Patterns benchmark cases and reproduction tools under benchmarks/, separate from the language implementation and its PyPI package. This is the canonical maintenance location for the paper's cases. The prepared release targets Culsma 1.0.7; a matching public installation path and archived benchmark release remain pending.

It intentionally leaves out full manuscript sources, MCP tooling, editor integrations, and internal design-workspace documents.

Install

For the current public release, install from PyPI:

python -m pip install culsma

You can also install directly from the v1.0.4 tag:

python -m pip install "culsma @ git+https://github.com/culsma/culsma.git@v1.0.4"

Release notes are in CHANGELOG.md.

The public language reference is maintained in the companion culsma-reference repository/worktree.

VS Code Support

Install Culsma Language Support from the Visual Studio Code Marketplace for syntax highlighting and editor language configuration. The extension binds canonical .culs files and retains .lw association during the transition from LabWord naming. Its source and VSIX releases are maintained in the culsma-vscode repository.

Repository Layout

src/culsma/parser/    grammar, AST, and source loading
src/culsma/pipeline/  compile, validate, typecheck, and plan lowering
src/culsma/runtime/   execution state, events, and material compute
src/culsma/driver/    backend boundary and concrete drivers
src/culsma/stdlib/    bundled standard-library source
tests/                regression and runtime tests
benchmarks/   fixed paper benchmark, expected results and reproduction tools

Quick Run

Create a small protocol file:

cat > /tmp/culsma-smoke.culs <<'CULSMA'
protocol CliSmoke {
  let sample = tube(label = "AcquisitionSample", capacity = 2000uL, load = [content(kind = "biosample", code = "S1", type = "cell_sample"):1000uL]);
  return sample;
}
CULSMA

Then run it:

culsma /tmp/culsma-smoke.culs

This prints three compact sections: material use, resources (including container capacities), and the explicit protocol return.

The explicit run form is equivalent:

culsma run /tmp/culsma-smoke.culs

To save those results as JSON:

culsma run /tmp/culsma-smoke.culs --results results.json

The file has exactly three fields: materials, resources, and returns. Material rows contain name, amount, and unit; processed samples use their declared input amount, while stock reagents use the amount withdrawn at runtime. Container resource rows contain kind, capacity_uL, and count. Explicit device references use kind, name, and count. returns preserves the complete protocol return objects, including fields omitted from the console preview.

For multiple input files, --results saves an array of these result objects in input order. A failed run writes partial results, reports the failure on stderr, and exits with status 1. --results requires a file path and cannot be combined with --json or --output.

The existing complete run-output format remains available on stdout:

culsma run /tmp/culsma-smoke.culs --json

The run output separates the protocol return from the generated lab report: returns is the program output, while report is the execution/reporting summary.

If you want to save the machine-readable run output explicitly:

culsma run /tmp/culsma-smoke.culs --output tmp/result.json

If you want intermediate and debug artifacts as well:

culsma run \
  /tmp/culsma-smoke.culs \
  --artifacts-dir tmp/run

If you are running from a source checkout without the console entrypoint on PATH, use:

python -m culsma /tmp/culsma-smoke.culs

You can also replay a saved run artifact:

culsma replay --run-json tmp/run/run.json --out tmp/replayed_state.json

Run Tests

python -m pytest -q

More

Release Boundary

  • This repository is the public code boundary for Culsma v1.0.x.
  • Public smoke validation uses generated protocol source rather than bundled example files.
  • This repository is licensed under Apache-2.0. See LICENSE.

Support and Maintenance Policy

Culsma is a public open-source reference implementation of the Culsma language and execution stack.

The repository is published as-is. Maintainer review is limited to narrowly scoped, reproducible defects in the current public baseline. General support, custom integration help, roadmap requests, and broad feature requests are out of scope for the public issue tracker.

Brodin Lab affiliation mark

Metadata

Release files for culsma 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for culsma 1.0.7
File Size Uploaded Provenance Actions
culsma-1.0.7.tar.gz 431.3 kB With provenance Details for culsma-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for culsma 1.0.7
File Interpreter ABI Platform Actions
culsma-1.0.7-py3-none-any.whl Python 3 none any Details for culsma-1.0.7-py3-none-any.whl

Total release size: 756.1 kB

Release files / culsma-1.0.7.tar.gz

Download URL culsma-1.0.7.tar.gz
Size 431.3 kB
Tags Source
SHA-256 checksum
How to use checksums
da0a430b1488111ea579b54b97f4407672adc2ee5b281dd4c2aa8e63cd2b9819
BLAKE2b-256 checksum
How to use checksums
e460159a3ec71fc94c30314ff3d4e21313024998fe5947662c707eb33e7b9f8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / culsma-1.0.7-py3-none-any.whl

Download URL culsma-1.0.7-py3-none-any.whl
Size 324.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42f2cd8bcfb6c301c6e19e1431f8438c3cc5ce8a16aacd28f631172c4e523c1e
BLAKE2b-256 checksum
How to use checksums
2ffce6bd0d1a374de2e2a493c017235ab0082a3d13c0096060ae658dbb9580bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Security for culsma 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for culsma-1.0.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page