๐ `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
Argument | Description |
---|---|
filepath | (Optional) Path to the project directory |
โ๏ธ Options
Option | Description | Type |
---|---|---|
--name | Name of the project (used in replacements) | string |
--description | Description of the project | string |
๐ง Behavior
- Prompts for
name
anddescription
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
โsname
field. - Replaces all instances of the template type in config files with the new name.
- Special handling for
cli-template
: also updates.env
andsrc/cli.ts
with a constant-cased name.
๐ก Examples
# Bootstrap from current directory with promptsholocron bootstrap
# Bootstrap with all values providedholocron bootstrap ./apps/docs --name docs --description "Documentation site"
๐งต Return Codes
0
โ Success, bootstrap completed.1
โ Failure, e.g. project not found or invalid path.