An opinionated base template for creating quick CLI tools with Bun and TypeScript and a few helpful utilities. Bunpack also includes a detailed Beginner's Publishing guide on how to publish your npm package/cli.
This requires Bun to be installed because it is used as the bundler and ts runner.
Project repo: bunpack
bun create bunpack@latestbun create bunpack@latest [project-name] [options]project-name can be a single segment (my-cli) or a relative path under the current directory (./pkgs/my-cli). Use . only in an empty directory to scaffold into the current folder.
| Flag | Description |
|---|---|
-y, --yes |
Skip all default prompts; install deps, init git, template author |
--da, -da |
Template author only; skip author prompts (-y implies this) |
--git / --no-git |
Initialize or skip git |
--install / --no-install |
Install or skip dependencies |
--repo |
Git remote URL (GitHub/GitLab, same rules as interactive); adds origin, sets main, pushes; requires git init |
--cursor |
Open the project in Cursor after creation |
--vscode |
Open the project in VS Code after creation |
-h, --help |
Show help |
-v, --version |
Show version |
Run bunx create-bunpack --help for the same details in the terminal.
| Command | |
|---|---|
bun create bunpack my-cli |
Interactive prompts (location, author, install, git, …) |
bun create bunpack my-cli -y |
Defaults only: install, git, template author (no author prompts) |
bun create bunpack miks -y --repo=https://github.com/you/miks.git |
Scaffold, then push to that remote (https:// or git@...) |
bun create bunpack ./pkgs/my-cli -y |
Nested folder under cwd; same non-interactive defaults as -y |
bun create bunpack my-cli --cursor --git |
Create, init git, open in Cursor |
bun create bunpack my-cli --no-install |
Create without installing dependencies |
| Command | Action |
|---|---|
bun --help |
Shows Bun’s CLI help |
bun run dev |
Run cli.ts (same as bun run cli.ts) |
bun run build |
Build the published CLI to ./dist/ |
- Website: ardastroid.com
- Email: hello@ardastroid.com
- GitHub: @ardzero
MIT License
Copyright (c) 2026 Ard Astroid / Farhan Ashhab Nur
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
