Scaffold Hedera dApp projects from the command line. Pick a template, frontend, and Solidity framework—then get a runnable project in one step.
scaffold-hbar is an interactive CLI (like create-next-app or create-react-app) for the Hedera ecosystem. It fetches a template from a Git branch (via giget), then generates a monorepo with contracts (Hardhat or Foundry), frontend (Next.js), and Hedera network configuration. There are no embedded templates in the CLI repo and no extension system—templates are branches in the template repo (e.g. templates/blank-template).
-
Starter templates — eight of them, each a branch in the template repo (list from the GitHub API, with a built-in fallback):
Template --templatekeyBlank Starter blankBridge bridgeCross-Chain DCA cross-chain-dcaHedera Native hedera-demoOracles oraclesOnchain Cron Job payments-schedulerTokenize Subscriptions tokenize-subscriptionsx402 Pay-Per-Use x402-pay-per-use -
Frontend — Next.js (App Router)
-
Solidity — Hardhat or Foundry (or none)
-
Networks — Testnet or Mainnet (Hashio RPC + Mirror Node URLs)
-
Non-interactive — Use
--yesor full flags for CI and scripts -
Hedera Skills (on by default) — Interactive prompt (default yes) or
--yes/--ciinstalls the marketplace unless you pass--skip-hedera-skills; runsnpx skills add hedera-dev/hedera-skills --all(repo)
- Node.js ≥ 22.23.4 (the 22.x line)
nodejs.org — Node 20 has no vendor fix for the 2026-10-21 runtime advisories, and the templates target 22.x, so they pin>=22.23.4 <23. - Git (with
user.nameanduser.emailconfigured)
git-scm.com - Yarn or npm — Yarn is the default and recommended; npm is fully supported
(the CLI converts the project to npm workspaces).
Install Yarn via Corepack:corepack enable && corepack prepare yarn@stable --activate
If you choose Foundry as the Solidity framework, Foundry is installed automatically
when forge is missing (or older than 1.4.0), using the official installer plus foundryup.
This writes to ~/.foundry and updates your shell profile. To set it up yourself beforehand:
- Official installer (includes
forgeandfoundryup):Then restart your terminal and run:curl -L https://foundry.paradigm.xyz | bashfoundryup
- Homebrew (macOS):
Update later with
brew install foundry
brew upgrade foundry(Homebrew does not install thefoundryupcommand).
Notes on the automatic install:
- Windows is not auto-installed (the installer is a shell script); the CLI prints the commands above instead.
- A Homebrew-managed
forgethat is too old is not replaced, since that would leave two toolchains with~/.foundry/binshadowing the brew one. The CLI asks you to runbrew upgrade foundry. - If
forgealready resolves on yourPATH, the CLI leavesPATHalone, so an existing install is never shadowed by one in~/.foundry/bin.
If you choose Hardhat or none, no extra install is required — Hardhat is a workspace dependency and arrives with your dependency install.
Create a new Hedera dApp without cloning this repo:
npx scaffold-hbar@latestYou’ll get interactive prompts for all projects' options. A prompt is skipped when the chosen template allows only one answer.
To accept all defaults and skip prompts (Yarn, unless the template overrides it):
npx scaffold-hbar@latest --yesTo skip installing dependencies (e.g. to install yourself later):
npx scaffold-hbar@latest --yes --skip-installWith --yes or --ci, Hedera Skills are installed by default (same non-interactive npx skills add hedera-dev/hedera-skills --all step). To skip them:
npx scaffold-hbar@latest --yes --skip-hedera-skills| Option | Description |
|---|---|
[project-name] |
Project directory name (or use --destination) |
-d, --destination <path> |
Output path instead of positional name |
-t, --template <key> |
Built-in (blank, payments-scheduler, …) or org/repo |
-f, --frontend <fw> |
nextjs-app | none (contracts only) |
-s, --solidity-framework <fw> |
foundry | hardhat | none |
--network <network> |
testnet | mainnet |
--package-manager <pm> |
yarn | npm | none (template-managed, skips install) |
--skip-install |
Don’t run install after scaffolding |
--install-hedera-skills |
Install Hedera Skills (npx skills add … --all); default with --yes unless --skip-hedera-skills |
--skip-hedera-skills |
Do not install Hedera Skills (cannot combine with --install-hedera-skills) |
-y, --yes |
Use defaults for all prompts (non-interactive) |
--ci |
CI mode (implies --yes, structured output) |
-h, --help |
Show help |
-v, --version |
Show version |
--log-level <level> |
Log verbosity: error | warn | info (default) | verbose | debug |
Templates are not embedded in this repo. The CLI fetches them with
giget from branches of
hedera-dev/scaffold-hbar, named like
templates/blank-template.
Writing your own? See
contributors/THIRD-PARTY-TEMPLATES.md — any
GitHub repo works as --template owner/repo.
- Template repo — the eight starter templates
- Scaffold HBAR docs
- Hedera Developer Portal
- Hedera Documentation
- Get testnet HBAR
MIT