Skip to content

Instantly share code, notes, and snippets.

@lukassup
Last active November 9, 2021 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukassup/20dddb16c7fe33d977f7074082aec244 to your computer and use it in GitHub Desktop.
Save lukassup/20dddb16c7fe33d977f7074082aec244 to your computer and use it in GitHub Desktop.
Steam download

Download a Steam game

  • You need to know the APP_ID, e.g. find it in the Steam store URL.

  • You need to own the game on your account.

  • This downloads Windows version of the game, which is handy to play games with no MacOS/Linux native support on source ports (e.g. vkquake, gzdoom, raze). You can change +@sSteamCmdForcePlatformType to linux or macos if you like

  • Install steamcmd (MacOS):

    brew install --cask steamcmd
  • Add this helper function to ~/.bashrc or ~/.zshrc:

    export STEAM_USERNAME=my-username
    
    function steamdl() {
      local app_id="$1"; shift
      local extra_args="${@}"
      steamcmd +login "$STEAM_USERNAME" +@sSteamCmdForcePlatformType windows +force_install_dir "$(pwd)/${app_id}" +app_update "${app_id}" ${extra_args} +quit
    }

USAGE

Download game with APP_ID: 2280 to current dir

steamdl 2280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment