npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-scaffold-hbar

v0.1.3

Published

Scaffold a Hedera dApp project

Downloads

518

Readme

create-scaffold-hbar

Scaffold Hedera dApp projects from the command line. Pick a template, frontend, Solidity framework, and wallet—then get a runnable project in one step.

create-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).


Features

  • Starter templates — Blank, HTS fungible, HTS NFT, HCS DAO, or DeFi swap (template = branch name; list from GitHub API with fallback)
  • Frontend — Next.js (App Router)
  • Solidity — Hardhat or Foundry (or none)
  • Wallets — RainbowKit wired for Hedera
  • Networks — Testnet or Mainnet (Hashio RPC + Mirror Node URLs)
  • Non-interactive — Use --yes or full flags for CI and scripts

Prerequisites

  • Node.js ≥ 20.18.3
    nodejs.org
  • Git (with user.name and user.email configured)
    git-scm.com
  • Yarn (the scaffolded projects use Yarn workspaces; npm and pnpm are not supported)
    Install via Corepack: corepack enable && corepack prepare yarn@stable --activate

If you choose Foundry as the Solidity framework, you need Foundry installed:

  • Official installer (includes forge and foundryup):
    curl -L https://foundry.paradigm.xyz | bash
    Then restart your terminal and run:
    foundryup
  • Homebrew (macOS):
    brew install foundry
    Update later with brew upgrade foundry (Homebrew does not install the foundryup command).

If you choose Hardhat or none, no extra install is required.


Quick start (run from npm)

Create a new Hedera dApp without cloning this repo:

npx create-scaffold-hbar@latest

You’ll get interactive prompts for project name, template, frontend, framework, wallet, and network. Yarn is used automatically as the package manager. To accept all defaults and skip prompts:

npx create-scaffold-hbar@latest --yes

To skip installing dependencies (e.g. to install yourself later):

npx create-scaffold-hbar@latest --yes --skip-install

Running locally (development)

Use this when you’re working on the create-scaffold-hbar CLI itself.

1. Clone and install

git clone https://github.com/hashgraph/create-hbar.git
cd create-hbar
yarn install

2. Build

The CLI runs from compiled output in dist/:

yarn build

3. Run the CLI

From the repo root:

node bin/create-scaffold-hbar.js [project-name] [options]

Or use the cli script:

yarn cli

Examples (run from repo root):

# Interactive: prompts for everything
node bin/create-scaffold-hbar.js --skip-install

# Non-interactive: default project name, no install, no Foundry check
node bin/create-scaffold-hbar.js --yes --skip-install --solidity-framework none

# Non-interactive with Hardhat
node bin/create-scaffold-hbar.js --yes --skip-install --solidity-framework hardhat

# Custom project name and template
node bin/create-scaffold-hbar.js my-hts-app --template payments-scheduler --frontend nextjs-app --skip-install

# See all options
node bin/create-scaffold-hbar.js --help

To avoid creating the project inside the repo, run from another directory:

cd /tmp
node /path/to/create-hbar/bin/create-scaffold-hbar.js --yes --skip-install my-hedera-dapp

CLI options

| 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 | | -w, --wallet <list> | rainbowkit | | --network <network> | testnet | mainnet | | --skip-install | Don’t run install after scaffolding | | -y, --yes | Use defaults for all prompts (non-interactive) | | --ci | CI mode (implies --yes, structured output) | | -h, --help | Show help | | -v, --version | Show version |


Development (contributing)

  • Typecheck: yarn type-check
  • Lint: yarn lint
  • Format: yarn format
  • Tests: yarn test
  • Tests (watch): yarn test:watch
  • Coverage: yarn test:coverage

Pre-commit hooks (lefthook) run format, type-check, and lint.


E2E scenarios (manual check)

From the repo root after yarn build, you can run:

| Scenario | Command | What to check | | --------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | | Help | node bin/create-scaffold-hbar.js --help | All options listed | | Default | node bin/create-scaffold-hbar.js e2e-scenarios/default --yes --skip-install | Scaffold + skip install | | Solidity none | node bin/create-scaffold-hbar.js e2e-scenarios/sol-none --yes --skip-install -s none | No "and submodules" | | Hardhat | node bin/create-scaffold-hbar.js e2e-scenarios/sol-hardhat --yes --skip-install -s hardhat | packages/hardhat + nextjs | | Custom flags | node bin/create-scaffold-hbar.js e2e-scenarios/custom --yes --skip-install -t blank -f nextjs-app --network mainnet | Scaffold with defaults | | Install failure | node bin/create-scaffold-hbar.js e2e-scenarios/with-install --yes -s hardhat | Exit code 5, InstallError message |

Output goes under e2e-scenarios/ (gitignored).


Project structure

create-hbar/
├── bin/create-scaffold-hbar.js    # CLI entry (points to dist/)
├── src/
│   ├── cli.ts            # Main CLI flow
│   ├── main.ts           # createProject task list
│   ├── types.ts          # Shared types
│   ├── utils/            # Prompts, parsing, validation, intro/outro
│   └── tasks/            # Copy template (giget), install, git, format
├── tests/
│   ├── unit/             # Unit tests (consts, types, parse-arguments)
│   └── integration/      # Integration tests (prompts)
└── dist/                 # Built output (generated by yarn build)

Templates are not embedded: the CLI fetches them via giget from the template repo (branch names like templates/blank-template). See contributors/TEMPLATES.md for the flow.


Links


License

MIT