jarvis 0.0.7 copy "jarvis: ^0.0.7" to clipboard
jarvis: ^0.0.7 copied to clipboard

Command-line interface (CLI) for generating a Flutter project

Platform Pub Package Build Status
Codecov Coverage License: MIT

Jarvis Modularity Assistant #

Command-line interface (CLI) for generating a Flutter project

It prompts the user for input and then creates a Flutter project with the given specifications. The generated project will include a set of predefined modules, such as

  • Core
  • CoreUi
  • Data
  • Domain
  • Navigation (AutoRouter support, GoRouter support)

The user can also specify additional

  • Features
  • Flavors
  • Packages

The code uses the dcli and mason_logger packages for input/output handling and logging, respectively. It also relies on several custom classes (AppConstants, DirectoryService, FileService, Input, ScriptService, and Validator) for various tasks.

Getting Started #

Activate globally via:

dart pub global activate jarvis

Pub installs executables into $HOME/.pub-cache/bin If the one not in your path please add this command to your shell's config file (.bashrc, .bash_profile, etc.)

export PATH="$PATH":"$HOME/.pub-cache/bin"

Available Templates #

Jarvis supports 4 project templates:

  1. Standard (AutoRoute) - Traditional Flutter project with AutoRoute navigation
  2. Standard (GoRouter) - Traditional Flutter project with GoRouter navigation
  3. Jarvis 2.0 AutoRoute - Clean Architecture + Flutter Workspace + AutoRoute
  4. Jarvis 2.0 GoRouter - Clean Architecture + Flutter Workspace + GoRouter

Jarvis 2.0 Templates #

New Jarvis 2.0 templates feature:

  • Clean Architecture with strict layer separation
  • Flutter Workspace with 6 modular packages (core, core_ui, domain, data, features, navigation)
  • BLoC/Cubit state management pattern
  • Freezed models and DTOs
  • GetIt dependency injection
  • go_router ^17.0.1 or auto_route navigation
  • Flavours support (dev, staging, prod) with .run configs
  • ✅ Design tokens system for theming

Available Commands #

Create a new Flutter project with the following command:

jarvis create

create_project.gif


Create a new module with the following command:

jarvis module

create_module.gif


Create a new repository with the following command:

jarvis repository

create_repo.gif


Create a new use case with the following command:

jarvis usecase

create_usecase.gif


Create a new entity (with mapper and model) with the following command:

jarvis entity

create_entity.gif


Plugins #

This package is currently extended with the following plugins. Instructions on how to use them in your own application are linked below.

Plugin README
dcli https://pub.dev/packages/dcli
mason_logger https://pub.dev/packages/mason_logger
args https://pub.dev/packages/args
ko-fi
13
likes
140
points
201
downloads

Publisher

unverified uploader

Weekly Downloads

Command-line interface (CLI) for generating a Flutter project

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

archive, args, convert, dart_style, dcli, dio, equatable, get_it, json_ast, logger, mason_logger

More

Packages that depend on jarvis