@bquery/setup is a TypeScript CLI that scaffolds a local bQuery project with sensible defaults for Node.js, Bun, or Deno.
It supports both an interactive setup wizard and a non-interactive mode for repeatable automation.
- Interactive onboarding flow with guided prompts
- Non-interactive mode for CI, scripts, and quick starts
- Project templates for full and minimal setups
- Runtime selection for Node.js, Bun, and Deno
- Optional Vite setup for Node-based web projects
- Optional Tailwind CSS integration when supported
- Optional Git initialization and dependency installation
- Safe target-directory checks with
--forcesupport
- Node.js 20+ to run this CLI package (generated Node.js projects target Node.js 18+ via their
engines.nodefield) - npm, pnpm, yarn, or bun available if you want the tool to install dependencies automatically
- Git installed if you want the tool to initialize a repository
npm install -g @bquery/setupThen run either binary:
create-bquery my-appor:
bquery-setup my-appnpx --package @bquery/setup create-bquery my-appRun the CLI without --yes to use the guided setup wizard:
create-bqueryYou will be asked for:
- project name
- template
- runtime
- package manager
- bundler selection for Node.js projects
- Tailwind CSS preference when available
- Git initialization
- dependency installation
- final confirmation
When you use the interactive wizard, the prompt flow decides the template, runtime, package manager, bundler, Tailwind, Git, and install settings. CLI flags for those options are only applied in non-interactive mode with --yes. Without --yes, a provided [project-name] is used only as the initial project-name value in the prompt.
Use --yes to skip prompts and rely on CLI flags and defaults:
create-bquery my-app --yesExample with explicit configuration:
create-bquery my-app \
--yes \
--template full \
--runtime node \
--pm pnpm \
--vite \
--tailwind \
--git \
--installcreate-bquery [project-name] [options]| Argument | Description |
|---|---|
[project-name] |
Optional target folder name. Defaults to my-bquery-app in non-interactive mode. |
| Option | Description | When omitted with --yes |
|---|---|---|
-t, --template <type> |
Template type: full or minimal |
full |
-r, --runtime <type> |
Runtime: node, bun, or deno |
node |
-p, --pm <type> |
Package manager: npm, pnpm, yarn, or bun |
npm |
--vite |
Force Vite bundler on for Node.js projects | full + node resolves to Vite |
--no-vite |
Force Vite bundler off | minimal + node, bun, and deno resolve to no bundler |
--tailwind |
Enable Tailwind CSS when supported | false |
--no-tailwind |
Disable Tailwind CSS | - |
--git |
Initialize a Git repository | true |
--no-git |
Skip Git initialization | - |
--install |
Install dependencies after scaffolding | true |
--no-install |
Skip dependency installation | - |
-f, --force |
Clear an existing target directory before scaffolding | false |
-y, --yes |
Skip prompts and use defaults/flags directly | false |
--version |
Print the CLI version | - |
--help |
Show help output | - |
Defaults in this table apply to non-interactive mode with --yes. Without --yes, the interactive prompt flow asks you to choose these values instead.
The CLI applies a few rules so generated projects stay consistent.
full: geared toward a richer project setup and defaults to Vite on Node.jsminimal: a smaller TypeScript scaffold and defaults to no bundler
node: supports either Vite or no bundlerbun: always uses no external bundlerdeno: always uses no external bundler
- Vite is only relevant for Node.js projects
- Bun and Deno skip the bundler step because they already have built-in tooling
- In non-interactive mode:
full + nodedefaults toviteminimal + nodedefaults tononebunanddenoalways resolve tonone
Tailwind is only enabled when the interactive flow would offer it:
- any full template
- any project using Vite
That means --tailwind is ignored for unsupported combinations such as:
minimal + node + --no-viteminimal + bunminimal + deno
The CLI supports npm, pnpm, yarn, and bun.
In the interactive wizard, Bun is shown as the recommended first choice when the selected runtime is Bun.
| Runtime | Template | Bundler | Tailwind available |
|---|---|---|---|
| Node.js | full | Vite by default, can be disabled | Yes |
| Node.js | minimal | None by default, Vite optional | Yes, when Vite is enabled |
| Bun | full | None | Yes |
| Bun | minimal | None | No |
| Deno | full | None | Yes |
| Deno | minimal | None | No |
Every scaffolded project includes:
package.jsontsconfig.json.gitignoreREADME.mdsrc/entry file
Depending on the selected options, it may also include:
vite.config.tsindex.htmltailwind.config.jspostcss.config.jssrc/styles.css
- Vite projects use
src/main.ts - All other setups use
src/index.ts
The generated package.json scripts depend on the runtime and whether Vite/Tailwind are enabled.
dev— runsvitebuild— runstsc && vite buildpreview— runsvite previewtest— runsvitestlint— runstsc --noEmitbuild:css— runstailwindcss -i src/styles.css -o dist/styles.csswhen Tailwind is enabled
dev— runsts-node src/index.ts(orts-node --esm src/index.tswhen Tailwind is enabled)build— runstscstart— runsnode dist/index.jslint— runstsc --noEmitbuild:css— runstailwindcss -i src/styles.css -o dist/styles.csswhen Tailwind is enabled
dev— runsbun run --watch src/index.tsstart— runsbun run src/index.tsbuild— runsbun build src/index.ts --outdir disttest— runsbun testbuild:css— runstailwindcss -i src/styles.css -o dist/styles.csswhen Tailwind is enabled
dev— runsdeno run --watch src/index.tsstart— runsdeno run src/index.tstest— runsdeno testbuild:css— runstailwindcss -i src/styles.css -o dist/styles.csswhen Tailwind is enabled
Deno projects do not include a build script.
Project names must:
- be a single folder name
- not contain path separators
- not be
.or.. - start with a lowercase letter or digit
- only use lowercase letters, digits,
.,-, or_ - not use reserved names such as
node_modulesorfavicon.ico
create-bquery my-web-app --yes --template full --runtime node --pm pnpm --vite --tailwindcreate-bquery my-service --yes --template minimal --runtime node --no-vitecreate-bquery my-bun-app --yes --runtime bun --pm buncreate-bquery my-deno-app --yes --runtime deno --no-installIf you choose --no-install, install dependencies yourself:
cd my-app
npm install
npm run devThe exact install and dev command shown by the CLI depends on your selected package manager.
To work on this CLI itself:
npm install
npm run typecheck
npm test
npm run buildAvailable scripts in this repository:
npm run dev— watch and rebuild the CLI withtsupnpm run typecheck— run TypeScript checking without emitnpm test— run the Vitest suitenpm run build— build the CLI intodist/
- The CLI writes files into a project directory inside your current working directory.
- Existing non-empty target directories are rejected unless you pass
--force. - If package installation or Git initialization fails, scaffolding still completes and the CLI prints the next steps you can run manually.