CLI Package
Scaffolding CLI. Downloads, renames, and configures Catalyzer projects.
Published to npm as create-catalyzer. Downloads the latest source, renames all identifiers to match your project, configures Android and iOS packaging, inits git, and optionally installs dependencies.
Usage
npm create catalyzer@latestThe CLI runs in interactive mode by default. You can also pass flags for CI or scripted setups:
npm create catalyzer@latest --name <your-project-name> --github-user <your-github-username> --no-install --no-git| Flag | Description |
|---|---|
-n, --name <name> | Project name |
-d, --directory <dir> | Output directory (defaults to ./<name>) |
-i, --identifier <id> | App identifier, reverse-domain (defaults to com.<name>.app) |
-g, --github-user <user> | GitHub username or org |
-v, --app-version <ver> | Initial version (defaults to 0.1.0) |
--no-install | Skip pnpm install |
--no-git | Skip git init |
-b, --branch <branch> | Template branch to clone (defaults to master) |
Directory Structure
How It Works
The scaffold pipeline runs 6 steps in order:
import { downloadTemplate } from "giget";
import { TEMPLATE_SOURCE } from "../consts.js";
export async function cloneTemplate(
directory: string,
branch: string = "master",
): Promise<string> {
const { dir } = await downloadTemplate(`${TEMPLATE_SOURCE}#${branch}`, {
dir: directory,
force: true,
});
return dir;
}Downloads the source from github:odest/catalyzer using giget. The branch defaults to master but can be overridden with --branch. No git history is carried over.
Interactive Prompts
In interactive mode, the CLI asks these questions:
| Prompt | Default |
|---|---|
| Project name | — |
| App identifier (reverse-domain) | com.<project_name>.app |
| GitHub username / org | your-github-username |
| Initial version | 0.1.0 |
| Install dependencies? | Yes |
| Initialize a new git repository? | Yes |
After answering, a summary is shown and the user can confirm or re-enter their choices.
Build & Development
The CLI is built with tsup and published independently from the monorepo:
| Script | Command |
|---|---|
build | tsup (bundles to dist/index.js) |
dev | tsup --watch |
start | node ./dist/index.js |
test | vitest run |
The CLI version is auto-injected from package.json at build time via tsup.config.ts define, so it always stays in sync.
The CLI has its own version (vX.Y.Z) separate from the monorepo version. It's published to npm via the publish-cli.yml GitHub Actions workflow on new releases.