nonstop_cli 0.0.7+3
nonstop_cli: ^0.0.7+3 copied to clipboard
A command-line interface for the Flutter Framework to generate Flutter projects, features and schemas.
NonStop
Digital Product Development Experts for Startups & Enterprises
π NonStop CLI
β‘ Supercharge your Flutter development with mono-repo magic
π― What is NonStop CLI? #
The NonStop CLI simplifies Flutter project setup and management, with a focus on mono-repository structures using Melos. It provides standardized templates, validation tools for your development environment, and ongoing updates for the best experience.
π¨ Perfect for teams who want consistent project structure and streamlined development workflows
π Quick Start #
# Install NonStop CLI globally
dart pub global activate nonstop_cli
# Check your development environment
nonstop doctor
# Create your first mono-repo project
nonstop create my_awesome_app
# Navigate and start coding!
cd my_awesome_app
π Commands #
ποΈ create
- Project Generator #
Creates a new Flutter project based on predefined templates.
nonstop create <project-name> [arguments]
π§ Arguments
Argument | Alias | Description | Default |
---|---|---|---|
--template |
-t |
Type of project to create | mono |
--output-directory |
-o |
Output directory for the new project | Current directory |
--description |
--desc |
Description for the new project | "A Melos-managed project for mono-repo, created using NonStop CLI." |
--org-name |
--org |
Organization name for the new project | com.example |
--application-id |
Bundle identifier on iOS or application id on Android | <org-name>.<project-name> |
π¦ Template Options
Template | π― Description | π Structure Created |
---|---|---|
mono |
π’ Generate a Flutter application along with mono-repo (default) | Complete mono-repo structure with apps, features, packages, and plugins |
package |
π¦ Generate a Flutter package for a Melos-managed mono-repo | Flutter package compatible with mono-repo structure |
app |
π± Generate a Flutter application for a Melos-managed mono-repo | Flutter application configured for mono-repo structure |
plugin |
π Generate a Flutter plugin for a Melos-managed mono-repo | Flutter plugin compatible with mono-repo structure |
π‘ Examples
π’ Create a mono-repo project
nonstop create youtube
This creates the following structure:
youtube/
βββ π± apps/
β βββ youtube/
βββ π§© features/
βββ π¦ packages/
βββ π plugins/
βββ π analysis_options.yaml
βββ π README.md
βββ βοΈ melos.yaml
βββ π pubspec.yaml
π¦ Create a Flutter package for a mono-repo
nonstop create core --template package
π± Create a Flutter application for a mono-repo
nonstop create youtube_studio --template app -o ./apps
π’ Create with custom organization
nonstop create youtube_music --org-name com.youtube
π Create in a specific directory
nonstop create youtube -o ./projects
π©Ί doctor
- Environment Checker #
Checks your development environment to ensure all required tools are installed and configured correctly.
nonstop doctor
π What it checks:
Tool | π Analysis |
---|---|
π¦ Flutter | Installation and version compatibility |
π― Dart SDK | Installation and version compatibility |
π§ Melos | Installation and version compatibility |
π Status Indicators:
- β Success: Tool is installed and working properly
- β οΈ Partial: Tool is installed but has issues
- β Missing: Tool is not installed or not found
π update
- Stay Current #
Updates the NonStop CLI to the latest version automatically.
nonstop update
π What it does:
- π Checks the current installed version
- π Compares with the latest version on pub.flutter-io.cn
- β¬οΈ Updates to the latest version if needed
π Common Workflows #
π Setting up a new Flutter project with mono-repo #
# 1οΈβ£ Check if your environment is properly set up
nonstop doctor
# 2οΈβ£ Create a new Flutter project with mono-repo structure
nonstop create youtube
# 3οΈβ£ Navigate to the project directory
cd youtube
# π You're ready to code!
π¦ Adding a new package to an existing mono-repo #
# 1οΈβ£ Navigate to your mono-repo root
cd youtube/packages
# 2οΈβ£ Create a new package
nonstop create core --template package
# 3οΈβ£ Update dependencies
melos bootstrap
π± Adding a new app to an existing mono-repo #
# 1οΈβ£ Create a new app in the apps directory
nonstop create youtube_studio --template app -o ./apps
# 2οΈβ£ Update dependencies
melos bootstrap
π οΈ Troubleshooting #
β CLI not found after installation #
Ensure the Dart SDK bin directory is in your PATH. Follow the instructions at: π Running a script from your PATH
β οΈ Doctor command shows issues #
If the doctor
command shows issues with your development environment:
- π¦ Ensure Flutter is installed correctly: Flutter Installation
- π― Verify your Dart SDK installation:
dart --version
- π§ Install Melos if missing:
dart pub global activate melos
π« Template generation fails #
If template generation fails:
- π Ensure you have proper permissions in the target directory
- β Check if the project name is valid (should follow Dart package naming rules)
- π Run with the
--verbose
flag to see detailed logs:nonstop create my_project --verbose
βοΈ Global Options #
Option | Alias | π Description |
---|---|---|
--version |
-v |
π Print the current version of the CLI |
--verbose |
π Enable verbose logging including all shell commands | |
--help |
-h |
β Display help information for commands |
π Command Aliases #
Choose your preferred way to invoke the CLI:
nonstop create my_app # Full command
ns create my_app # Short alias
nsio create my_app # Alternative alias
Alias | π Description |
---|---|
nonstop |
π― Full command name |
ns |
β‘ Quick shorthand |
nsio |
π Alternative short form |
π Connect with NonStop #
β Star us on GitHub if this helped you!
π License #
This project is licensed under the MIT License - see the LICENSE file for details.
π Founded by Ajay Kumar π**