Skip to content

Console app to run any app easier. Cross-platform, written in Go. Set custom aliases for apps, commands and pass any argument.

License

Notifications You must be signed in to change notification settings

AlexDeFoc/goRunner

Repository files navigation

About

  • Utility app that enables you to launch any app/game/custom command on your computer by setting custom aliases.
  • It is blazingly fast and lightweight.
  • It is very customisable, even allowing you to set aliases to other aliases with added overridden fields.
  • Cross-platform & Cross-Architecture (Windows, MacOS, Linux | x64, x86, arm, arm64)

Installation

Normal installation

  • This allows you to use the app in your terminal right after installing it. (Adds automatically to your %PATH%).

Guide for Windows:

  1. Go to the Releases page.
  2. Download the executable for your cpu architecture. Most probably it's 64 or 32 bit. It will look like this: win_cpu_architecture.exe. If you don't understand the names of the architectures provided check this footnote.1
  1. Double-Click it and follow the steps of the installer.
  2. Done! Now you can enter your terminal and start by typing firstly the app name which is "ru", and then the app or alias name.

Guide for Linux/MacOS:

  1. Go to the Releases page.
  2. Download the bash script with the ".sh" extension for your architecture.
  3. Run the script with sudo/administrator privileges to be sure it installs correctlly.
  4. Done! Now you can enter your terminal and start by typing firstly the app name which is "ru", and then the app or alias name.

Portable installation

  • This doesn't allow you to use the app for anywhere on your computer, because it is not added in your enviromental variables / %PATH%. So you will have to do it manually or run the app while the folder containing the app.
  1. Go to the Releases page.
  2. Download the archive file with the ".tar.xz" extension for your operating system and architecture.
  3. Extract using the command "tar -xvJf" or other ways you extract the files from a compressed tarball.
  4. Done! Now you can use it by entering your terminal and changing the directory to the app's one and then starting by typing the app name which is "ru", and then the app or alias name.


Configuration

Note: To see my app & alias configs check in the repository the folder called "My setup".

Configuration fields structure:

  • Advanced mode
  • Shell
Shell field is optional and only necesarry when creating aliases that need to run a system command.
Advanced mode is by default false, meaning the app will allow you to only run multiple apps at once and no aliases. To be able to use aliases you must enable Advanced Mode.
Check the available shells in the footnote: 2
Reason of having hard coded of shells is here: 3

App fields structure:

  • name
    • path
    • desc
Descriptions are optional.
Paths must contain only right slashes: "/".

Alias fields structure:

  • name
    • app
    • status
    • prefix
    • connect
    • fallback
    • command
    • desc
Each field is optional, but some are necesary to create great aliases.

Alias fields values:

  • name : name you will be using the call the alias
    • app : name of the app which is from the app.json file
    • status :
      • "search" - for adding arguments from the terminal to this alias
      • "pass" - for passing a certain hard-coded command with arguments to an app
      • "call" - used to call other aliases + having the ability to add fields with different values to override the called aliases fields
    • prefix : text to be added in front of a final command being passed to an app
    • connect : symbol/character or text that will be put in between the arguments provided in the terminal
    • command : used when wanting to pass a certain command that may contain flags with dashes and values, to an app
    • fallback : used when no arguments are provided in the terminal, and a different value should be passed to the app or alias fallback field
    • desc : this is completely optional, aswell as the other ones, with it's only purpose is to add a bit of description to the alias because most likely the alias's name is comprised of just a few letters



Examples

App configuration chapters:

Examples:

Open an app
"ch": {
    "path": "C:/Program Files/Google/Chrome/Application/chrome.exe"
}
Open a game
"hk": {
    "path": "C:/Game/Internet/Hollow Knight/hollow_knight.exe",
    "desc": "Hollow Knight"
}
Open a system app
"xp": {
    "path": "explorer.exe"
}



Aliases Types:

  • Run a command with arguments ℹ️
  • Start a game with flags and arguments ℹ️
  • Start a game that is launched with a custom protocol URL/URI (Steam/Epic Games/Google Play Games) ℹ️
  • Search stuff on the internet in your browser AND having the ability to not search for anything and just open the browser on a custom page or default one ℹ️
  • Search stuff on youtube in your browser AND having the ability to not search for anything and just open youtube. ℹ️
  • Search for a certain link in your browser (Needs the Search stuff on internet example) ℹ️
  • Open a certain site (Needs the Search for a certain link example) ℹ️

Examples:

Run a command with arguments:
"xp": {
    "app": "xp",
    "status": "command",
    "command": "start explorer.exe ."
}
Start a game with flags and arguments:
"hk": {
    "app": "hk",
    "status": "pass",
    "command": "-screen-width 912 -screen-height 570"
}
Start a game that is launched with a custom protocol URL/URI:
"coc": {
    "app": "coc",
    "status": "command",
    "command": "start googleplaygames://launch/?id=com.supercell.clashofclans&lid=1&pid=1",
    "desc": "Start clash of clans"
}
Search stuff on the internet in your browser:
"ch": {
    "app": "ch",
    "status": "search",
    "prefix": "google.com/search?q=",
    "connect": "+",
    "fallback": "google.com"
}
Search stuff on youtube in your browser:
"yt": {
    "app": "ch",
    "status": "search",
    "prefix": "youtube.com/results?search_query=",
    "connect": "+",
    "fallback": "youtube.com"
}
Search for a certain link in your browser:
"chu": {
    "app": "ch",
    "status": "call",
    "prefix": "",
    "connect": "",
    "fallback": "",
    "desc": "Search web for a link"
}
Open a certain site:
"wh": {
    "app": "chu",
    "status": "call",
    "fallback": "web.whatsapp.com"
}
"epic": {
    "app": "chu",
    "status": "call",
    "fallback": "epicgames.com"
}



Contribution:

Parts that need improvement:

  • Additional shells with their apropriate prefix
  • Additional alias examples

Footnotes

  1. amd64 = 64 bit cpu, i386 = 32 bit cpu

  2. cmd (Command prompt), pwsh (powershell 7), bash

  3. The app handles different shells by using shells prefixes: "cmd /C", "pwsh -Command", "bash -c".

About

Console app to run any app easier. Cross-platform, written in Go. Set custom aliases for apps, commands and pass any argument.

Resources

License

Stars

Watchers

Forks