Flutter-CLI-Tool

module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: MIT

README

fca (Go)

CLI that scaffolds feature-first Clean Architecture for Flutter.

Formerly flutter-clean-arch. Single static binary for macOS, Windows, and Linux — no Node.js or Dart required to install the CLI.

Install

Full guide: docs/DISTRIBUTION.md

Option A — download binary (no Go needed)
  1. Open GitHub → Releases for this repo
  2. Download the archive for your OS:
Platform File
macOS Apple Silicon fca_*_darwin_arm64.tar.gz
macOS Intel fca_*_darwin_x86_64.tar.gz
Linux x86_64 fca_*_linux_x86_64.tar.gz
Linux ARM64 fca_*_linux_arm64.tar.gz
Windows fca_*_windows_x86_64.zip
  1. Extract and put fca (or .exe) on your PATH

macOS / Linux one-liner (after you publish a release):

curl -fsSL https://raw.githubusercontent.com/vishalsharma7nov/Flutter-CLI-Tool/master/scripts/install.sh \
  | bash
Option B — go install (needs Go 1.22+)
go install github.com/vishalsharma7nov/Flutter-CLI-Tool/cmd/fca@v1.1.0
# if the module proxy has not indexed the tag yet:
# GOPROXY=direct GOSUMDB=off go install github.com/vishalsharma7nov/Flutter-CLI-Tool/cmd/fca@v1.1.0

export PATH="$(go env GOPATH)/bin:$PATH"

fca version
# or: fca --version
Option C — build from source
git clone https://github.com/vishalsharma7nov/Flutter-CLI-Tool.git
cd Flutter-CLI-Tool
go build -o fca ./cmd/fca
./fca --help
Shell completion (optional)
# zsh
fca completion zsh > "${fpath[1]}/_fca"   # or: eval "$(fca completion zsh)"
# bash
fca completion bash > /usr/local/etc/bash_completion.d/fca
# fish
fca completion fish > ~/.config/fish/completions/fca.fish

Tab-completes commands, --state, --api, and feature names under lib/features/.

Commands

Group Command What it does
Project create <name> flutter create + Clean Architecture scaffold
init Scaffold into an existing Flutter project (interactive unless -y)
Generate feature <name> (f) Add a feature module (domain / data / presentation)
generate / g Micro-generators (entity, usecase, page, …)
preset auth Fuller auth feature (login, token stub, Dio Bearer interceptor)
Inspect list Inventory features under lib/features
doctor Check Flutter SDK + project / architecture status
version Print CLI version
Ops remove <feature> Delete a feature and attempt DI/route cleanup (--force skips confirm)
cicd Generate GitHub Actions CI workflow
fca create my_shop -s bloc --api http --org com.acme
cd existing_app && fca init -y -s riverpod --api grpc --install
fca feature profile
fca g entity User -f profile
fca preset auth
fca list
fca remove home --force
fca doctor --strict
Interactive prompts

Without -y, init asks for state and API. Accept:

  • Enter — keep default (* marked)
  • Number — e.g. 2
  • Name / unique prefix — e.g. bloc, bl, grpc, g
State management

bloc (default) · cubit · riverpod · provider · none

API / data service

http (default) · grpc · graphql · none

Generated layout

lib/
├── core/          # DI, errors, network, theme, usecase base
├── shared/
├── features/<name>/
│   ├── domain/    # entities, repository contracts, usecases
│   ├── data/      # models (DTOs), datasources, repository impls
│   └── presentation/  # pages, widgets, bloc|cubit|providers
├── app.dart
└── main.dart

Dependency rule: presentation → domain ← data
Domain stays pure Dart (no Flutter imports).

Develop

make test          # go test + go vet
make staticcheck   # optional static analysis
go build -o fca ./cmd/fca
make release-local   # all OS binaries → dist/

See docs/ARCHITECTURE.md, docs/DISTRIBUTION.md, and docs/THEME.md.

License

MIT

Directories

Path Synopsis
cmd
fca command
internal
ui
Package ui provides a research-backed terminal theme for the CLI.
Package ui provides a research-backed terminal theme for the CLI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL