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. Culsma 1.0.7 is available on PyPI; the benchmark is included in the v1.0.7 source release.

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.8

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.8
File Size Uploaded Provenance Actions
culsma-1.0.8.tar.gz 494.2 kB With provenance Details for culsma-1.0.8.tar.gz

Built distribution (wheel)

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

Total release size: 867.7 kB

Release files / culsma-1.0.8.tar.gz

Download URL culsma-1.0.8.tar.gz
Size 494.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3a12606e92827b42820c4c1283455416cd3631e402dfb710d102da007c5eb0b8
BLAKE2b-256 checksum
How to use checksums
4c25a9932068b8c2892ac839d6c2e80a4c84e5cd9d3aa2c56121e97f8d151de5
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 Oct 8, 2026.

Transparency log

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

Download URL culsma-1.0.8-py3-none-any.whl
Size 373.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c60e9dc1a6f133a0c70754d3dc7a0ad02224e2ff3c4ea3588e1fce2182697869
BLAKE2b-256 checksum
How to use checksums
0f0110c7284a02232779d826bf359e58407cfb1a30dee16ebd903663909125b5
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 Oct 8, 2026.

Transparency log

Security for culsma 1.0.8

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.8.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 Oct 8, 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