Skip to content
TTSKarlssonPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steamlist - A command and library to list installed games


Using go-task:

Linux bash

BIN_DIR=/path/to/bin task install

Windows powershell

$env:BIN_DIR="X:\path\to\bin" && task install

Using as library

Windows powershell

go get codeberg.com/ttskarlsson/steamlist

Example

main.go

package main

import (
  "codeberg.org/ttskarlsson/steamlist/sl"
)

func main() {
  games := sl.NewSteamlist()
  for _, game := range games {
    fmt.Printf("%s %s %s\n", game.AppID, game.Name, game.InstallDir)
  }
}

Build the tool

go mod tidy
go build ./sl

Using the tool

Running the command
steamlist

output

AppID    Name                       InstallDir
361420   ASTRONEER                  D:\SteamLibrary\steamapps\common\ASTRONEER
427410   Abiotic Factor             D:\SteamLibrary\steamapps\common\AbioticFactor
220200   Kerbal Space Program       E:\SteamLibrary\steamapps\common\Kerbal Space Program
1774580  STAR WARS Jedi: Survivor™  D:\SteamLibrary\steamapps\common\Jedi Survivor
677340   The Colonists              D:\SteamLibrary\steamapps\common\The Colonists
Getting a JSON response
steamlist -j

output:

[
  {
    "appid": "361420",
    "name": "ASTRONEER",
    "installdir": "D:\\SteamLibrary\\steamapps\\common\\ASTRONEER"
  },
  {
    "appid": "427410",
    "name": "Abiotic Factor",
    "installdir": "D:\\SteamLibrary\\steamapps\\common\\AbioticFactor"
  },
  {
    "appid": "220200",
    "name": "Kerbal Space Program",
    "installdir": "E:\\SteamLibrary\\steamapps\\common\\Kerbal Space Program"
  },
  {
    "appid": "1774580",
    "name": "STAR WARS Jedi: SurvivorÔäó",
    "installdir": "D:\\SteamLibrary\\steamapps\\common\\Jedi Survivor"
  },
  {
    "appid": "677340",
    "name": "The Colonists",
    "installdir": "D:\\SteamLibrary\\steamapps\\common\\The Colonists"
  }
]

Example Powershell usage

(steamlist -j | ConvertFrom-Json | Where-Object { $_.name -like "Kerbal Space Program" }).appid

output:

220200

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages