New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

clean-arch-cli

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clean-arch-cli

CLI tool for generating Clean Architecture folder structures for Flutter or Node projects.

latest
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

cleanarch

A CLI tool to quickly generate Clean Architecture folder structures for Flutter and Node.js projects.

Features

  • 🚀 Instantly scaffold a complete Clean Architecture structure
  • 📁 Generate feature modules with proper layer separation
  • 🎯 Configurable core folder generation
  • 🛠️ Simple CLI interface
  • ✨ Works with Flutter and Node.js projects

Installation

npm install -g cleanarch

Local Installation

npm install cleanarch --save-dev

Usage

Generate Base Structure

Create the basic Clean Architecture structure in your current directory:

cleanarch

Create a Feature Module

Generate a complete feature with all layers:

cleanarch --feature auth

This creates:

lib/
├── features/
│   └── auth/
│       ├── data/
│       │   ├── datasources/
│       │   │   ├── local/
│       │   │   └── remote/
│       │   ├── models/
│       │   └── repositories_impl/
│       ├── domain/
│       │   ├── entities/
│       │   ├── repositories/
│       │   ├── usecases/
│       │   └── value_objects/
│       └── presentation/
│           ├── pages/
│           │   ├── screens/
│           │   └── components/
│           ├── widgets/
│           ├── providers/
│           ├── controllers/
│           └── states/

Specify Custom Path

Generate the structure in a specific directory:

cleanarch --path ./my-project

Skip Core Folder

Generate structure without the core folder:

cleanarch --no-core

Options

OptionAliasDescriptionDefault
--feature <name>-fName of the feature to create-
--path <directory>-pBase directory for generationCurrent directory
--no-core-Skip creating core folderfalse
--version-VOutput version number-
--help-hDisplay help information-

Examples

Create Multiple Features

cleanarch --feature auth
cleanarch --feature products
cleanarch --feature cart

Create Feature in Custom Path

cleanarch --feature users --path ./backend/src

Generate Without Core

cleanarch --feature dashboard --no-core

Folder Structure

With Core (Default)

lib/
├── core/
│   ├── errors/
│   ├── usecases/
│   ├── utils/
│   └── constants/
└── features/

Without Core

lib/
└── features/

Clean Architecture Layers

The generated structure follows Clean Architecture principles with three main layers:

  • Data Layer: Handles data sources (local/remote), models, and repository implementations
  • Domain Layer: Contains business logic, entities, repositories interfaces, and use cases
  • Presentation Layer: Manages UI components, state management, and user interactions

Requirements

  • Node.js 14 or higher
  • npm or yarn

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Author

Nyasha A Hove

Repository

[https://github.com/asheckn/cleanarch]

Support

For issues and feature requests, please visit the issues page.

Made with ❤️ for Clean Architecture enthusiasts

Keywords

cli

FAQs

Package last updated on 15 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts