⚑ CaneGen CLI

A powerful, extensible CLI for generating clean, consistent firestore-synchronized model and utility classes for Flutter (Dart) projects β€” powered by Dart CLI


🧠 Overview

CaneGen is a universal model generator designed to make creating and maintaining firestore data models effortless and scalable.
It supports generating models from:

  • User-defined prompts in the terminal
  • Your Firestore database structure (auto-detects collections and fields) Feature under construction
  • Predefined templates for Dart, and more

CaneGen helps you stay consistent, type-safe, and DRY.


πŸš€ Features

  • πŸ”₯ Firestore-aware β€” introspect your database and auto-generate models Coming Soon
  • βš™οΈ CLI prompts β€” define model names and fields interactively
  • 🧩 Extensible β€” add new helpers or customize Service Classes
  • 🧱 Clean code output β€” follows idiomatic formatting for Dart
  • πŸͺ„ Optional methods β€” include computed getters (e.g., fullName)
  • πŸ“‚ Automatic file creation in your target directories

🧰 Installation

Dart / Flutter users (pub.flutter-io.cn)

dart pub global activate cane_gen

πŸ’» Usage

  • This tool is a Firestore model generator that generates models synced with your firestore collections and hence requires Firestore installed in your repository
  • In your terminal, type:
    cane_gen generate
    
  • Follow the prompts to create your Model and its corresponding Service Class.

Libraries

cane_gen