create-colonel
v1.2.3
Published
Scaffold a new Colonel app from the command line.
Readme
create-colonel
Scaffold a new Colonel app from the command line.
Why Users Like It
- scaffolds a working app with practical defaults
- includes middleware and validation-ready patterns out of the box
- keeps generated structure aligned with docs and framework conventions
- supports a simple default flow plus optional
--skip-install
Usage
bunx create-colonel my-appOptional flag:
bunx create-colonel my-app --skip-installTemplate source flags:
bunx create-colonel my-app --template-ref mainbunx create-colonel my-app --template-tarball-url https://codeload.github.com/gwhitdev/colonel-framework/tar.gz/mainFramework dependency selection behavior:
- Default uses npm package
@coloneldev/framework@latest. - Override with
--framework-version, for example:
bunx create-colonel my-app --framework-version ^1.1.9Telemetry flags:
bunx create-colonel my-app \
--telemetry yes \
--telemetry-endpoint https://colonel-telemetery.vercel.app/api/ingestBy default, when telemetry consent is yes, create-colonel uses the public provisioning endpoint to fetch app credentials automatically.
Optional secure provisioning override:
bunx create-colonel my-app \
--telemetry yes \
--telemetry-endpoint https://colonel-telemetery.vercel.app/api/ingest \
--telemetry-provision-endpoint https://colonel-telemetery.vercel.app/api/provision-app \
--telemetry-provision-token <token>When telemetry is enabled and provisioning succeeds, the scaffolded .env receives:
COLONEL_TELEMETRY_ENABLEDCOLONEL_TELEMETRY_ENDPOINTCOLONEL_TELEMETRY_APP_IDCOLONEL_TELEMETRY_KEY
Regardless of telemetry consent, create-colonel sends a lightweight scaffold-created ping so telemetry can maintain:
- total app scaffolds
- total telemetry opt-outs
When telemetry consent is yes, create-colonel prints links to:
- telemetry privacy notice (
/privacy) - telemetry opt-out page (
/opt-out)
Use --skip-install when you only want scaffolded files and prefer to install dependencies later.
Then run your new app:
cd my-app
bun run startWhat It Does
- Fetches the app template tarball from the
colonel-frameworkrepository. - Extracts scaffold source files from the tarball into a new folder.
- Uses
packages/create-colonel/templatewhen present, otherwise falls back toexamples/web. - Sets the generated
package.jsonname from the folder name. - Installs dependencies automatically.
- Prints next-step commands.
Requirements
- Bun installed on your machine.
- Network access to fetch the template tarball.
@coloneldev/frameworkpublished and available on npm.
Local Development
From this monorepo, you can run the generator directly:
bun packages/create-colonel/src/cli.ts my-appWhen run inside this repository, the CLI auto-links the local framework package for easier development.
Tests
There are no dedicated automated tests for this package yet.
Recommended smoke test from repository root:
rm -rf /tmp/colonel-smoke && bun packages/create-colonel/src/cli.ts /tmp/colonel-smoke
cd /tmp/colonel-smoke
bun run startPublishing
cd packages/create-colonel
npm publish --access publicPackage: create-colonel
