A PowerShell module for exporting comprehensive module command information in formats optimized for Large Language Model (LLM) consumption and training.
- Multiple Export Formats: JSON, Markdown, and XML support
- Parallel Processing: Leverages PowerShell jobs for improved performance
- Batch Processing: Export multiple modules simultaneously
- Streaming Support: Handle large datasets efficiently with streaming JSON
- Comprehensive Documentation: Captures synopsis, description, parameters, examples, and more
- Progress Tracking: Visual feedback during processing
- Error Recovery: Graceful handling of processing failures
- PowerShell 5.1 or later
- Windows PowerShell or PowerShell Core/7.x
Install-Module -Name Export-ModuleInfoForLLM -Scope CurrentUser
# Clone the repository
git clone https://github.com/Warezloder/Export-ModuleInfoForLLM.git
# Import the module
Import-Module .\Export-ModuleInfoForLLM\Export-ModuleInfoForLLM.psd1
# Export to JSON (default)
Export-ModuleCommandsForLLM -ModuleName "Microsoft.PowerShell.Management" `
-OutputDirectory "C:\Exports" `
-FileName "Management-Commands"
# Export to Markdown for documentation
Export-ModuleCommandsForLLM -ModuleName "Microsoft.PowerShell.Utility" `
-OutputDirectory "C:\Exports" `
-FileName "Utility-Docs" `
-Format "Markdown"
# Export multiple modules in parallel
$modules = @("Microsoft.PowerShell.Management", "Microsoft.PowerShell.Utility")
Start-ParallelModuleExport -ModuleNames $modules `
-OutputDirectory "C:\Exports" `
-Format "JSON"
# Check if a module is available before export
if (Test-ModuleAvailability -ModuleName "VMware.VimAutomation.Core") {
Export-ModuleCommandsForLLM -ModuleName "VMware.VimAutomation.Core" `
-OutputDirectory "C:\Exports" `
-FileName "VMware-Core"
}
For modules with hundreds of commands, use streaming to reduce memory usage:
Export-ModuleCommandsForLLM -ModuleName "LargeModule" `
-OutputDirectory "C:\Exports" `
-FileName "Large-Module" `
-UseStreaming `
-MaxConcurrentJobs 16
# Export all VMware modules
Get-Module -ListAvailable -Name "VMware*" |
Select-Object -ExpandProperty Name |
Start-ParallelModuleExport -OutputDirectory "C:\VMwareExports" `
-Format "Markdown" `
-MaxConcurrentModules 5
# Use the batch export script for pattern matching
.\Scripts\Export-MultipleModules.ps1 -ModulePattern "Microsoft.PowerShell.*" `
-OutputDirectory ".\Exports" `
-Format "JSON" `
-MaxConcurrent 3
Parameter | Type | Description | Default |
---|---|---|---|
ModuleName | String | Module to export | Required |
OutputDirectory | String | Output location | Required |
FileName | String | Output filename (without extension) | Required |
Format | String | Export format (JSON/Markdown/XML) | JSON |
MaxConcurrentJobs | Int | Parallel job limit | 8 |
UseStreaming | Switch | Enable streaming for large datasets | False |
SkipProgressBar | Switch | Disable progress display | False |
- MaxConcurrentJobs: Adjust based on system resources (default: 8)
- MaxConcurrentModules: For batch exports (default: 3)
- UseStreaming: Enable for modules with 100+ commands
- SkipProgressBar: Disable progress for automated scenarios
Run the test suite:
# Run all tests
Invoke-Pester -Path .\Tests
# Run with code coverage
Invoke-Pester -Path .\Tests -CodeCoverage .\Public\*.ps1, .\Private\*.ps1
Structured data ideal for programmatic consumption and LLM training:
- Comprehensive command metadata
- Nested parameter information
- Formatted examples with code blocks
Human-readable documentation with proper formatting:
- GitHub-compatible markdown
- Syntax highlighting for code examples
- Hierarchical command organization
PowerShell's native serialization format:
- Complete object serialization
- Import with
Import-Clixml
Please see CONTRIBUTING.md for development setup and guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
For bugs, feature requests, or questions:
- Open an issue on GitHub Issues
- Check existing issues before creating a new one
- PowerShell community for best practices and standards
- Contributors and testers
- Add support for custom output templates
- Implement caching for improved performance
- Add support for remote module analysis
- Create GUI for interactive exports
- Add export scheduling capabilities
Note: This module is designed for documentation and LLM training purposes. Always review exported data for sensitive information before sharing.