DEV Community

Milan K Jain
Milan K Jain

Posted on

Building AppForge: A Unified Project Scaffolding CLI for Modern Development

As developers, we've become accustomed to powerful tooling that helps us get started quickly.

If you've worked with React, you've probably used Create React App in the past or Vite today. Angular provides its own CLI that can generate an entire application with a single command. These tools remove the repetitive work of creating folders, configuring build tools, installing dependencies, and setting up project structures.

However, while working on backend projects, I noticed something interesting.

Although there are excellent framework-specific tools such as Express Generator, Nest CLI, and Fastify CLI, I often found myself switching between different tools depending on the project I was building. Each framework had its own setup process, structure, and commands.

That observation led me to a simple question:

What if there was a single CLI that could scaffold projects across different technologies while providing a consistent developer experience?

That idea became AppForge.

The Problem

Starting a new project often involves repeating the same setup tasks:

  • Creating a project structure
  • Installing dependencies
  • Configuring TypeScript
  • Creating scripts in package.json
  • Setting up Express
  • Configuring development environments
  • Creating boilerplate files

These tasks aren't difficult, but they are repetitive.

Even with existing framework generators, developers often need to remember different commands for different technologies.

For example:

npm create vite@latest
Enter fullscreen mode Exit fullscreen mode
nest new my-app
Enter fullscreen mode Exit fullscreen mode
npx express-generator
Enter fullscreen mode Exit fullscreen mode

Each tool solves a specific problem, but there isn't always a unified workflow.

Introducing AppForge

AppForge is a project scaffolding CLI designed to simplify project creation through a single interface.

The current version focuses on Node.js applications using Express.

Features include:

  • Interactive command-line experience
  • Node.js project generation
  • JavaScript support
  • TypeScript support
  • Automatic dependency installation
  • Ready-to-run Express application
  • Standardized project structure

Using AppForge is straightforward:

npx @milankj/appforge
Enter fullscreen mode Exit fullscreen mode

The CLI then guides you through a few simple prompts:

Application Name: my-api
Application Type: Node
Language: TypeScript
Enter fullscreen mode Exit fullscreen mode

Once complete, the project is generated, dependencies are installed, and the application is ready to run.

Under the Hood

AppForge is built using:

  • Node.js
  • TypeScript
  • Inquirer
  • fs-extra

The CLI works by selecting a predefined template, copying it into a new project directory, updating project-specific values, and installing dependencies automatically.

The current structure follows a template-based approach:

templates/
└── node/
    ├── javascript/
    └── typescript/
Enter fullscreen mode Exit fullscreen mode

This architecture makes it easy to add new templates and technologies in future releases.

What I Learned

Building AppForge turned out to be a valuable learning experience.

Some of the topics I explored included:

Node.js CLI Development

Learning how npm packages expose executable commands through the bin field and how global CLI tools work.

ESM and Modern TypeScript

Working with modern Node.js module systems, including:

  • ES Modules
  • NodeNext
  • Import resolution
  • Runtime compatibility

npm Package Publishing

Publishing a package involves more than simply running npm publish.

I gained hands-on experience with:

  • Package versioning
  • Dependency management
  • Scoped packages
  • npm distribution
  • CLI packaging

Project Scaffolding Patterns

I also learned how many popular tools approach project generation using templates and file generation strategies.

Future Plans

The current version is only the beginning.

Planned improvements include:

Additional Backend Frameworks

  • Fastify
  • NestJS
  • Additional API templates

Frontend Support

  • React
  • Angular
  • Additional frontend frameworks

Advanced Configuration

  • Database selection
  • Authentication templates
  • Docker support
  • Environment configuration

Template Versioning

Maintaining templates through proper versioning and update strategies to ensure generated projects stay current.

Why Open Source Developer Tools Matter

One of the things I enjoy most about software development is building tools that improve developer productivity.

Many of the frameworks and libraries we use every day exist because someone identified a repetitive problem and decided to automate it.

AppForge is a small step in that direction.

While the current version is focused on Node.js and Express, the long-term goal is to create a flexible and extensible project generation platform that provides a consistent experience regardless of the technology stack being used.

Try AppForge

You can install and run AppForge directly from npm:

npx appforge-toolkit
Enter fullscreen mode Exit fullscreen mode

npm package:

NPM Package Link
Feedback, ideas, and feature suggestions are always welcome.

Building tools for developers is one of the best ways to learn, and AppForge has already taught me a great deal about Node.js, TypeScript, package publishing, and developer tooling. I'm excited to continue improving it and expanding its capabilities in future releases.

Top comments (0)