nonstop_cli 0.0.6
nonstop_cli: ^0.0.6 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 #
A command-line interface for Flutter that generates projects from predefined templates and helps manage the development environment.
Table of Contents #
Overview #
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.
Commands #
create #
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 |
Example: 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
Example: Create a Flutter package for a mono-repo
nonstop create core --template package
Example: Create a Flutter application for a mono-repo
nonstop create youtube_studio --template app -o ./apps
Example: Create with custom organization
nonstop create youtube_music --org-name com.youtube
Example: Create in a specific directory
nonstop create youtube -o ./projects
doctor #
Checks your development environment to ensure all required tools are installed and configured correctly.
nonstop doctor
The command analyzes your environment and reports on:
- Flutter installation and version
- Dart SDK installation and version
- Melos installation and version
For each tool, the doctor command indicates:
- ✓ Success: Tool is installed and working properly
- ⚠ Partial: Tool is installed but has issues
- ✗ Missing: Tool is not installed or not found
update #
Updates the NonStop CLI to the latest version.
nonstop update
The command:
- Checks the current installed version
- Compares it with the latest version available on pub.dev
- Updates to the latest version if needed
Example:
nonstop update
Common Workflows #
Setting up a new Flutter project with mono-repo #
# Check if your environment is properly set up
nonstop doctor
# Create a new Flutter project with mono-repo structure
nonstop create youtube
# Navigate to the project directory
cd youtube
Adding a new package to an existing mono-repo #
# Navigate to your mono-repo root
cd youtube/packages
# Create a new package
nonstop create core --template package
# Update dependencies
melos bootstrap
Adding a new app to an existing mono-repo #
# Create a new app in the apps directory
nonstop create youtube_studio --template app -o ./apps
# 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 #
The following options can be used with any command:
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 |
Contact #
Follow us, stay up to date or reach out on:
Aliases #
The NonStop CLI can be invoked using any of the following aliases:
nonstop
ns
nsio
These aliases provide flexibility in how you choose to run the CLI commands.
🚀 Founded by Ajay Kumar 🎉