Finding IDs
Everything else takes an App ID and, usually, achievement or stat API names — the
internal identifiers, not the titles you see in the Steam overlay. These three commands are how you find them.
list-apps
samrewritten list-apps [--with-achievements] [--with-playtime]
Lists every app on your account.
- --with-achievements
- Adds
achievement_count and unlocked_achievement_count. Slower: it has to query stats for every app you own.
- --with-playtime
- Adds
playtime_minutes and last_played.
$ samrewritten list-apps --with-playtime --with-achievements
[
{
"app_id": 440,
"app_name": "Team Fortress 2",
"image_url": "https://.../capsule_231x87.jpg",
"app_type": "App",
"developer": "Valve",
"metacritic_score": 92,
"playtime_minutes": 338,
"last_played": 1785521891,
"achievement_count": 520,
"unlocked_achievement_count": 0
},
...
]
app_type is one of App, Mod, Demo or Junk — the last covers
soundtracks, dedicated servers and other entries you probably want to filter out.
list-achievements
samrewritten list-achievements <APP_ID> [--language <LANGUAGE>]
Lists an app's achievements and whether you have each one.
$ samrewritten list-achievements 440
[
{
"id": "TF_SCOUT_KILL_IN_DODGE_COOLDOWN",
"is_achieved": false,
"unlock_time": null,
"permission": 0,
"icon_normal": "https://.../7acbb467.jpg",
"icon_locked": "https://.../bf906416.jpg",
"name": "Retire the Runner",
"description": "Kill a Scout while they are under the effect of Crit-a-Cola.",
"global_achieved_percent": 11.3
},
...
]
id is the API name you pass to unlock and lock.
A non-zero permission means Steam marks the achievement as protected and will refuse to change it.
unlock_time is a Unix timestamp, or null if the achievement is still locked.
list-statistics
samrewritten list-statistics <APP_ID> [--language <LANGUAGE>]
Lists an app's statistics and their current values. Each entry is tagged Integer or Float,
which is what decides how a new value is written.
$ samrewritten list-statistics 440
[
{
"Integer": {
"id": "TF_PYRO_DEFEND_POINTS_STAT",
"app_id": 440,
"display_name": "TF_PYRO_DEFEND_POINTS_STAT",
"is_increment_only": false,
"permission": 0,
"original_value": 0,
"int_value": 0,
"min_value": -2147483648,
"max_value": 2147483647
}
},
...
]
Float stats have the same shape with float_value in place of int_value.
Games often leave display_name equal to the API name, as Team Fortress 2 does here.