clvm-tools
CLVM compiler.
What it is and what it does
clvm-tools is a compiler for CLVM, a LISP-like language designed for writing smart contracts on the Chia blockchain. It translates high-level CLVM source code into lower-level bytecode that runs on the CLVM virtual machine. The compiler supports defining functions with `defun`, macros with `defmacro`, inline functions with `defun-inline`, and provides operators like `mod` for module definition, `if` for lazy conditional evaluation, and `qq`/`unquote` for template expansion.
The package is primarily used by Chia blockchain developers to write transaction-encumbrance logic—code that controls when and how funds can be spent. It handles both the parsing and compilation phases, auto-quoting literals and expanding macros at compile time. The tool is invoked via command-line utilities (`run` to compile, `brun` to execute) or as a library, and it depends on clvm for the underlying virtual machine and clvm-tools-rs for performance-critical compilation steps.
Use it for:
- Write and compile Chia smart contracts that control fund release conditions and transaction validation logic.
- Develop reusable CLVM macros and inline functions to reduce code duplication in blockchain applications.
- Test CLVM programs locally by compiling and executing them with the `run` and `brun` utilities.
- Build cryptocurrency wallet or exchange software that needs to generate and validate Chia transaction scripts.
- Prototype and debug smart-contract logic before deploying to the Chia blockchain.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Compiles a LISP-like smart-contract language (CLVM) into executable bytecode, with support for functions, macros, and inline operators for cryptocurrency transaction encumbrance.
Yes, if you are developing on Chia blockchain or need to work with CLVM. The package is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive license. It is in Alpha status, so expect occasional API changes; however, the 660-day release cycle and active repository suggest stability for production use. Install only if CLVM compilation is a direct requirement for your project.
Install
clvm-tools on PyPI
pip
pip install clvm-toolsuv
uv add clvm-toolspoetry
poetry add clvm-toolsInstalling clvm-tools
Before you install
Low friction: pure Python wheel with four runtime dependencies (clvm, clvm-tools-rs, importlib-metadata, setuptools). Actively maintained with recent commits; last release 660 days ago suggests stable maturity rather than abandonment.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects that can comply with attribution and derivative-work disclosure requirements.
Quickstart
pip install clvm-tools
from clvm_tools.clvm_tools import run
result = run('(mod (X) (+ X 3))')
print(result)
Requires Python 3.9 or later (supports 3.9, 3.10, 3.11, 3.12 per classifiers); clvm-tools-rs dependency may require a Rust toolchain or prebuilt binary depending on your platform.
Verify before relying
- Whether clvm-tools-rs is available as a prebuilt wheel for all supported platforms or requires compilation.
- Performance characteristics and typical compile times for real-world CLVM programs.
- Completeness of error messages and debugging support for CLVM syntax errors.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — clvm, clvm-tools-rs, importlib-metadata, setuptools |
| Maintenance | actively maintained — 660 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 122,146/month — #11,958 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: clvm_tools-0.4.10-py3-none-any.whl
Tags
More Cryptography packages
Certifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
PyNaClPyNaCl provides Python bindings to libsodium…
permissive · top 1,000 on PyPI
clvmA LISP-like virtual machine for writing and…
permissive · top 15,000 on PyPI
clvm-tools-rsCompiles and executes Chialisp programs to CLVM…
permissive · top 15,000 on PyPI
py-evmPy-EVM is a Python implementation of the…
permissive · top 15,000 on PyPI
clvm-rsRust-based implementation of the CLVM virtual…
permissive · top 15,000 on PyPI
chia-baseProvides base data types and utilities for Chia…
permissive · top 15,000 on PyPI
vyperVyper is a Python-like programming language for…
permissive · top 15,000 on PyPI
ethereum-dasmDisassembles Ethereum EVM bytecode into…
copyleft · top 15,000 on PyPI
chialisp-builderManages build-time compilation of Chialisp…
unclear · top 15,000 on PyPI
chia-rsProvides Python bindings to Rust crates for…
unclear · top 15,000 on PyPI
chia-puzzles-pyProvides Python bindings to the standard Chia…
unclear · top 15,000 on PyPI