very_good_cli 0.8.2 copy "very_good_cli: ^0.8.2" to clipboard
very_good_cli: ^0.8.2 copied to clipboard

A Very Good Command-Line Interface for Dart created by Very Good Ventures.

Very Good CLI #

Very Good Ventures

Developed with 💙 by Very Good Ventures 🦄

ci coverage pub package style: very good analysis License: MIT


A Very Good Command-Line Interface for Dart.

Installing #

dart pub global activate very_good_cli

Commands #

very_good create #

Create a very good project in seconds based on the provided template. The Very Good Core template is used by default.

Very Good Create

Creates a new very good project in the specified directory.

Usage: very_good create <project name>
-h, --help                    Print this usage information.
-o, --output-directory        The desired output directory when creating a new project.
    --desc                    The description for this new project.
                              (defaults to "A Very Good Project created by Very Good CLI.")
    --executable-name         Used by the dart_cli template, the CLI executable name (defaults to the project name)
    --org-name                The organization for this new project.
                              (defaults to "com.example.verygoodcore")
-t, --template                The template used to generate this new project.

          [core] (default)    Generate a Very Good Flutter application.
          [dart_cli]          Generate a Very Good Dart CLI application.
          [dart_pkg]          Generate a reusable Dart package.
          [docs_site]         Generate a Very Good documentation site.
          [flutter_pkg]       Generate a reusable Flutter package.
          [flutter_plugin]    Generate a reusable Flutter plugin.

    --android                 The plugin supports the Android platform.
                              (defaults to "true")
    --ios                     The plugin supports the iOS platform.
                              (defaults to "true")
    --web                     The plugin supports the Web platform.
                              (defaults to "true")
    --linux                   The plugin supports the Linux platform.
                              (defaults to "true")
    --macos                   The plugin supports the macOS platform.
                              (defaults to "true")
    --windows                 The plugin supports the Windows platform.
                              (defaults to "true")

Usage

# Create a new Flutter app named my_app
very_good create my_app --desc "My new Flutter app"

# Create a new Flutter app named my_app with a custom org
very_good create my_app --desc "My new Flutter app" --org "com.custom.org"

# Create a new Flutter package named my_flutter_package
very_good create my_flutter_package -t flutter_pkg --desc "My new Flutter package"

# Create a new Dart package named my_dart_package
very_good create my_dart_package -t dart_pkg --desc "My new Dart package"

# Create a new Dart CLI application named my_dart_cli
very_good create my_dart_cli -t dart_cli --desc "My new Dart CLI package"

# Create a new Dart CLI application named my_dart_cli with a custom executable name
very_good create my_dart_cli -t dart_cli --desc "My new Dart CLI package" --executable-name my_executable_name

# Create a new Flutter plugin named my_flutter_plugin (all platforms enabled)
very_good create my_flutter_plugin -t flutter_plugin --desc "My new Flutter plugin"

# Create a new Flutter plugin named my_flutter_plugin (some platforms disabled)
very_good create my_flutter_plugin -t flutter_plugin --desc "My new Flutter plugin" --windows false --macos false --linux false

What's Included in Very Good Core? 📦 #

Out of the box, Very Good Core includes:

✅  Cross Platform Support - Built-in support for iOS, Android, Web, and Windows (MacOS/Linux coming soon!)

✅  Build Flavors - Multiple flavor support for development, staging, and production

✅  Internationalization Support - Internationalization support using synthetic code generation to streamline the development process

✅  Sound Null-Safety - No more null-dereference exceptions at runtime. Develop with a sound, static type system.

✅  Bloc - Integrated bloc architecture for scalable, testable code which offers a clear separation between business logic and presentation

✅  Testing - Unit and Widget Tests with 100% line coverage (Integration Tests coming soon!)

✅  Logging - Built-in, extensible logging to capture uncaught Flutter and Dart Exceptions

✅  Very Good Analysis - Strict Lint Rules which are used at Very Good Ventures

✅  Continuous Integration - Lint, format, test, and enforce code coverage using GitHub Actions

* Learn more at Flutter Starter App: Very Good Core & CLI


very_good packages get #

Get packages in a Dart or Flutter project.

# Install packages in the current directory
very_good packages get

# Install packages in ./some/other/directory
very_good packages get ./some/other/directory

# Install packages recursively
very_good packages get --recursive

# Install packages recursively (shorthand)
very_good packages get -r

Complete Usage

Get packages in a Dart or Flutter project.

Usage: very_good packages get [arguments]
-h, --help         Print this usage information.
-r, --recursive    Install dependencies recursively for all nested packages.

Run "very_good help" to see global options.

very_good test #

Run tests in a Dart or Flutter project.

# Run all tests
very_good test

# Run all tests and collect coverage
very_good test --coverage

# Run all tests and enforce 100% coverage
very_good test --coverage --min-coverage 100

# Run only tests in ./some/other/directory
very_good test ./some/other/directory

# Run tests recursively
very_good test --recursive

# Run tests recursively (shorthand)
very_good test -r

Complete Usage

Run tests in a Dart or Flutter project.

Usage: very_good test [arguments]
-h, --help                            Print this usage information.
    --coverage                        Whether to collect coverage information.
-r, --recursive                       Run tests recursively for all nested packages.
    --[no-]optimization               Whether to apply optimizations for test performance.
                                      (defaults to on)
    --exclude-coverage                A glob which will be used to exclude files that match from the coverage.
-x, --exclude-tags                    Run only tests that do not have the specified tags.
    --min-coverage                    Whether to enforce a minimum coverage percentage.
    --test-randomize-ordering-seed    The seed to randomize the execution order of test cases within test files.
    --update-goldens                  Whether "matchesGoldenFile()" calls within your test methods should update the golden files.

Run "very_good help" to see global options.

Tests without pub install

Unlike flutter test, very_good test will always run your tests without installing the projects dependencies (i.e. --no-pub flag).

This is an optimization done by the cli because dependency installation is usually run once after cloning the repository. Conversely, running tests locally is usually done many times and it's often unnecessary to re-install dependencies prior to each test run.

If you need to install dependencies before running the tests with very_good_cli, be sure to run very_good packages get first.

very_good --help #

See the complete list of commands and usage information.

🦄 A Very Good Command-Line Interface

Usage: very_good <command> [arguments]

Global options:
-h, --help           Print this usage information.
    --version        Print the current version.
    --analytics      Toggle anonymous usage statistics.

          [false]    Disable anonymous usage statistics
          [true]     Enable anonymous usage statistics

Available commands:
  create     very_good create <output directory>
             Creates a new very good project in the specified directory.
  packages   Command for managing packages.
  test       Run tests in a Dart or Flutter project.

Run "very_good help <command>" for more information about a command.