Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lainedfles/4de6920d739a8a881ee6c9912726efb3 to your computer and use it in GitHub Desktop.
Save lainedfles/4de6920d739a8a881ee6c9912726efb3 to your computer and use it in GitHub Desktop.
Steam Game Idler CLI (probablyraging flavor) with Android Termux

Steam Game Idler CLI (probablyraging flavor) with Android Termux

For a friend, you know who you are! Herein lies basic instructions enabling the use of steam-game-idler Android with Termux. Only the CLI is covered since I cannot yet get the WebUI working (at all).

Termux Installation

Read about Termux here.

  1. Install via GitHub, F-Droid, or GooglePlay (if you're feeling adventerous as it'a beta)
  2. Consider installing additional plugins like termux-styling and read the wiki!
  3. Open a Termux bash terminal.

Download the steam-game-idler.sh script

  1. Clone: git clone https://github.com/lainedfles/steam-game-idler.git && cd steam-game-idler && cd steam-game-idler
  2. This step is extremely important, ALWAYS AUDIT before execution: less steam-game-idler.sh
  3. Once satisfied, make the file executable: chmod +x steam-game-idler.sh

Execute & configure

  1. Review the usage:
    Usage: steam-game-idler.sh [-h|--help] [-a|--audit-fix]
                                          Run "npm audit fix"
                                          Otherwise use "npm install"
                                        [-c|--clear-npm]
                                          Clear NPM package-lock.json
                                          and node_modules directory
                                        [-f|--force-fix]
                                          This enables --audit-fix
                                          Run "npm audit fix --force"
                                        [-t|--tmux]
                                          Execute node with tmux
                     
                            Examples:
                                     steam-game-idler.sh -t -f
                                     steam-game-idler.sh --tmux --audit-fix
                                              steam-game-idler.sh --clear-npm --tmux --audit-fixx
                                              REPO_PATH=~/steam-game-idler steam-game-idler.sh --clear-npm --tmux --force-fix
    
  2. Secure dependancies with first run: ./steam-game-idler.sh --tmux --clear-npm --force-fix Note that tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal. This makes it essential. Screenshot_20241105_130313
    1. You'll be asked choose the CLI or WebUI, choose CLI and remember setting
    2. Save credentials (optionally permantly)
    3. Decide to display GameName or GameID
    4. Enter game ID to validate (2320 = Quake II)
    5. Type exit Subsequent excution can omit the --clear-npm argument: ./steam-game-idler.sh --tmux
  3. Optionally update config.json to save your list of game IDs:
    1. nano config.json
    2. Update gameIds with a comma separated string, for example:
    "gameIds": "10180, 550, 10180, 500, 2320, 2200, 25700, 18110, 485490, 531890, 2310, 227560, 400790, 45300",
    
    1. Save with CTRL+x and choose yes
  4. Run again to validate: cd ~/steam-game-idler && ./steam-game-idler.sh --tmux
  5. You can detach from tmux with CTRL+b followed by the d key

It is now running in the background and if you've saved credentials, the pgrogram will re-connect to the Steam API automatically. To reconnect use: tmux attach.

Consider using termux-widget to add a widget for this script, to your home screen!

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