neat_cli 🧼

version PR's Welcome Twitter Follow

Dart VS Code Insiders

A sample cli to create clean architecture flutter projects with bloc


Features

  • x create new flutter project
  • x create new feature with model and entity
  • x generate (usecases, repository, dataresources) from abstract class
  • make bloc
  • make entity, model from resources
  • auto import dependencies

Getting Started 🚀

Install ⬇️

Activate globally via:

dart pub global activate neat_cli

If you want to use the model,entity generator using api resources or json schema you need to install quicktype

npm install -g quicktype

Usage

# Show usage help
$ neat_cli --help

# Update package
$ neat_cli update

# Create a new flutter project
$ neat_cli create my_app

# Show CLI version
$ neat_cli --version

# Shwo command usage help
$ neat_cli help create
# Or
$ neat_cli create -h

# Create new feature "post"
$ neat_cli feature post

# Create new feature "post" and generate model and entity using api/json schema
$ neat_cli feature post -e entity.json -m https://jsonplaceholder.typicode.com/posts

# Generate files from abstract repository
$ neat_cli settle -f post -r post_repository

Soon

# Make new bloc inside of a feature
$ neat_cli make bloc -f post

# Make entity inside of a feature
$ neat_cli make entity -f post --schema file.json

# Make model inside of feature
$ neat_cli make model -f post --schema https://jsonplaceholder.typicode.com/posts