Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
build
scratch/
# This file is generated by the runreal CLI during the test
.runreal/dist/script.esm.js
.runreal
.DS_Store
docs/
112 changes: 110 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,129 @@
<a href="https://runreal.dev">Website</a>
·
<a href="https://x.com/runreal_dev">Twitter</a>
·
<a href="https://discord.gg/6ZhWVU5W47">Discord</a>
<br />
<br />
</p>

- **Unreal Engine**: Configure engines, build projects, and run UAT/UBT commands.
- **Buildgraph**: Generate reports from your buildgraphs.
- **Unreal Engine**: Configure your engine, build projects, and run UAT/UBT commands.
- **Buildgraph**: Easily work with BuildGraph.
- **Project**: Compile, package, and run projects easily.
- **Workflow**: Execute custom workflows for your Unreal Engine projects.
- **Asset Management**: Work with Unreal assets using the uasset commands.

## Getting Started
```sh
# Compile the editor
runreal project compile Editor

# Compile your project targets
runreal project compile Client

# List available build targets
runreal list-targets

# Run your game
runreal project run

# Package your project
runreal project pkg -p Win64 -c Development

# Execute a buildgraph script
runreal buildgraph run <script.xml>

# Run UAT commands
runreal uat run BuildCookRun -project=YourProject.uproject

# Run UBT commands
runreal ubt run -Mode=QueryTargets
```

## Installation

Download the latest release from the [Releases](https://github.com/runreal/cli/releases/latest) page.

### Install Latest Version

**With PowerShell:**

```powershell
irm https://raw.githubusercontent.com/runreal/cli/refs/heads/main/install.ps1 | iex
```

**With Shell:**

```sh
curl -fsSL https://raw.githubusercontent.com/runreal/cli/refs/heads/main/install.sh | sh
```

### Install Specific Version

**With PowerShell:**

```powershell
$v="1.0.0"; irm https://raw.githubusercontent.com/runreal/cli/refs/heads/main/install.ps1 | iex
```

**With Shell:**

```sh
curl -fsSL https://raw.githubusercontent.com/runreal/cli/refs/heads/main/install.sh | sh -s v1.0.0
```

## Usage
```sh
runreal --help

Usage: runreal
Version: 1.6.0

Description:

the Unreal Engine runner

Options:

-h, --help - Show this help.
-V, --version - Show the version number for this program.
--session-id <sessionId> - Session Id (Default: "01JTVDP0Z1N2ES4703Y44MQTFQ")
--log-level <level> - Log level (Default: "DEBUG", Values: "DEBUG", "INFO", "ERROR")
-c, --config-path <configPath> - Path to config file
--engine-path <enginePath> - Path to engine folder
--project-path <projectPath> - Path to project folder
--build-id <buildId> - Overide build ID
--build-path <buildPath> - Path to save build outputs
--build-ts <buildTs> - Overide build timestamp

Commands:

init - init
debug - debug
list-targets - list-targets
engine - engine
uat <command> [args...] - uat
ubt <command> [args...] - ubt
buildgraph - buildgraph
workflow - workflow
script <input> - script
auth <command> [args...] - auth
uasset - uasset
project - project

Environment variables:

RUNREAL_ENGINE_PATH <enginePath> - Overide path to engine folder
RUNREAL_PROJECT_PATH <projectPath> - Overide path to project folder
RUNREAL_BUILD_ID <buildId> - Overide build ID
RUNREAL_BUILD_PATH <buildPath> - Overide path to build output folder
RUNREAL_BUILD_TS <buildTs> - Overide build timestamp
```

## Building from source

`deno` is required. See [deno getting started](https://docs.deno.com/runtime/getting_started/installation/).

1. Clone the cli

```bash
Expand Down
51 changes: 51 additions & 0 deletions install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env pwsh
# Copyright 2019-2025 the Deno authors. All rights reserved. MIT license.
# Copyright 2025 runreal. All rights reserved. MIT license.
# Adopted from https://github.com/denoland/deno_install

$ErrorActionPreference = 'Stop'

if ($v) {
$Version = "v${v}"
}
if ($Args.Length -eq 1) {
$Version = $Args.Get(0)
}

$RunrealInstall = $env:RUNREAL_INSTALL
$BinDir = if ($RunrealInstall) {
"${RunrealInstall}\bin"
} else {
"${Home}\.runreal\bin"
}

$RunrealExe = "$BinDir\runreal.exe"
$Target = 'win-x64'

$Version = if (!$Version) {
curl.exe --ssl-revoke-best-effort -s "https://api.github.com/repos/runreal/cli/releases/latest" |
ConvertFrom-Json |
Select-Object -ExpandProperty tag_name
} else {
$Version
}

Write-Output "Installing runreal ${Version} for ${Target}"

$DownloadUrl = "https://github.com/runreal/cli/releases/download/${Version}/runreal-${Target}.exe"

if (!(Test-Path $BinDir)) {
New-Item $BinDir -ItemType Directory | Out-Null
}

curl.exe --ssl-revoke-best-effort -Lo $RunrealExe $DownloadUrl

$User = [System.EnvironmentVariableTarget]::User
$Path = [System.Environment]::GetEnvironmentVariable('Path', $User)
if (!(";${Path};".ToLower() -like "*;${BinDir};*".ToLower())) {
[System.Environment]::SetEnvironmentVariable('Path', "${Path};${BinDir}", $User)
$Env:Path += ";${BinDir}"
}

Write-Output "runreal was installed successfully to ${RunrealExe}"
Write-Output "Run 'runreal --help' to get started"
189 changes: 189 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
#!/bin/sh
# Copyright 2019-2025 the Deno authors. All rights reserved. MIT license.
# Copyright 2025 runreal. All rights reserved. MIT license.
# Adopted from https://github.com/denoland/deno_install

set -e

if [ "$OS" = "Windows_NT" ]; then
target="win-x64.exe"
else
case $(uname -sm) in
"Darwin arm64") target="macos-arm" ;;
"Linux x86_64") target="linux-x64" ;;
*) target="unknown" ;;
esac
fi

if [ "$target" = "unknown" ]; then
echo "Note: runreal is not supported on this platform"
exit 0
fi

print_help_and_exit() {
echo "Setup script for installing runreal

Options:
-y, --yes
Skip interactive prompts and accept defaults
--no-modify-path
Don't add runreal to the PATH environment variable
-h, --help
Print help
"
echo "Note: runreal was not installed"
exit 0
}

get_latest_version() {
curl --ssl-revoke-best-effort -s https://api.github.com/repos/runreal/cli/releases/latest | awk -F'"' '/"tag_name":/{print substr($4,1)}'
}

# Initialize variables
should_run_shell_setup=false
no_modify_path=false

# Simple arg parsing - look for help flag, otherwise
# ignore args starting with '-' and take the first
# positional arg as the deno version to install
for arg in "$@"; do
case "$arg" in
"-h")
print_help_and_exit
;;
"--help")
print_help_and_exit
;;
"-y")
should_run_shell_setup=true
;;
"--yes")
should_run_shell_setup=true
;;
"--no-modify-path")
no_modify_path=true
;;
"-"*) ;;
*)
if [ -z "$runreal_version" ]; then
runreal_version="$arg"
fi
;;
esac
done

if [ -z "$runreal_version" ]; then
runreal_version=$(get_latest_version)
fi

echo "Installing runreal-${runreal_version} for ${target}"

runreal_uri="https://github.com/runreal/cli/releases/download/${runreal_version}/runreal-${target}"
runreal_install="${RUNREAL_INSTALL:-$HOME/.runreal}"
bin_dir="$runreal_install/bin"
exe="$bin_dir/runreal"

if [ ! -d "$bin_dir" ]; then
mkdir -p "$bin_dir"
fi

curl --fail --location --progress-bar --output "$exe" "$runreal_uri"
chmod +x "$exe"

echo "runreal was installed successfully to $exe"

run_shell_setup() {
local rc_files=""
local current_shell=""

# Try to detect the current shell more reliably
if [ -n "$SHELL" ]; then
current_shell=$(basename "$SHELL")
elif [ -n "$ZSH_VERSION" ]; then
current_shell="zsh"
elif [ -n "$BASH_VERSION" ]; then
current_shell="bash"
elif [ -n "$KSH_VERSION" ]; then
current_shell="ksh"
elif [ -n "$FISH_VERSION" ]; then
current_shell="fish"
else
current_shell="sh"
fi

# Determine which rc files to modify based on shell
case "$current_shell" in
zsh)
rc_files="$HOME/.zshrc"
;;
bash)
rc_files="$HOME/.bashrc"
# Add .bash_profile for login shells on macOS
if [ "$(uname -s)" = "Darwin" ]; then
rc_files="$rc_files $HOME/.bash_profile"
fi
;;
fish)
# Fish has a different way of setting PATH
mkdir -p "$HOME/.config/fish/conf.d"
echo "set -gx RUNREAL_INSTALL \"$runreal_install\"" > "$HOME/.config/fish/conf.d/runreal.fish"
echo "set -gx PATH \$RUNREAL_INSTALL/bin \$PATH" >> "$HOME/.config/fish/conf.d/runreal.fish"
echo "Added runreal to PATH in fish configuration"
return
;;
*)
# Default to .profile for other shells
rc_files="$HOME/.profile"
;;
esac

# Add setup line to each rc file
for rc_file in $rc_files; do
if [ ! -f "$rc_file" ]; then
touch "$rc_file"
fi

if ! grep -q "$runreal_install/bin" "$rc_file"; then
echo "" >> "$rc_file"
echo "# runreal setup" >> "$rc_file"
echo "export RUNREAL_INSTALL=\"$runreal_install\"" >> "$rc_file"
echo "export PATH=\"\$RUNREAL_INSTALL/bin:\$PATH\"" >> "$rc_file"
echo "Added runreal to PATH in $rc_file"
else
echo "runreal already in PATH in $rc_file"
fi
done

echo "Restart your shell or run 'source $rc_file' to use runreal"
}

# Add runreal to PATH for non-Windows if needed
if [ "$OS" != "Windows_NT" ] && [ "$no_modify_path" = false ]; then
# If not automatic setup, but interactive is possible, ask user
if [ "$should_run_shell_setup" = false ] && [ -t 0 ]; then
echo ""
echo "Do you want to add runreal to your PATH? [y/N]"
read -r answer
if [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then
should_run_shell_setup=true
fi
fi

if [ "$should_run_shell_setup" = true ]; then
run_shell_setup
else
echo ""
echo "To manually add runreal to your path:"
echo " export RUNREAL_INSTALL=\"$runreal_install\""
echo " export PATH=\"\$RUNREAL_INSTALL/bin:\$PATH\""
echo ""
echo "To do this automatically in the future, run with -y or --yes"
fi
fi

if command -v runreal >/dev/null; then
echo "Run 'runreal --help' to get started"
else
echo "Run '$exe --help' to get started"
fi
echo
Loading