skillfed

clvm-tools

CLVM compiler.

clvm-tools v0.4.10 122.1K downloads/30d#11,958 on PyPI51
Permissive license Apache-2.0 Active released

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-tools

uv

uv add clvm-tools

poetry

poetry add clvm-tools

Installing 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

Development Status :: 3 - AlphaLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: Security :: Cryptography

Tags

clvm compilerlisp smart contract languageblockchain script compilerclvm toolschia blockchain compilersmart contract bytecodefunctional language compiler
blockchaincompilersmart-contracts

More Cryptography packages

Further reading