A command-line interface (CLI) to quickly scaffold a new bhvr
project. bhvr
is a full-stack TypeScript monorepo starter with shared types, using Bun, Hono, Vite, and React.
To create a new bhvr
project, run any of the following commands and follow the interactive prompts:
# Using Bun
bun create bhvr@latest my-bhvr-app
This will create a new directory called my-bhvr-app
inside the current folder.
Note
Check out bhvr.dev for the full documentation!
- Interactive Setup: A simple and fast interactive CLI to guide you through project setup.
- Multiple Templates: Choose from several templates to get started:
default
: A basic setup with Bun, Hono, Vite, and React.tailwind
: Includes Tailwind CSS for styling.shadcn
: Pre-configured with Tailwind CSS and shadcn/ui.
- Optional RPC: Automatically configure Hono RPC for end-to-end type-safe API communication.
- TanStack Query: Add TanStack Query for powerful data fetching and state management.
- Router Options: Choose from multiple routing solutions (React Router, TanStack Router).
- Linter Choice: Choose between ESLint (default) or Biome for code linting and formatting.
- Automated Setup: Handles
git
initialization and dependency installation for you.
You can also use command-line options to skip the interactive prompts:
Option | Description | Default |
---|---|---|
[project-directory] |
The name of the directory to create the project in. | - |
-y, --yes |
Skip all confirmation prompts and use default values. | false |
--template <template> |
Specify a template (default , tailwind , shadcn ). |
default |
--rpc |
Use Hono RPC for type-safe API communication. | false |
--tsquery |
Use TanStack Query for data fetching and state management. | false |
--router <router> |
Specify a client router (none , reactrouter , tanstackrouter ). |
none |
--linter <linter> |
Specify the linter to use (eslint or biome ). |
eslint |
Make sure bun is installed and up to date
bun --version
bun upgrade
Clone the repo, install dependencies, and build
git clone https://github.com/stevedylandev/create-bhvr
cd create-bhvr
bun install
bun run build
After making changes you can test the CLI locally by running bun
against the build folder
bun dist
Alternatively you can use bun link
and use it as a local executable
bun link
create-bhvr
We welcome contributions from the community! Whether it's reporting a bug, suggesting a new feature, or submitting a pull request, your help is appreciated.
Please read our CONTRIBUTING.md for detailed guidelines on how to get started.