templetor_cli 1.0.1
templetor_cli: ^1.0.1 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 bundled template, 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 only need to provide a project name.
templetor_cli create <project_name>
Options #
--org: Specify the organization. Defaults tocom.example.--description: The description for the new project. Defaults to "A new Flutter project.".
Example:
templetor_cli create my_app --org com.mycompany --description "My amazing new app."
How it Works #
The CLI now uses a template that is bundled with the tool itself.
- Creates a fresh Flutter project using
flutter createwith your specified project name, organization, and description. - Deletes the default
libandtestdirectories from the new project. - Locates the bundled template and reads its configuration from a
templetor.jsonfile to determine the placeholder name. - Recursively copies files from the bundled template directory to the new project.
- During the copy process, it dynamically replaces placeholders based on the template's configured name. It handles snake_case, camelCase, and PascalCase conversions.