ezps
v0.2.1
Published
A deterministic, config-driven project scaffolding engine for the JavaScript ecosystem
Downloads
311
Maintainers
Readme
EZPS
Easy Peasy Setup for JavaScript projects.
EZPS clones a template, processes it using a validated configuration, replaces variables safely, and prepares your project in a predictable way.
Features
- Zero global install (
npx ezps). - Template-based scaffolding.
- Safe variable replacement (
{{EZPS_*}}). - File removal support.
- File content clearing.
- Strict config validation via
Zod. - Safe path restrictions (no
..orabsolutepaths). - Smart GitHub username detection from Git config.
Installation
npm i -g ezpsOr run without installing globally:
npx -y ezpsUsage
Initialize Config
Generate a template config:
ezps initOr manually create:
.ezps.jsonTemplate
Interactive Mode
Run without providing a template name to select one from the available options:
ezps templateEZPS will prompt you to choose a template.
Direct CLI Mode
Pass the template name directly to skip the selection prompt:
ezps template [template-name]Example:
ezps template ts-libIf the template name is invalid or not found, EZPS will automatically fall back to interactive mode and prompt you to choose from available templates
Configuration
npx ezps initOr
Include config file template:
.ezps.jsonExample .ezps.json
{
"packageManager": "pnpm",
"remove": ["README.md", "docs/**"],
"clear": ["CHANGELOG.md"],
"replace": ["package.json", "src/**/*.ts"]
}Configuration Options
Required
| Key | Type | Description |
| ---------------- | --------------------------- | ------------------------------------------------ |
| packageManager | "npm" \| "yarn" \| "pnpm" | Package manager used for dependency installation |
Optional
| Key | Type | Description |
| --------- | ---------- | ----------------------------------------------------- |
| remove | string[] | File paths or glob patterns to delete |
| clear | string[] | Files to empty (content truncated but file preserved) |
| replace | string[] | Files where EZPS variables should be replaced |
Path Safety Rules
EZPS blocks unsafe paths:
- ❌ Absolute paths (
/etc/passwd,C:\Windows) - ❌ Parent traversal (
../) - ✅ Relative safe paths only
Variable Replacement
EZPS replaces variables in files defined in replace.
Supported Variables
| Variable | Description |
| -------------------------- | ------------------------------------------- |
| {{EZPS_PROJECT_NAME}} | Sanitized npm package name |
| {{EZPS_DISPLAY_NAME}} | Human-readable project name |
| {{EZPS_GITHUB_USERNAME}} | GitHub username (auto-detected or prompted) |
Ignore Replacement
You can prevent replacement inside a file using:
Ignore Single Line
// ezps-ignore
const name = '{{EZPS_PROJECT_NAME}}';Ignore Block
// ezps-ignore-start
const template = '{{EZPS_PROJECT_NAME}}';
// ezps-ignore-endEverything inside the block is preserved.
Directory Handling
If current directory is not empty, EZPS will:
- Ask for confirmation
- Validate project name
- Ask for display name
- Detect GitHub username (or prompt)
- Clear directory safely
Designed For
- Open source template authors
- Internal engineering scaffolds
- Opinionated monorepos
- JavaScript library starters
- CLI boilerplates
