Nonstop Logo

NonStop

Digital Product Development Experts for Startups & Enterprises

About | Website

🎉 Founded by Ajay Kumar 🎉**

🚀 NonStop CLI

⚡ Supercharge your Flutter development with mono-repo magic

pub package License Flutter


🎯 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
--defaults -y Skip the module picker and take the recommended set Prompt

📦 Template Options

Template 🎯 Description 📁 Structure Created
mono 🏢 Generate a full app skeleton in a mono-repo (default) App shell, design system, localization and the modules you pick
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

🧩 Modules

mono does not stop at empty folders. It asks which platform modules the app needs and generates them wired together - bootstrap order, DI registration, route table and all.

? Which modules should youtube start with?
❯ ◉  Network          - Dio client, auth + logging interceptors, typed errors
  ◉  Authentication   - Firebase Auth (email, Google, Apple) with route guards
  ◯  Cloud Firestore  - Firestore + Cloud Functions wiring and timestamp converters
  ◉  Push notifications
  ◉  Analytics
  ◉  Crash reporting
  ◉  Feature flags
  ◉  Developer tools
  ◉  Dashboard shell

Answer non-interactively with -y (recommended set) or per module:

nonstop create youtube -y --no-notifications --firestore

Two rules are applied for you, because the code will not compile otherwise: push notifications pull in network, and developer tools pull in feature_flags.

Every project also gets core, di, design_system, localization and utils - the pieces every app needs.

🏢 Create a mono-repo project
nonstop create youtube

This creates the following structure:

youtube/
├── 📱 apps/
│   └── youtube/          # bootstrap, router, splash - no business logic
├── 🧩 features/
│   ├── auth/             # Firebase Auth + route guards
│   └── dashboard/        # bottom-navigation shell
├── 📦 packages/
│   ├── core/             # logger, DI bootstrap, observers, error types
│   ├── design_system/    # Material 3 theme, components, toasts
│   ├── di/               # service locator
│   ├── localization/     # type-safe strings (i69n)
│   ├── network/          # Dio client and interceptors
│   ├── analytics/
│   ├── crashlytics/
│   ├── feature_flags/
│   ├── notifications/
│   ├── developer/
│   └── utils/
├── 🔌 plugins/
├── 📋 analysis_options.yaml
├── 📖 README.md
├── ⚙️ pubspec.yaml             native pub workspace + Melos scripts
└── 📄 pubspec.yaml

The generated workspace is bootstrapped and formatted, with offline unit and widget tests and a strict 100% executable-line coverage gate. Run its checks:

dart run melos run lint
dart run melos run coverage
cd apps/youtube
flutter run

Melos is a workspace dependency; no global Melos installation is needed. If you picked any Firebase module, run flutterfire configure in the app directory when you want those features live. Until then the app still runs; Firebase-backed modules are skipped at startup.

Template quality and architecture

The default mono template separates app composition, feature behavior and reusable adapters. SDK clients receive explicit dependencies, asynchronous startup is awaited, and disposable services own their subscriptions and error handlers. The generated docs/architecture.md explains the SOLID boundaries and how to extend them without coupling UI to infrastructure.

Every runtime package includes tests. dart run melos run coverage runs them, imports otherwise untested libraries, merges cross-package coverage and fails below 100% executable-line coverage of handwritten runtime Dart. Only generated .g.dart, .freezed.dart and .i69n.dart files are excluded; test, tooling and native platform code are outside this metric. Coverage does not prove every branch, platform integration or security property. Live Firebase, push delivery and backend authorization still need project-specific integration tests. The generated GitHub workflow checks formatting, analysis, coverage and a web build on Flutter 3.44.0.

Templates are bundled with the CLI release, not fetched from the registry at generation time. To change the default template, generate an app, implement and verify the change there, then port it into the brick and rebuild the bundle:

# From packages/nonstop_cli; requires Flutter 3.44.0 and Mason CLI.
dart pub get
mason bundle bricks/flutter_project_with_mono_repo -t dart -o lib/commands/create
dart format lib/commands/create/flutter_project_with_mono_repo_bundle.dart
dart test --exclude-tags version-verify
dart run tool/verify_template.dart full
dart run tool/verify_template.dart minimal

The contract suite checks the source/bundle match and parses all 512 module selections. End-to-end CI generates fresh full, default, minimal, auth-only, firestore-only and network-only workspaces and runs their real checks. The verification tool retains each temporary workspace for diagnosis.

📦 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
nonstop doctor output

🔄 update - Stay Current

Updates the NonStop CLI to the latest version automatically.

nonstop update

🚀 What it does:

  1. 🔍 Checks the current installed version
  2. 🌐 Compares with the latest version on pub.dev
  3. ⬆️ 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:

  1. 🐦 Ensure Flutter is installed correctly: Flutter Installation
  2. 🎯 Verify your Dart SDK installation: dart --version
  3. 🔧 Install Melos if missing: dart pub global activate melos

🚫 Template generation fails

If template generation fails:

  1. 🔐 Ensure you have proper permissions in the target directory
  2. ✅ Check if the project name is valid (should follow Dart package naming rules)
  3. 🔍 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

Stay connected and get the latest updates!

LinkedIn X.com Instagram YouTube Email


⭐ Star us on GitHub if this helped you!

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.