Overview
Clarinet is a local development environment that offers everything you need to create, test, and deploy smart contracts on Stacks.
Using a simple command line interface, Clarinet enables you to build and iterate on your contracts locally before moving into production on the mainnet
network.
You can code with Clarity syntax support, run tests, debug your code line by line, and deploy your contracts to a local Stacks blockchain environment to rapidly iterate on your code.
Installation
$brew install clarinet
Set up shell completions
Clarinet already has many different commands built in. Therefore, enabling tab completion in your shell may be useful. Using the command below, you can use clarinet
to generate the shell completion scripts for many common shells.
$clarinet completions (bash|elvish|fish|powershell|zsh)
After generating the file, you can refer to the documentation for your shell to determine where this file should be moved to and what other steps may be necessary to enable tab completion for clarinet
.
Guides
Create a new contract
Add new contracts to your project and have them automatically configured in your project file.
Write unit tests
Leverage the Clarinet JS SDK to write comprehensive unit tests, ensuring your contract performs as expected.
Create deployment plans
Employ customizable deployment plans to streamline your contract deployments.
Run a local development environment
Set up a local devnet environment for developing and testing in a controlled environment before deployment.
Related tools
- Clarinet JS SDK: Simplify your testing with the Clarinet JS SDK.
- Hiro Platform: A developer platform for building, deploying and scaling Bitcoin apps.
- Stacks.js: Leverage a JavaScript library that handles basic functions, such as user authentication and transaction signing.
Reach out to us on the #clarinet channel on Discord under the Hiro Developer Tools section. There's also a weekly office hours call every Wednesday at 1pm ET.