Skip to content

Instantly share code, notes, and snippets.

@sarah-j-smith
Last active December 4, 2025 05:51
Show Gist options
  • Select an option

  • Save sarah-j-smith/0131c8fbbe3dbbf0d2a3bc7d3bc6b207 to your computer and use it in GitHub Desktop.

Select an option

Save sarah-j-smith/0131c8fbbe3dbbf0d2a3bc7d3bc6b207 to your computer and use it in GitHub Desktop.
Bash script for Mac to start rider from command line and open the current Unreal Project

Rider Start Script

Bash script for Mac to start rider from command line and open the current Unreal Project.

Why

Like Android Studio with it's studio and Visual Studio Code with code we want to be able to just type rider in a folder and have it do the right thing.

If you run this command from a directory with at least one MyUnrealProject.uproject file it will open the first one it finds using the version of Rider installed in your Mac /Applications folder.

Simpler solution

Just ignore what I have here, and simply use the JetBrains Toolbox app. This can create the Rider launch script for you and put it in your path.

If you don't want the Toolbox app cluttering up your computer or want to customise how you launch, then try the below.

To install

  • Ensure you have a bash shell (or prepare to modify per platforms below)
  • Right click raw button and download
  • Make executable

chmod a+x /usr/local/bin/rider

  • Copy or move to somewhere in your path

sudo mv ~/Downloads/rider.txt /usr/local/bin/rider

Platforms

Would probably work for other bash shells like Linux, or WSL or mingw if you change the command to open rider on lines 4 and 11.

Would probably work for shells that don't use (( ... )) for math expansion like bash does if the test for array empty on line 10 is changed. YMMV.

Changes

20/6/25 - fixed to handle passing a file name, and if there is no file name try to open the uproject file

#!/bin/sh
if [ "$#" -ne 0 ]; then
open -na "Rider.app" --args "$@"
fi;
shopt -s nullglob
PROJ=(*.uproject)
if (( ${#PROJ[@]} > 0 )); then
open -na "Rider.app" --args "${PROJ[0]}";
fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment