clarc_arch_cli 0.1.4 copy "clarc_arch_cli: ^0.1.4" to clipboard
clarc_arch_cli: ^0.1.4 copied to clipboard

A CLI for scaffolding Flutter Clean Architecture projects, modules, and pages.

example/example.md

Clarc CLI example #

This example shows the usual flow for using clarc_arch_cli as a global Flutter scaffolding tool.

1. Activate the CLI #

dart pub global activate clarc_arch_cli

Make sure Dart's global pub executable directory is available in your PATH, then verify the command:

clarc --help

2. Create a Flutter project #

clarc create project my_app --org com.example

This runs Flutter project creation, adds Clarc's Clean Architecture structure, generates the default home feature, and writes the starter theme/router/DI files.

If your team uses FVM:

clarc create project my_app --flutter-cmd "fvm flutter"

If you want the CLI to detect FVM or Puro from project configuration:

clarc create project my_app --flutter-cmd auto

3. Add a feature module #

cd my_app
clarc create module auth

The command creates:

lib/features/auth/
  data/
  domain/
  presentation/

It also updates GoRouter routes, Get It registrations, and endpoint constants.

4. Add a page #

clarc create page auth login

This creates:

lib/features/auth/presentation/pages/login_page.dart

And registers the route:

/auth/login

5. Use the naming API #

Most users only need the CLI, but the public utility API can normalize names in the same way Clarc templates do:

import 'package:clarc_arch_cli/clarc.dart';

void main() {
  final names = Names('User Profile');

  print(names.snake); // user_profile
  print(names.pascal); // UserProfile
  print(names.camel); // userProfile
}

Safe regeneration #

Existing files are skipped by default. Use --force only when you intentionally want to overwrite generated files:

clarc create module auth --force
1
likes
160
points
47
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A CLI for scaffolding Flutter Clean Architecture projects, modules, and pages.

Repository (GitHub)
View/report issues

Topics

#cli #flutter #clean-architecture #scaffolding #bloc

License

MIT (license)

Dependencies

args, path

More

Packages that depend on clarc_arch_cli