diff --git a/packages/create-gen-app/README.md b/packages/create-gen-app/README.md index 48d834bd..5aa96641 100644 --- a/packages/create-gen-app/README.md +++ b/packages/create-gen-app/README.md @@ -16,133 +16,124 @@

-A TypeScript library for cloning and customizing template repositories with variable replacement. +A TypeScript-first CLI/library for cloning template repositories, asking the user for variables, and generating a new project with sensible defaults. ## Features -- Clone GitHub repositories or any git URL -- Extract template variables from filenames and file contents using `__VARIABLE__` syntax -- Load custom questions from `.questions.json` or `.questions.js` files -- Interactive prompts using inquirerer with CLI argument support -- Stream-based file processing for efficient variable replacement +- Clone any Git repo (or GitHub `org/repo` shorthand) and optionally select a branch + subdirectory +- Extract template variables from filenames and file contents using the safer `____VARIABLE____` convention +- Merge auto-discovered variables with `.questions.{json,js}` (questions win, including `ignore` patterns) +- Interactive prompts powered by `inquirerer`, with CLI flag overrides (`--VAR value`) and non-TTY mode for CI +- Built-in CLI (`create-gen-app` / `cga`) that discovers templates, prompts once, and writes output safely +- License scaffolding: choose from MIT, Apache-2.0, ISC, GPL-3.0, BSD-3-Clause, Unlicense, or MPL-2.0 and generate a populated `LICENSE` ## Installation ```bash npm install create-gen-app +# or for CLI only +npm install -g create-gen-app ``` -## Usage +## CLI Usage -### Basic Usage +```bash +# interactively pick a template from launchql/pgpm-boilerplates +create-gen-app --output ./workspace + +# short alias +cga --template module --branch main --output ./module \ + --USERFULLNAME "Jane Dev" --USEREMAIL jane@example.com + +# point to a different repo/branch/path +cga --repo github:my-org/my-templates --branch release \ + --path ./templates --template api --output ./api +``` + +Key flags: + +- `--repo`, `--branch`, `--path` – choose the Git repo, branch/tag, and subdirectory that contains templates +- `--template` – folder inside `--path` (auto-prompted if omitted) +- `--output` – destination directory (defaults to `./