Generate customized installation scripts for Umbraco CMS projects
Live Demo Β· Documentation Β· Report Bug Β· Request Feature
Package Script Writer helps Umbraco developers quickly generate installation scripts for new projects. Available as both a web application and a CLI tool, you can choose the interface that fits your workflow!
Web Application - Visit psw.codeshare.co.uk for a visual, browser-based experience
CLI Tool - Install psw as a .NET global tool for terminal-based automation
Simply select your template, choose packages, configure your settings, and get a ready-to-run script!
Perfect for:
- π Quick project setup
- π₯ Team onboarding
- π Training and tutorials
- π Consistent project configurations
- π€ CI/CD automation (CLI)
- Template Selection - Choose from Umbraco official templates and community packages
- Package Browser - Browse 150+ packages from the Umbraco Marketplace
- Version Control - Select specific package versions or use latest
- Unattended Install - Pre-configure database and admin credentials
- Docker Support - Optional Dockerfile and Docker Compose generation
- Shareable URLs - All configuration encoded in the URL for easy sharing
- Multiple Formats - Generate multi-line scripts or one-liners
- Syntax Highlighting - Clean, readable output with syntax highlighting
- Swagger/OpenAPI - Interactive API documentation with Swagger UI
- Visit psw.codeshare.co.uk
- Select your Umbraco template and version
- Choose any packages you want to include
- Configure your project settings
- Click "Generate" and copy your script!
Example Output:
# Ensure we have the version specific Umbraco templates
dotnet new install Umbraco.Templates::14.3.0 --force
# Create solution/project
dotnet new sln --name "MySolution"
dotnet new umbraco --force -n "MyProject" --development-database-type SQLite
dotnet sln add "MyProject"
#Add Packages
dotnet add "MyProject" package Umbraco.Community.BlockPreview --version 1.6.0
dotnet run --project "MyProject"Prerequisites: .NET 10.0 SDK
# Clone the repository
git clone https://github.com/prjseal/Package-Script-Writer.git
cd Package-Script-Writer
# Run the application
dotnet watch run --project ./src/PSW/
# Open browser to https://localhost:5001That's it! No database setup required - the application is completely stateless.
Package Script Writer CLI (psw) is a powerful command-line interface that brings the full functionality of PSW to your terminal!
- π¨ Beautiful Terminal UI - Built with Spectre.Console for rich interactive experience
- π Dual Mode - Interactive prompts OR command-line flags for automation
- π― Template Selection - Choose from Umbraco official & community templates
- π¦ Browse 150+ Packages - Search and select from the Umbraco Marketplace
- π Resilient - Automatic retry logic with exponential backoff
- π Verbose Logging - Detailed diagnostics with Serilog
- π€ CI/CD Ready - Perfect for automation and scripts
# Install as a global .NET tool
dotnet tool install --global PackageScriptWriter.Cli --prerelease
# Run from anywhere
pswInteractive Mode:
# Launch interactive prompts
pswCLI Mode:
# Generate default script
psw --default
# Custom script with packages
psw -p "uSync,Diplo.GodMode" -n MyProject
# Full automation with unattended install
psw -p "uSync|17.0.0" -n MyProject -s --solution-name MySolution \
-u --database-type SQLite --admin-email [email protected] \
--admin-password "SecurePass123!" --auto-runπ Full CLI Documentation: src/PackageCliTool/README.md
Includes:
- Complete installation guide
- All command-line flags and options
- Interactive workflow walkthrough
- Code architecture and structure
- Troubleshooting and logging
- Development guide
Comprehensive documentation is available in the .github/ directory:
| Document | Description |
|---|---|
| Documentation Index | Main documentation hub with overview |
| Architecture | System architecture and design patterns |
| Process Flows | Visual diagrams of all processes |
| Services | Business logic layer documentation |
| API Reference | Complete REST API documentation |
| Frontend | JavaScript and UI architecture |
| Data Models | All data structures and models |
| Configuration | Settings and configuration guide |
| Security | Security measures and best practices |
| Development Guide | Setup, testing, and contributing |
| Testing Guide | Integration tests, API testing, and CI/CD |
Start here: π Read the Documentation
- Framework: ASP.NET Core 10.0
- Language: C# 13
- Frontend: Razor Pages + Vanilla JavaScript
- UI: Bootstrap 5
- Caching: In-memory (IMemoryCache)
- APIs: NuGet.org, Umbraco Marketplace
- Documentation: Swagger/OpenAPI (Swashbuckle)
- Testing: xUnit, FluentAssertions, ASP.NET Core Testing
- CI/CD: GitHub Actions
Why no database? The application is intentionally stateless for simplicity, security, and easy deployment.
We welcome contributions! Here's how to get started:
- Raise an issue - For bugs or features, create an issue first
- Discuss - Let's agree on the approach before coding
- Fork & branch - Fork the repo and create a feature branch
- Code - Make your changes following our code style
- Test - Test your changes thoroughly
- Submit PR - Create a pull request with clear description
See the Development Guide for detailed contributing instructions.
# Run with hot reload
dotnet watch run --project ./src/PSW/
# Run integration tests
dotnet test
# Build for production
dotnet publish ./src/PSW/PSW.csproj -c Release -o ./publish
# Format code
dotnet format ./src/PSW/PSW.csprojThe project includes comprehensive integration tests that validate all API endpoints using xUnit, HttpClient, and FluentAssertions.
# Run all integration tests
dotnet test
# Run tests with detailed output
dotnet test --verbosity normal
# Run tests with code coverage
dotnet test --collect:"XPlat Code Coverage"Test Coverage:
- β Script generation with various configurations
- β Package version retrieval
- β Cache clearing functionality
- β API health checks
- β Error handling and validation
See Integration Tests README for detailed testing documentation.
Every pull request automatically runs all tests via GitHub Actions:
- π Automated test execution on all PRs
- β Build verification across multiple environments
- π Test result reporting
- π« PR merge blocked if tests fail
GitHub Actions Workflow: .github/workflows/integration-tests.yml
The easiest way to explore and test the API is through the built-in Swagger UI:
# Start the application
dotnet watch run --project ./src/PSW/
# Open your browser to:
https://localhost:5001/api/docsSwagger UI provides:
- π Interactive API documentation with OpenAPI annotations
- π§ͺ Built-in request testing
- π Request/response examples
- π Schema exploration
- π Complete API specification
The repository includes a Api Request/API Testing.http file for testing with the REST Client VS Code extension.
# Start the application
dotnet watch run --project ./src/PSW/
# Open Api Request/API Testing.http in VS Code
# Click "Send Request" above each endpointSee API Reference for complete endpoint documentation.
Package-Script-Writer/
βββ src/
β βββ PSW/ # Main web application
β β βββ Components/ # View Components
β β βββ Controllers/ # MVC & API Controllers
β β βββ Services/ # Business logic
β β βββ Models/ # Data models
β β βββ Views/ # Razor views
β β βββ wwwroot/ # Static files (CSS, JS, images)
β βββ PackageCliTool/ # CLI tool (.NET Global Tool)
β β βββ Configuration/ # API configuration
β β βββ Services/ # API client & package selection
β β βββ Workflows/ # CLI & interactive modes
β β βββ UI/ # Terminal UI components
β β βββ Models/ # DTOs and options
β β βββ Logging/ # Serilog setup
β β βββ Program.cs # Entry point
β βββ PSW.IntegrationTests/ # Integration test project
β βββ ScriptGeneratorApiTests.cs
β βββ CustomWebApplicationFactory.cs
βββ .github/
β βββ workflows/ # GitHub Actions workflows
β βββ *.md # Documentation
βββ README.md # This file
See Architecture for detailed structure.
The application implements multiple security measures:
- β Security Headers - X-Frame-Options, CSP, etc.
- β HTTPS/HSTS - Forced HTTPS connections
- β Input Validation - Client and server-side
- β No Data Storage - Stateless, no user data stored
- β Regular Updates - Dependencies kept current
See Security for complete security documentation.
Port already in use:
# Run on different port
dotnet run --urls "https://localhost:5555"Certificate errors:
# Trust development certificate
dotnet dev-certs https --trustCache issues:
# Clear cache via API
curl https://localhost:5001/api/scriptgeneratorapi/clearcacheSee Development Guide for more solutions.
This project is licensed under the MIT License - see the LICENSE file for details.
Paul Seal
- Website: codeshare.co.uk
- Twitter: @codeshare
- GitHub: @prjseal
- Umbraco Community - For the amazing CMS and package ecosystem
- Microsoft - For ASP.NET Core and .NET
- Contributors - Everyone who has contributed to this project
- Live Site: psw.codeshare.co.uk
- Documentation: Technical Documentation
- Issues: GitHub Issues
- Umbraco: docs.umbraco.com
- Marketplace: marketplace.umbraco.com
β If this project helps you, consider giving it a star! β
Made with β€οΈ for the Umbraco Community