Skip to content

g4-api/g4-sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

G4β„’ Sandbox Builder

A fully portable sandbox builder for the G4β„’ automation ecosystem.

πŸ“š Table of Contents


One-line installation

Windows

irm https://raw.githubusercontent.com/g4-api/g4-sandbox/main/install-g4-sandbox.ps1 | iex

Linux

curl -fsSL https://raw.githubusercontent.com/g4-api/g4-sandbox/main/install-g4-sandbox.sh | bash

The 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.


πŸ” Overview

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.


✨ Features

  • 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

πŸ“¦ Requirements

Windows

  • PowerShell 5.x or PowerShell Core
  • Internet access (for initial build)
  • Sufficient disk space

Linux / macOS

  • PowerShell Core (x64 only)
  • tar available on PATH
  • Internet access
  • x64 architecture

⚠️ ARM is currently not supported


πŸš€ Quick Start

1️⃣ Clone the repository

git clone https://github.com/g4-api/g4-sandbox.git
cd g4-sandbox

2️⃣ Run the sandbox builder

Windows (PowerShell)

pwsh ./Publish-G4Sandbox.ps1 `
  -BotVolume "C:\g4-bot" `
  -OperatingSystem Windows `
  -OutputDirectory "C:\G4"

Linux / macOS (PowerShell Core)

pwsh ./Publish-G4Sandbox.ps1 \
  -BotVolume "/opt/g4-bot" \
  -OperatingSystem Linux \
  -OutputDirectory "/opt/g4"

🧰 PowerShell Installation (macOS/Linux)

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.

πŸ”— Official Microsoft installation guide

πŸ‘‰ https://learn.microsoft.com/powershell/scripting/install/installing-powershell


Quick install examples

Ubuntu (x64)

sudo apt-get update
sudo apt-get install -y powershell

macOS (Homebrew, x64)

brew install --cask powershell

Verify installation

pwsh --version

Usage

Run the script with your desired parameters:

pwsh ./Publish-G4Sandbox.ps1 [parameters]

Common 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

πŸ“ Output

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.


Compatibility Notes

  • Linux/macOS support is x64 only
  • ARM is not currently supported
  • Requires outbound network access during build
  • tar must be available for certain extractions
  • Helper functions must be loaded in scope

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Lightweight PowerShell sandbox for building, testing, and packaging G4 automation environments and workflows. Designed for fast local setup, reproducible runs, and developer-friendly experimentation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors