cli_core 0.0.2-dev.1 copy "cli_core: ^0.0.2-dev.1" to clipboard
cli_core: ^0.0.2-dev.1 copied to clipboard

A shared utility package for CLI operations in Flutter Forge packages, providing utilities for CLI commands, Flutter project management, Melos workspace management, and file operations.

CLI Core #

pub package License: MIT

A shared utility package for CLI operations in Flutter Forge packages.

Installation 💻 #

Add this to your package's pubspec.yaml file:

dependencies:
  cli_core: ^0.0.2-dev.1
copied to clipboard

Features ✨ #

  • 🚀 Base CLI command infrastructure with progress tracking
  • 📱 Flutter project creation and management utilities
  • 📦 Melos workspace management utilities
  • 🔧 File system utilities for common operations

Usage 📖 #

Command Infrastructure #

import 'package:cli_core/cli_core.dart';

// Using Flutter commands
class MyFlutterCommand extends BaseFlutterCommand {
  Future<void> execute(HookContext context) async {
    await createFlutterProject(
      context: context,
      name: 'my_app',
      description: 'My Flutter application',
      outputPath: 'path/to/output',
    );
  }
}
copied to clipboard

Melos Commands #

// Using Melos commands
class MyMelosCommand extends BaseMelosCommand {
  Future<void> execute(HookContext context) async {
    await bootstrap(
      context: context,
      workspacePath: 'path/to/workspace',
    );
  }
}
copied to clipboard

File Operations #

// Using file utilities
Future<void> fileOperations() async {
  // Create directories
  await FileUtils.ensureDirectory('path/to/dir');
  
  // Write YAML files
  await FileUtils.writeYamlFile('config.yaml', 'content: value');
  
  // Read YAML files
  final content = await FileUtils.readYamlFile('config.yaml');
  
  // Copy files
  await FileUtils.copyFile('source.txt', 'dest.txt');
  
  // Check for mono-repo
  final isMonoRepo = await FileUtils.isMonoRepo();
}
copied to clipboard

Contributing 🤝 #

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License ⚖️ #

This project is licensed under the MIT License - see the LICENSE file for details.

1
likes
0
points
192
downloads

Publisher

verified publisherdart.nonstopio.com

Weekly Downloads

2024.09.24 - 2025.04.08

A shared utility package for CLI operations in Flutter Forge packages, providing utilities for CLI commands, Flutter project management, Melos workspace management, and file operations.

Homepage
Repository (GitHub)
View/report issues

Topics

#cli #utilities #melos #flutter

Documentation

Documentation

License

unknown (license)

Dependencies

mason, mason_logger, meta, path, universal_io

More

Packages that depend on cli_core