A CLI tool and automation system that scaffolds production-ready, standardized boilerplates for Next.js, Node.js, and Python projects, reducing initial setup from hours to seconds.
The core of the system is a Node.js CLI built with Commander.js. It interacts with a centralized repository of template files stored as a private Git submodule. This separation allows template updates independent of the CLI tool itself.
When a user runs npx devhub-tools create, the CLI presents an interactive menu (via Inquirer.js) for stack selection (Next.js, Node.js API, Python FastAPI), project name, and optional integrations (e.g., PostgreSQL, Redis, Sentry).
The selected template is cloned locally, and a custom templating engine (using Handlebars) processes all files, replacing placeholders with user-provided values. It also runs npm install or pip install based on the stack.
A post-generation script executes automatically. It runs the initial linting (eslint --fix), formats the code (prettier --write), and executes a basic test to verify the scaffolded project starts without errors. This final step provides immediate confidence that the boilerplate is functional.
The system is designed for zero-configuration use. A developer only needs Node.js installed; the CLI handles the rest, including cleaning up temporary files. For teams, environment variables for CI/CD can be pre-injected into the .env.example file based on the project type.

Loading comments...