Overview
A type-safe Dart package for reading, writing, and modifying pubspec.yaml files. It preserves comments, out-of-spec content, and formatting, ensuring safe and reliable dependency management. Ideal for tools that programmatically update Flutter or Dart project configurations without losing metadata or structure. The API is designed to handle real-world pubspec files with complex layouts and non-standard entries.
Use cases
- Automated dependency updates
- CI/CD pipeline configuration
- Project scaffolding tools
- Code generation workflows
- Dependency version management
Key features
- Preserves comments and formatting
- Handles out-of-spec content
- Type-safe API
- Safe modification of pubspec.yaml
- Supports all major platforms
Suitable for
- CLI tools for Flutter projects
- Build automation scripts
- IDE extensions
- Package maintainers
- Developer tooling
Considerations
- Requires careful handling of nested structures
- May need updates for new pubspec syntax
- Not intended for direct end-user use
- Limited to pubspec.yaml manipulation
- Depends on accurate input parsing