Skip to content

๐Ÿš€ `bootstrap`

Bootstrap a new Holocron-based project by updating key metadata in a project directory, such as the name, description, and internal config references.

๐Ÿงช Usage

holocron bootstrap [filepath] [--name <name>] [--description <description>]

๐Ÿงพ Description

This command walks you through updating a project template (like cli-template, react-template, etc.) by replacing template variables in key files such as:

  • README.md
  • package.json
  • tsconfig.json
  • vite.config.ts
  • .changeset/config.json
  • and others depending on the template type

It can determine the project name from the Git remote or package.json, and prompts for anything not passed via options.

๐Ÿ“˜ Positional Arguments

ArgumentDescription
filepath(Optional) Path to the project directory

โš™๏ธ Options

OptionDescriptionType
--nameName of the project (used in replacements)string
--descriptionDescription of the projectstring

๐Ÿง  Behavior

  • Prompts for name and description if not provided via CLI flags.
  • Uses .git/config to extract the repo name as a fallback default.
  • Infers template type from the package.jsonโ€™s name field.
  • Replaces all instances of the template type in config files with the new name.
  • Special handling for cli-template: also updates .env and src/cli.ts with a constant-cased name.

๐Ÿ’ก Examples

Terminal window
# Bootstrap from current directory with prompts
holocron bootstrap
# Bootstrap with all values provided
holocron bootstrap ./apps/docs --name docs --description "Documentation site"

๐Ÿงต Return Codes

  • 0 โ€” Success, bootstrap completed.
  • 1 โ€” Failure, e.g. project not found or invalid path.