Skip to content
stxscript. GitHub

Home · FAQ

Questions developers ask first.

Everything here traces to the project README. If your question is not answered, the contact form reaches the team.

+ What exactly does StxScript compile to?

Valid Clarity source code. You can read it, audit it, and deploy it with the standard Stacks tooling. The transpiler is a four-stage pipeline: Lark-based LALR parsing, typed AST generation, semantic analysis (type checking, scope, trait compliance), and Clarity code generation.

+ Do I have to learn anything new?

If you know TypeScript, Rust, or any modern typed language, the surface syntax will feel familiar. The interesting work is learning what subset of those features maps cleanly to Clarity — and StxScript only exposes the parts that do.

+ Is the output Clarity readable?

Yes, that is a deliberate design goal. The transpiler emits indented, documented Clarity that an auditor can read alongside the StxScript source. You ship both.

+ How do I install it?

pip install stxscript. StxScript itself is written in Python (3.10+), so a single pip install gets you the build CLI, the formatter, the linter, the language server, and the project scaffolder.

+ What templates are available?

stxscript new <name> --template <kind> currently ships basic, token, nft, and defi templates. They are starter projects, not frameworks.

+ Is there an IDE story?

There is a VS Code extension with syntax highlighting, snippets, and integrated LSP, plus an LSP server (stxscript-lsp) that any LSP client can connect to. Vim/Neovim, Sublime, and Emacs are documented.

+ Is StxScript trying to replace Clarinet?

No. Clarinet is a test and dev environment for Clarity contracts. StxScript is a source language that produces Clarity. They sit at different layers — and StxScript ships its own stxscript test command for contract tests, so the two are complementary.

+ Does StxScript have a token or protocol?

No. StxScript is a developer tool with no token, no protocol, no network, and no hosted service. It runs only at build time; the Stacks blockchain runs the Clarity it produces. It is open source under the MIT license.

+ Is StxScript a new VM or blockchain?

No. StxScript emits Clarity, which is executed by the existing Stacks blockchain. There is no competing runtime — the security envelope is exactly Clarity’s.

+ How does StxScript relate to Bitcoin?

StxScript targets Clarity, the smart contract language of Stacks. Stacks is a Bitcoin layer: its blocks settle on the Bitcoin base chain, so contracts you write in StxScript run in an environment secured by Bitcoin. StxScript itself does not touch Bitcoin directly — it produces the Clarity that the Stacks node runs.

+ Why write Bitcoin smart contracts in TypeScript syntax?

The developer pool that knows TypeScript is orders of magnitude larger than the pool that knows Clarity’s Lisp surface. As Bitcoin DeFi and Bitcoin-secured L2s grow, the bottleneck is developer onboarding, not the chain. StxScript gives TypeScript-fluent engineers an ergonomic, statically typed path to Clarity so they can build on Bitcoin-secured Stacks without first learning a new paradigm.

+ Do I need to understand Clarity to use StxScript?

Not to get started, but it helps for auditing. You author in StxScript, and the transpiler emits readable Clarity you ship alongside the source. Because every construct has a documented Clarity mapping, reading the output is a short step — and for the rare feature StxScript does not sugar yet, you can drop down to raw Clarity.

+ Is StxScript production-ready?

It is version 0.3.0 with 146 passing tests per the README — usable for real contracts, but pre-1.0. Treat it the way you would any early-stage compiler on a security-critical target: audit the emitted Clarity, test on testnet, and keep the .clar as your source of truth. It covers the common contract surface rather than 100% of Clarity’s built-ins.

+ What are the honest limitations today?

StxScript adds a build step and a Python 3.10+ dependency to your toolchain, and it does not yet claim full parity with every Clarity feature — coverage is grounded in the README language-features list. It is not a test/devnet environment (pair it with Clarinet for that), and it is pre-1.0, so expect the language surface to keep evolving.

+ What is the current status?

Version 0.3.0 with 146 passing tests as reported in the README. CLI commands cover build, fmt, lint, check, new, watch, doc, test, and pkg.