templetor_cli 1.0.0
templetor_cli: ^1.0.0 copied to clipboard
A CLI tool to bootstrap Flutter projects from a local template directory, handling dynamic name and organization replacement.
Templetor CLI #
A command-line tool to bootstrap Flutter projects from a local template directory, handling dynamic name and organization replacement.
Installation #
Activate the CLI from pub.dev:
dart pub global activate templetor_cli
Usage #
Run the create command to generate a new project. You must provide the project name and the path to your template directory.
templetor_cli create <project_name> --template-path /path/to/your/template
Options #
-
--org: Specify the organization. Defaults tocom.example.templetor_cli create my_app --org com.mycompany --template-path /path/to/template -
--template-path(Required): The local path to your template project folder.
How it Works #
The CLI performs the following steps:
- Creates a fresh Flutter project using
flutter create. - Deletes the default
libandtestdirectories. - Recursively copies files from your template directory to the new project.
- During the copy process, it dynamically replaces placeholders in the files:
chess_ai_tutoris replaced with your<project_name>.com.example.chess_ai_tutoris replaced with your organization and project name.- CamelCase and PascalCase versions (
chessAiTutor,ChessAiTutor) are also handled.