Skip to content
stxscript. GitHub

← Back home · Compare

StxScript vs Clarinet

Stacks test + dev environment for Clarity contracts.

Clarinet runs Clarity, simulates the Stacks chain locally, and orchestrates contract tests. StxScript produces Clarity. The two compose: use StxScript as your source language, build to .clar, and let Clarinet drive your test and devnet flow.

Feature StxScript Clarinet Advantage
What it is Source-to-Clarity transpiler Clarity dev environment / test runner Comparable
Replaces the other? No No Comparable
Editing experience TS-style syntax + LSP Native Clarity editing StxScript
Local test runner stxscript test (contract-level) Clarinet console + simnet Clarinet
Simulating block height / tx-sender Not in scope First-class Clarinet
Type checking pre-deploy Yes, in the transpiler Yes, on contract load Comparable
Use together? Yes — build to .clar, then Clarinet runs the suite Yes — same answer Comparable
Project scaffolding stxscript new (basic/token/nft/defi) clarinet new Comparable

Pick StxScript when

  • You want a TypeScript-flavored source language above Clarinet
  • You like StxScript decorators and type system for authoring
  • You want stxscript fmt / lint / check while editing, on top of Clarinet for execution
  • You prefer stxscript test for unit contracts and Clarinet for end-to-end simulation

Pick Clarinet when

  • You already have a Clarinet project and refactoring to a transpiler is not worth it
  • Your test suite leans heavily on Clarinet console and simnet features
  • You want exactly one tool in your contract toolchain

Still deciding?

The two tools are not in conflict. Most teams that adopt StxScript still keep the rest of their Stacks toolchain. Try one file in StxScript; ship the rest of the project unchanged.