Capsule
Capsule is an out-of-box development framework for creating smart contract on Nervos' CKB.
Install / Use
/learn @nervosnetwork/CapsuleREADME
Capsule
⚠️ DEPRECATION NOTICE: This project is no longer maintained. Please use ckb-script-templates.
Capsule is an out-of-box development framework for creating smart contract on Nervos' CKB.
Capsule consists of:
- Capsule CLI - Scaffolding tool.
CKB supports several programming languages for writing scripts, and the language supporting libraries are maintained in the following repositories:
- ckb-std - Rust
- ckb-c-stdlib - C
- ckb-lua - Lua

Installation
Supported Environments
- Linux
- macOS
- Windows (WSL2)
Prerequisites
The following must be installed and available to use Capsule.
- cargo and rust - Capsule uses
cargoto generate Rust contracts and run tests. https://www.rust-lang.org/tools/install. - docker - Capsule uses
dockercontainer to reproducible build contracts. It's also used by cross. https://docs.docker.com/get-docker/ - cross. Capsule uses
crossto build rust contracts. Install with
$ cargo install cross --git https://github.com/cross-rs/cross --rev=6982b6c
Note: All commands must be accessible in the PATH in order for them to be used by Capsule.
Note: The current user must have permission to manage Docker instances. How to manage Docker as a non-root user.
Install binary
Cargo install
Install the latest version
cargo install ckb-capsule --locked
Install the develop branch
cargo install ckb-capsule --git https://github.com/nervosnetwork/capsule.git --branch develop --locked
Usage
capsule help
Quick Start
# check environment
capsule check
# create project
capsule new my-demo
cd my-demo
capsule build
capsule test
Project Layout
capsule.toml- Capsule manifest file.contracts- Contracts directory.tests- Contracts tests.build- Contracts binaries.
Documentation
Upgrading to Capsule 0.10
Upgrade an existing project to capsule 0.10
LICENSE
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
