A lightweight PowerShell utility that automates the creation of .p4ignore.txt and p4config.txt files for Unreal Engine projects using Perforce.
Perfect for solo developers and teams working across multiple streams, this script helps enforce clean workspace practices and prevent common Perforce mistakes — like checking in Intermediate/ or .vs/ folders.
- ✅ Automatically generates
.p4ignore.txtusing best practices for Unreal Engine, Visual Studio, and Git - ✅ Creates
p4config.txtwith stream-specific Perforce settings - ✅ Auto-detects
.uprojectfiles to validate setup - ✅ Prints current Perforce settings for verification
- 💥 Works across all local streams and folders
Setup-PerforceWorkspace-FULL.ps1: Interactive PowerShell script for bootstrapping new workspaces with clean ignore/config filessetup.bat: A simple launcher that runs the PowerShell script with one double-click
git clone https://github.com/yourusername/PerforceWorkspaceBootstrap.gitYou have two options:
Double-click setup.bat.
This launcher will:
- Check for the PowerShell script
- Run it with proper permissions (no admin required)
- Keep the window open after running so you can review the output
🔐 Safety Note: The .bat file only runs the script in this folder and does not make system changes.
.\Setup-PerforceWorkspace-FULL.ps1You’ll be prompted for:
- Workspace name (
P4CLIENT) - Path to your Unreal project folder
The script will then:
- Detect your
.uproject - Generate
.p4ignore.txtwith production-grade ignore rules - Generate
p4config.txtscoped to the current stream - Show your current
p4 setstate for sanity-checking
YourStream/
├── MyProject/
│ ├── MyProject.uproject
│ ├── .p4ignore.txt ✅
│ └── p4config.txt ✅
Perforce can easily choke on junk like Intermediate/, Saved/, and .vs/ folders. This tool ensures:
- Consistent workspace hygiene
- Clean check-ins
- No accidentally added binaries or cache files
- Auto-generate workspaces from client templates
- Auto-sync depot on success
- Cross-platform support with Bash/Zsh
- GUI front-end via WinForms
MIT — free to use, fork, and share. Attribution appreciated 🎓
Open an issue or ping @casulscrub — we're building clean pipelines one rooster at a time 🐓🔥