A fully portable sandbox builder for the G4β’ automation ecosystem.
- One-line installation
- Overview
- Features
- Requirements
- Quick Start
- PowerShell Installation (macOS/Linux)
- Usage
- Output
- Compatibility Notes
- License
irm https://raw.githubusercontent.com/g4-api/g4-sandbox/main/install-g4-sandbox.ps1 | iexcurl -fsSL https://raw.githubusercontent.com/g4-api/g4-sandbox/main/install-g4-sandbox.sh | bashThe installer bootstraps a portable PowerShell runtime, pulls the repository, runs the sandbox publish script, and cleans up temporary bootstrap files when complete.
The script assembles a deterministic, offline-ready runtime bundle that includes required runtimes, browsers, drivers, tools, and configuration assets β suitable for local execution, CI/CD pipelines, containers, and air-gapped environments.
G4 Sandbox Builder creates a portable runtime environment for G4 automation workloads.
It is designed for:
- π§ͺ Local development
- π€ CI/CD artifact generation
- π¦ Offline / air-gapped deployments
- π³ Container volume mounting
- π§± Deterministic environment builds
The produced sandbox is self-contained and ready to run.
- Fully portable sandbox output
- Deterministic builds
- Cross-platform support
- Automatic dependency retrieval
- Offline-friendly packaging
- CI/CD ready
- Clean rebuild support
- Chrome for Testing integration
- G4 tools staging
- PowerShell 5.x or PowerShell Core
- Internet access (for initial build)
- Sufficient disk space
- PowerShell Core (x64 only)
taravailable on PATH- Internet access
- x64 architecture
git clone https://github.com/g4-api/g4-sandbox.git
cd g4-sandboxpwsh ./Publish-G4Sandbox.ps1 `
-BotVolume "C:\g4-bot" `
-OperatingSystem Windows `
-OutputDirectory "C:\G4"pwsh ./Publish-G4Sandbox.ps1 \
-BotVolume "/opt/g4-bot" \
-OperatingSystem Linux \
-OutputDirectory "/opt/g4"PowerShell Core must be installed manually on non-Windows systems when you are running the builder directly instead of using the one-line bootstrap installer.
π https://learn.microsoft.com/powershell/scripting/install/installing-powershell
sudo apt-get update
sudo apt-get install -y powershellbrew install --cask powershellpwsh --versionRun the script with your desired parameters:
pwsh ./Publish-G4Sandbox.ps1 [parameters]| Parameter | Description |
|---|---|
BotVolume |
Root working volume for the bot |
ChormeVersion |
Optional Chrome version selector |
DotnetVersion |
.NET major version (default: 10) |
HubUri |
G4 Hub endpoint |
OperatingSystem |
Target OS (Windows/Linux/MacOs) |
OutputDirectory |
Final sandbox location |
Clean |
Force clean rebuild |
The script produces a fully portable G4 sandbox layout ready for:
- Local execution
- CI artifacts
- Container mounting
- Offline environments
The output directory will contain all required runtime assets.
- Linux/macOS support is x64 only
- ARM is not currently supported
- Requires outbound network access during build
tarmust be available for certain extractions- Helper functions must be loaded in scope
This project is licensed under the MIT License. See the LICENSE file for details.