Professional generator tool for managing and updating WinGet package manifests with comprehensive monitoring and observability.
- Automated Package Processing: Streamlined workflow for updating WinGet package manifests
- GitHub Integration: Seamless integration with GitHub repositories and release management
- Multi-source Support: Handle packages from various sources and repositories
- Batch Processing: Efficiently process multiple packages simultaneously
- Manifest Generation: Automated generation of WinGet manifest files
- Structured Logging: JSON-formatted logs with correlation tracking
- Comprehensive Metrics: Performance monitoring with counters, gauges, and histograms
- Health Checks: Automated system health monitoring and alerting
- Progress Tracking: Real-time progress indicators with ETA calculation
- CLI Interface: Intuitive command-line interface with rich formatting
- Configuration Management: Flexible configuration with environment-specific settings
- Extensible Architecture: Plugin-friendly design for custom extensions
- Comprehensive Testing: Full test suite with unit, integration, and E2E tests
pip install winget-manifest-generator-tool
git clone https://github.com/TejasMate/WinGetManifestGeneratorTool.git
cd WinGetManifestGeneratorTool
pip install -e .
git clone https://github.com/TejasMate/WinGetManifestGeneratorTool.git
cd WinGetManifestGeneratorTool
make dev-setup
# Set up environment variables for GitHub tokens
cp .env.example .env
# Edit .env with your GitHub tokens
# Configuration is already set up in config/config.yaml
# Verify configuration
python -c "from src.config import get_config; print('Config loaded successfully')"
# Verify system health
wmat health
# Process specific packages
wmat process --packages Microsoft.VSCode --packages Microsoft.PowerToys
# Process all packages (dry run)
wmat process --dry-run
# Process with filtering
wmat process --filter github
# View system metrics
wmat metrics
# Export health report
wmat health --format json > health-report.json
The tool now provides a modern CLI interface for streamlined operations:
# Install the package
pip install -e .
# Check system health
wmat health
# Process packages with monitoring
wmat process --packages Microsoft.VSCode --dry-run
# View system metrics
wmat metrics
For users familiar with the original workflow, you can run the core scripts directly. The project workflow consists of three main steps:
python src/winget_automation/PackageProcessor.py
This analyzes all package manifests in the WinGet repository, extracts version patterns, and creates CSV files with package information.
export```
This checks GitHub repositories for the latest versions of packages and compares them with the versions in WinGet.
#### 3. Generate Update Commands
```bash
python src/winget_automation/KomacCommandsGenerator.py
This creates komac update commands for packages that have newer versions available on GitHub.
β Import Fix Applied: All scripts now work correctly with both direct execution and module imports.
You can enhance the legacy workflow with the new monitoring capabilities:
# Run with structured logging
PYTHONPATH=src python scripts/test_monitoring.py
# Process with configuration validation
python scripts/test_config.py
# Run the complete legacy workflow with monitoring
python examples/integration_demo.py
- Script Paths: Scripts moved from
src/
tosrc/winget_automation/
- Import Paths: Updated for new package structure
- Configuration: Enhanced YAML-based configuration system
- Monitoring: All operations now include comprehensive monitoring
- Backwards Compatibility: Original functionality preserved
WinGet Manifest Generator Tool
βββ CLI Interface (Rich formatting, Click-based)
βββ Configuration Management (YAML-based, environment-aware)
βββ Package Processing Engine
β βββ GitHub Integration
β βββ Release Detection
β βββ Manifest Generation
βββ Monitoring & Observability
β βββ Structured Logging (JSON, correlation IDs)
β βββ Metrics Collection (Prometheus-compatible)
β βββ Health Checks (System, API, Repository)
β βββ Progress Tracking (Real-time, ETA calculation)
βββ Utilities & Extensions
- User Guide - Configuration and usage instructions
- Legacy Migration Guide - Transition from original scripts
- API Documentation - Detailed API reference
- Development Guide - Contributing and development setup
- Examples - Code examples and integration patterns
- Python 3.8+
- Git
- Make (optional, for convenience commands)
# Clone repository
git clone https://github.com/TejasMate/WinGetManifestGeneratorTool.git
cd WinGetManifestGeneratorTool
# Setup development environment
make dev-setup
# Run tests
make test
# Run linting and formatting
make check
βββ src/winget_automation/ # Main package
β βββ cli.py # Command-line interface
β βββ config/ # Configuration management
β βββ monitoring/ # Monitoring and observability
β βββ github/ # GitHub integration
β βββ utils/ # Utility functions
βββ tests/ # Test suite
βββ docs/ # Documentation
βββ scripts/ # Development scripts
βββ examples/ # Usage examples
βββ config/ # Configuration files
make help # Show all available commands
make test # Run test suite
make lint # Run code linting
make format # Format code
make build # Build package
make clean # Clean build artifacts
make docs # Generate documentation
make demo # Run integration demo
The tool uses a unified YAML-based configuration system with environment variable support:
Create a .env
file in the project root to store sensitive configuration:
# Copy the example file
cp .env.example .env
# Edit with your values
nano .env
Example .env
file:
# GitHub API tokens (choose one method)
GITHUB_TOKEN=ghp_your_github_token_here
# OR multiple tokens for higher rate limits
GITHUB_TOKENS=ghp_token1,ghp_token2,ghp_token3
# Optional environment overrides
ENVIRONMENT=development
DEBUG=true
# config/config.yaml
github:
api_url: "https://api.github.com"
# Tokens loaded automatically from .env file
tokens: []
package_processing:
batch_size: 100
max_workers: 4
filtering:
blocked_packages:
- "package.identifier"
monitoring:
logging:
level: "INFO"
structured: true
Key Features:
- π Secure: Sensitive tokens stored in
.env
(not tracked by Git) - π Flexible: Environment-specific overrides
- β‘ Auto-loading:
.env
files loaded automatically on startup - π Multiple formats: Single token, multiple tokens, or individual variables
See Configuration Guide for detailed setup instructions.
from winget_automation.monitoring import get_logger
logger = get_logger(__name__)
logger.info("Processing package", package="Microsoft.VSCode", version="1.85.0")
from winget_automation.monitoring import get_metrics_collector, timer
metrics = get_metrics_collector()
metrics.increment_counter("packages.processed")
with timer("api_request_duration"):
# Your API call here
pass
# Check system health
wmat health
# Programmatic health checks
from winget_automation.monitoring import check_all_health
health_results = check_all_health()
# Start development environment
docker-compose up winget-automation
# Run with monitoring
docker-compose up
# Build production image
docker build --target production -t winget-automation .
# Run container
docker run -v $(pwd)/config:/app/config winget-automation wmat health
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and add tests
- Run the test suite:
make test
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Microsoft WinGet team for the package manager
- GitHub for excellent API and platform support
- Python community for amazing libraries and tools
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: docs/