avangcli
v1.0.16
Published
Master CLI for scaffolding fullstack projects with Next.js
Maintainers
Readme
AvangCLI
A powerful CLI tool for scaffolding fullstack projects with Next.js.
Website & Documentation: https://avangcli.vercel.app
Project Description
Avangcli is a comprehensive command-line interface tool designed to streamline the development workflow for modern fullstack applications. It provides an intuitive, interactive experience for generating and scaffolding production-ready projects with industry-standard configurations and best practices built-in.
Objectives
The main objectives of Avangcli are:
Accelerate Development: Reduce the time spent on project setup and boilerplate code by providing automated scaffolding for both frontend and backend projects.
Enforce Best Practices: Ensure projects start with proper structure, linting, formatting, and Docker configurations following industry standards.
Improve Developer Experience: Offer an interactive CLI with beautiful prompts and clear feedback, making project setup accessible for developers of all levels.
Maintain Consistency: Generate consistent project structures and module architectures across teams and projects.
Support Modern Tech Stack: Integrate the latest versions of Next.js and modern development tools with customizable configurations.
Enable Scalability: Create modular architectures that support the growth of applications from MVP to production-scale systems.
Team Members
This project is developed and maintained by:
- Claudia Queipo (@ClaudiaQueipo) - Full Stack Developer & Project Lead
- solyfaby (@solyfaby) - Collaborator
- ppit890819 (@ppit890819) - Collaborator
- Alejandro Yero (@IronBeardX) - Collaborator
- Luis Andrés Licea Berenguer (@luislicea1) - Collaborator
Features
- Interactive CLI with beautiful prompts
- Frontend: Next.js project setup with customizable configurations
- Module scaffolding: Automatic module generation for Next.js applications with complete folder structure and boilerplate code
- Backend: FastAPI project generation (coming soon)
- Package manager support: npm, yarn, pnpm, bun
- Linter/Formatter options: ESLint + Prettier, Biome
- Docker configuration: dev, prod, or both environments
- Command-line arguments support with yargs
Setup and Installation
Prerequisites
Before installing Avangcli, ensure you have the following installed on your system:
- Node.js 20+ - Required for frontend CLI and master CLI
- Bun (recommended) or npm/yarn/pnpm - Package manager
You can verify your installations with:
node --version # Should be 20.x or higher
bun --version # Or your preferred package managerInstallation from Source
To install Avangcli for development:
# Clone the repository
git clone <repository-url>
cd avangcli
# Install master CLI dependencies
bun install
# Install frontend CLI dependencies
cd frontend-cli && bun install && cd ..
# Or install all dependencies at once
bun run install:allGlobal Installation
npm install -g avangcli
# or
bun install -g avangcliUsage
Master CLI
The master CLI coordinates between frontend and backend CLIs:
avangcli frontend # Launch frontend CLI
avangcli backend # Launch backend CLIFrontend CLI
Initialize a new Next.js project
# Interactive mode
avangcli init
# With arguments
avangcli init my-app --pm bun --tailwind --lf biome --docker dev
# Options:
# --package-manager, --pm Package manager (npm, yarn, pnpm, bun)
# --tailwind, -t Use Tailwind CSS (boolean)
# --linter-formatter, --lf Linter setup (eslint-prettier, biome, none)
# --docker, -d Docker config (dev, prod, both, none)Note: Projects are created without the src/ directory by default to maintain a cleaner root structure.
Generate modules in existing Next.js projects
# Create a module with complete folder structure and boilerplate
avangcli module <module-name>
# Examples:
avangcli module user-profile
avangcli module shopping-cart
avangcli module authentication
# Skip Next.js validation (use with caution)
avangcli module my-module --skip-validationModule features:
- Validates Next.js project structure
- Creates consistent folder structure (components, containers, services, hooks, etc.)
- Generates TypeScript boilerplate with best practices
- Container component with React functional component
- Service class with singleton pattern
- Type definitions
- Barrel exports for clean imports
- Automatic detection of src/ directory
See Module Command Documentation for detailed usage.
Regenerate project configuration
# Regenerate avangclirc.json based on current project setup
avangcli configConfig features:
- Detects package manager (npm, yarn, pnpm, bun)
- Identifies Tailwind CSS usage
- Detects linter/formatter setup (ESLint + Prettier, Biome)
- Checks Docker configuration (dev, prod, both)
- Identifies UI library (MUI, Shadcn, HeroUI)
- Detects Git setup (Husky, Commitlint)
- Configures OpenAPI docs and output directories
Generate TypeScript clients from OpenAPI specs
# Generate clients using project configuration
avangcli generate
# With custom directories
avangcli generate --docs-dir ./api-docs --output-dir ./src/generated
# Options:
# --docs-dir, -d Directory containing OpenAPI JSON files
# --output-dir, -o Output directory for generated clientsGenerate features:
- Scans for OpenAPI JSON files in specified directory
- Generates TypeScript clients automatically
- Supports multiple API specifications
- Integrates with project configuration
- Runs config command if no configuration exists
Backend CLI (coming soon)
avangcli backend initDevelopment
# Run master CLI in dev mode
bun run dev
# Run frontend CLI directly
bun run dev:frontend
# Run backend CLI directly
bun run dev:backendProject Structure
avangcli/
├── bin/ # Executables
├── src/ # Master CLI logic
├── frontend-cli/ # Frontend CLI (independent)
├── backend-cli/ # Backend CLI (independent)
└── docs/ # DocumentationFor detailed structure information, see project-structure.md.
Additional Information
Technology Stack
Avangcli leverages modern technologies to provide a robust development experience:
Frontend CLI:
- Node.js - Runtime environment
- Next.js 15 - React framework with App Router and Server Components
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework (optional)
- ESLint + Prettier / Biome - Code quality and formatting tools
- Docker - Containerization for development and production
Backend CLI (Coming Soon):
- Python 3.8+ - Programming language
- FastAPI - Modern, fast web framework for building APIs
- Docker - Containerization support
CLI Tools:
- Yargs - Command-line argument parser
- @clack/prompts - Beautiful interactive CLI prompts
- Husky - Git hooks for code quality
- Lint-staged - Run linters on staged files
Project Architecture
Avangcli follows a modular architecture with three main components:
- Master CLI: Orchestrates the frontend and backend CLIs
- Frontend CLI: Independent CLI for Next.js project generation and module scaffolding
- Backend CLI: Independent CLI for FastAPI project generation (in development)
Each CLI is designed to work independently or as part of the unified Avangcli ecosystem.
Module Scaffolding Philosophy
The module generation feature follows best practices for scalable React/Next.js applications:
- Container/Component Pattern: Separates business logic from presentation
- Service Layer: Encapsulates API calls and business logic with singleton pattern
- Type Safety: Generates TypeScript definitions for all modules
- Barrel Exports: Clean import statements using index files
- Consistent Structure: Predictable folder organization across all modules
Contributing
Contributions are welcome! If you'd like to contribute to Avangcli:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes following conventional commits
- Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure your code passes all linting and formatting checks before submitting.
Support & Resources
- Website: https://avangcli.vercel.app
- Documentation: See the https://avangcli.vercel.app/en/docs website for detailed guides
- Issues: Report bugs or request features via GitHub Issues
License
ISC
