Skip to main content
← Back to Projects
Dev Tools Prototype CLI tool

DevHubTools Automator

A small scaffolding CLI for Next.js, Express and Flask

A December 2025 prototype CLI: one command and five prompts write a starter Next.js, Express or Flask project with a Dockerfile and README.

Solo build

Node.jscliHandlebarsscaffoldingPrototype
01 / Problem

The problem

Every new service starts with the same setup work: a folder, a package.json or requirements.txt, a health route, a Dockerfile, a README. I wanted one command that writes that starting point the same way each time.

02 / Solution

What I built

DevHubTools Automator is a Node.js command-line prototype I built in December 2025. You run devhub create <app-name>, answer five prompts, and it writes a new folder with a starter project for one of three stacks: Next.js, a Node.js API on Express, or a Python app on Flask. Each project also gets a Dockerfile, a CI workflow file and a README with the install and run commands for that stack. Everything runs locally: there is no network call and no account.

03 / Demo

See it running

Demo coming

A recorded walkthrough of DevHubTools Automator is on the way. Until then, the write-up and the diagram below show how it works.

04 / Architecture

How it fits together

DevHubTools Automator

One command to a starter project

  1. devhub createCommander CLI on your machinebin/devhubcreate <app-name>
    parse command
  2. Five promptsInquirer in the terminalNext.js, Node or PythonDescription
    answers
  3. Template renderHandlebars + fs-extratemplates/<type>/templates/common/
    write files
  4. Project folder./<app-name> on local diskApp filesDockerfile, README
Everything runs locally in Node.js. No network, no installs: you run npm install or pip install yourself.
05 / Write-up

How it works

Commander registers the create command and Inquirer asks for the project type, a JavaScript or TypeScript variant, whether to include Docker and CI, and a short description. The answers, plus the app name and a flag for each stack, become the Handlebars context. The generator copies the chosen stack's template folder and then a shared folder into ./<app-name>, rendering every .hbs file on the way:

module.exports = {
  generate: async (appName, answers) => {
    const templatesRoot = path.join(__dirname, '..', '..', 'templates');
    const projectTemplateDir = path.join(templatesRoot, answers.projectType);
    const commonDir = path.join(templatesRoot, 'common');
    const targetDir = path.resolve(process.cwd(), appName);
    await fs.ensureDir(targetDir);

    if (await fs.pathExists(projectTemplateDir)) {
      await copyAndRenderTemplates(projectTemplateDir, targetDir, answers);
    }

    if (await fs.pathExists(commonDir)) {
      await copyAndRenderTemplates(commonDir, targetDir, answers);
    }

    return;
  }
};

Full file: src/generators/generator.js. The CLI only writes files; you run npm install or pip install yourself. In a test run in October 2026, the generated Express and Flask apps started and answered on /health, and the Next.js app built.

Stack: Node.js, Commander, Inquirer, Handlebars, fs-extra.

Status and links

This is a prototype and I have not changed it since December 2025. Known gaps, all visible in the code above or the templates:

  • The Docker and CI answers are ignored: the shared folder is always copied.
  • The TypeScript choice is ignored; every template is JavaScript.
  • The CI file is written to the project root instead of .github/workflows/, and its YAML does not parse.
  • The Next.js template has a lint script but no ESLint.
  • An existing folder is overwritten without a warning, and the app name is not validated.

It is not on npm: clone the repo, run npm install, then node bin/devhub create <app-name> (or npm link for a global devhub command). For free tools you can use in the browser, see the DevHubTools relaunch, a separate project.

Work with me

Need something like this built?

I build AI automations, agents and Salesforce solutions for teams. Tell me what you want to automate and I’ll tell you honestly whether it’s a fit.

Share
Discussion

Comments

Loading comments...

Add a comment

Comments are reviewed before they appear.