Scaffoldfy Documentation
Welcome to the official documentation for @pixpilot/scaffoldfy (formerly scaffoldfy) - a flexible and powerful template initialization utility for automating project setup, cleanup, and configuration tasks.
🚀 Quick Start
New to Scaffoldfy? Start here:
- Quick Reference - Essential commands and examples to get started in minutes
- Getting Started Guide - Detailed installation and setup instructions
- Task Types Reference - Learn about all available task types
📚 Documentation Sections
Getting Started
Fast-track guide with essential commands, examples, and common patterns
Installation, CLI usage, and programmatic API examples
Core Concepts
Complete reference for all built-in task types: write, update-json, copy, delete, exec, and more
Collect user input with various prompt types (text, select, confirm, multiselect, password)
Define reusable values without user interaction - great for computed values
Quick syntax reference for all prompt types
Advanced Features
Conditional execution, variables, and Handlebars templates
Extend and compose configs for code reuse and better organization
Advanced templating with conditionals, loops, and custom helpers
Create custom task types and lifecycle hooks to extend functionality
Execute local or remote script files with multiple runtimes and variable interpolation
Preview changes with detailed diffs before applying them
References
Default values and configuration for executable tasks
💡 Features at a Glance
✅ Configuration Inheritance - Extend base configurations for code reuse
✅ Dry-Run Mode with Diff - Preview exact changes before applying
✅ Plugin System - Create custom task types and lifecycle hooks
✅ Interactive Prompts - Collect user input with 5 prompt types
✅ JSON/TypeScript Config - Define tasks in JSON or TypeScript files
✅ Task Dependencies - Ensure tasks run in the correct order
✅ Type-Safe - Full TypeScript support with JSON schema validation
✅ Template Variables - Use `` syntax for dynamic configuration
✅ Handlebars Support - Advanced templating with conditionals, loops, and helpers
✅ CLI & Programmatic - Use as a command-line tool or import as a library
🎯 Common Use Cases
Setting up a new project? → Getting Started Guide + Task Types Reference
Need user input? → Interactive Prompts + Prompts Cheat Sheet
Need dynamic values without user input? → Variables
Building complex templates? → Configuration Inheritance + Handlebars Templates
Want to preview changes first? → Dry Run Mode
Extending with custom functionality? → Plugin System
Using conditional logic? → Advanced Features Guide
🚀 Installation
# Install globally for CLI usage
npm install -g @pixpilot/scaffoldfy
# Or install locally in your project
npm install --save-dev @pixpilot/scaffoldfy
⚡ Quick Example
{
"$schema": "https://unpkg.com/@pixpilot/scaffoldfy/schema",
"prompts": [
{
"id": "projectName",
"type": "input",
"message": "Project name",
"required": true
}
],
"tasks": [
{
"id": "create-readme",
"name": "Create README",
"type": "write",
"config": {
"file": "README.md",
"template": "# \n\nA new project."
}
},
{
"id": "init-git",
"name": "Initialize Git",
"type": "git-init"
}
]
}
Run it:
scaffoldfy --config config.json --dry-run
🤝 Contributing
Found an issue or want to improve the docs? Contributions are welcome!
📄 License
MIT License - see the LICENSE file for details.