Clarinet 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 mainnet. You can code with Clarity syntax support (the smart contract language for Stacks), run tests, debug your code line by line, and deploy your contracts to a local Stacks blockchain environment to rapidly iterate on your code.
Clarinet can be used locally or as a hosted service in the cloud via the Hiro Platform.
Install Clarinet
- macOS
- Windows
brew install clarinet
For a visual guide, please see the Setting Up Your Clarity Environment (macOS) video.
winget install clarinet
For a visual guide, please see the Setting Up Your Clarity Environment (Windows) video.
Guides
Create a new contract
→Add new contracts to your project and have them automatically configured in your project file.
Debug a contract
→Debug your contract by stepping through your code, printing values, and tracing code execution.
Write unit tests
→Write unit tests with the Clarinet SDK to verify contract functionality.
Create deployment plans
→Standardize your contract deployments with customizable plans that can execute multi-step processes automatically.
Run a local development environment
→Deploy your code in private blockchain environments to test and integrate your contracts.
Analyzing contracts for vulnerabilities
→Learn how to enable the check_checker
feature to identify potentially dangerous areas in your contracts.
Related Tools
Clarinet JS SDK: Make testing in Clarinet even easier with the Clarinet SDK.
Hiro Platform: Skip the Clarinet installation and go straight to building in a hosted dev platform.
Stacks.js: Don’t reinvent the wheel and build faster with a JS library that handles basic functions.
Need help building with Clarinet? Reach out to us on the #clarinet
channel on Discord under the Hiro Developer Tools section. There’s also a weekly office hours on Discord every Thursday at 11am ET.