xdev_cli 1.0.8
xdev_cli: ^1.0.8 copied to clipboard
A powerful Flutter project generator CLI that helps developers quickly scaffold Flutter apps with clean architecture and folder structure.
Xdev CLI π #
XDev CLI is a developer-friendly command-line tool to streamline Flutter project development. Quickly scaffold projects, views, and services with built-in support for Provider state management and routing.
Features #
- Scaffold a new Flutter project with Provider, routing, and assets setup.
- Automatically generate new views with Provider and routing integration.
- Generate reusable service classes inside
core/services.
Installation #
- Make sure you have Dart SDK installed. You can check by running:
dart --version
- Install XDev CLI globally:
dart pub global activate xdev_cli
- Make sure Dartβs global executables are in your PATH:
export PATH="$PATH":"$HOME/.pub-cache/bin"
Usage #
1. Create a New Flutter Project #
Create a new Flutter project with Provider, routing, and assets set up:
xdev create project my_app
2. Navigate to Your Project #
cd my_app
3. Create a New View #
Generate a new view with its corresponding Provider/ViewModel and routing entry:
xdev create view dashboard
This will create:
lib/views/dashboard/
βββ dashboard_view.dart
βββ dashboard_view_model.dart
And automatically register the route in lib/routes.dart.
4. Create a New Service #
Generate a reusable service class inside core/services:
xdev create service api
This will create:
lib/core/services/api_service.dart
Example Project Structure #
After generating a project and a few views/services, your structure may look like this:
my_app/
βββ lib/
β βββ core/
β β βββ services/
β β βββ api_service.dart
β βββ views/
β β βββ dashboard/
β β βββ dashboard_view.dart
β β βββ dashboard_view_model.dart
β βββ main.dart
β βββ routes.dart
βββ pubspec.yaml
βββ README.md
Full CLI Command Reference #
| Command | Description |
|---|---|
xdev create project <name> |
Create a new Flutter project with Provider, routing, and assets setup |
xdev create view <name> |
Generate a new view and ViewModel with routing entry |
xdev create service <name> |
Generate a new reusable service class in core/services |
Example Workflow #
# Install XDev CLI
dart pub global activate xdev_cli
# Create a new project
xdev create project my_app
# Go to project directory
cd my_app
# Create a view
xdev create view dashboard
# Create a service
xdev create service api
# Run the app
flutter run
Contributing #
Contributions are welcome! Feel free to open issues or submit pull requests to improve XDev CLI.
License #
MIT License Β© 2025
This is a **full, beginner-friendly guide** that includes installation, usage, project structure, commands, and workflowβall in one file.
If you want, I can also **add screenshots or ASCII diagrams** to make it visually appealing for GitHub. Do you want me to do that?