--- id: clvm-tools version: "0.4.10" license: Apache-2.0 license_treatment: permissive maintenance: active --- # clvm-tools — CLVM compiler. License: permissive · Maintenance: active · Downloads: 122.1K/mo ## 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 above — 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 pip install clvm-tools uv add clvm-tools 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: unspecified - Install friction: low - Maintenance: active - Downloads: 122.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags clvm compiler, lisp smart contract language, blockchain script compiler, clvm tools, chia blockchain compiler, smart contract bytecode, functional language compiler, blockchain, compiler, smart-contracts [View on SkillFed](https://skillfed.io/packages/clvm-tools) · [View on PyPI](https://pypi.org/project/clvm-tools/)