pp-steam-web

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Steam Web - Printing Press CLI

Steam Web - Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
steam-web-pp-cli
binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
  1. Install via the Printing Press installer:
    bash
    npx -y @mvanhorn/printing-press install steam-web --cli-only
  2. Verify:
    steam-web-pp-cli --version
  3. Ensure
    $GOPATH/bin
    (or
    $HOME/go/bin
    ) is on
    $PATH
    .
If the
npx
install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
bash
go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/steam-web/cmd/steam-web-pp-cli@latest
If
--version
reports "command not found" after install, the install step did not put the binary on
$PATH
. Do not proceed with skill commands until verification succeeds.
本技能驱动
steam-web-pp-cli
二进制文件。在调用本技能的任何命令之前,必须先验证CLI是否已安装。如果未安装,请先执行以下步骤安装:
  1. 通过Printing Press安装程序安装:
    bash
    npx -y @mvanhorn/printing-press install steam-web --cli-only
  2. 验证:
    steam-web-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    环境变量中。
如果
npx
安装失败(无Node环境、离线等),可改用Go直接安装(需要Go 1.23及以上版本):
bash
go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/steam-web/cmd/steam-web-pp-cli@latest
如果安装后执行
--version
提示"command not found",说明安装步骤未将二进制文件添加到
$PATH
中。在验证成功前,请不要继续执行技能命令。

When to Use This CLI

何时使用本CLI

Reach for this when the user wants:
  • look up a player's profile, level, or badges (
    profile
    ,
    level
    ,
    badges
    )
  • list a player's owned games with playtime (
    games
    )
  • show recently-played games (
    recent
    )
  • pull a player's achievements or stats for a specific game (
    achievements
    ,
    stats
    )
  • check a player's VAC or game ban status (
    bans
    )
  • list a player's friends (
    friends
    )
  • see how many players are currently in a game (
    players
    )
  • fetch a game's news feed (
    news
    )
  • resolve a vanity URL (steamcommunity.com/id/foo) to a SteamID (
    resolve
    )
  • dump a game's achievement + stat schema (
    schema
    )
  • hit any of the 170+ Steam Web API endpoints by interface name (
    api
    )
Skip it when the user wants to buy games, manage Steam Workshop mods, or interact with the Steam store beyond what the Web API exposes.
当用户需要以下功能时使用本工具:
  • 查询玩家资料、等级或徽章(
    profile
    level
    badges
  • 列出玩家已拥有的游戏及游戏时长(
    games
  • 显示近期游玩的游戏(
    recent
  • 获取玩家在某款游戏中的成就或统计数据(
    achievements
    stats
  • 检查玩家的VAC或游戏封禁状态(
    bans
  • 列出玩家的好友列表(
    friends
  • 查询某款游戏的当前在线玩家数量(
    players
  • 获取某款游戏的新闻动态(
    news
  • 将自定义URL(steamcommunity.com/id/foo)解析为SteamID(
    resolve
  • 导出某款游戏的成就+统计架构(
    schema
  • 通过接口名称调用170+个Steam Web API端点(
    api
当用户想要购买游戏、管理Steam创意工坊模组,或进行Steam Web API未涵盖的Steam商店交互时,请不要使用本工具。

Argument Parsing

参数解析

Parse
$ARGUMENTS
:
  1. Empty,
    help
    , or
    --help
    -> show
    steam-web-pp-cli --help
  2. Starts with
    install
    -> ends with
    mcp
    -> MCP installation; otherwise -> CLI installation
  3. Anything else -> Direct Use (map to the best command and run it)
解析
$ARGUMENTS
  1. 为空、
    help
    --help
    -> 显示
    steam-web-pp-cli --help
  2. install
    开头
    -> 结尾为
    mcp
    -> MCP安装;否则 -> CLI安装
  3. 其他内容 -> 直接使用(映射到最合适的命令并执行)

MCP Server Installation

MCP服务器安装

The CLI ships an MCP server at
steam-web-pp-mcp
:
bash
go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/steam-web/cmd/steam-web-pp-mcp@latest
claude mcp add -e STEAM_WEB_API_KEY=... steam-web-pp-mcp -- steam-web-pp-mcp
CLI附带了一个MCP服务器
steam-web-pp-mcp
bash
go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/steam-web/cmd/steam-web-pp-mcp@latest
claude mcp add -e STEAM_WEB_API_KEY=... steam-web-pp-mcp -- steam-web-pp-mcp

Direct Use

直接使用

  1. Check installed:
    which steam-web-pp-cli
    . If missing, offer CLI installation.
  2. A SteamID (17-digit) or vanity URL is needed for player commands. If the user gives a vanity URL, run
    resolve <vanity>
    first to get the SteamID.
  3. Discover commands:
    steam-web-pp-cli --help
    ; drill into
    steam-web-pp-cli <cmd> --help
    .
  4. Execute with
    --agent
    for structured output:
    bash
    steam-web-pp-cli <command> [args] --agent
  1. 检查是否已安装:
    which steam-web-pp-cli
    。如果未安装,提供CLI安装指引。
  2. 执行玩家相关命令需要SteamID(17位数字)或自定义URL。如果用户提供的是自定义URL,请先执行
    resolve <vanity>
    获取SteamID。
  3. 查看命令列表:
    steam-web-pp-cli --help
    ;查看具体命令详情:
    steam-web-pp-cli <cmd> --help
  4. 添加
    --agent
    参数执行以获取结构化输出:
    bash
    steam-web-pp-cli <command> [args] --agent

Notable Commands

重要命令

CommandWhat it does
profile <steamid>
Player profile summary (name, country, avatar, visibility)
games <steamid>
Owned games with total playtime
recent <steamid>
Recently played games (last 2 weeks)
achievements <steamid> <appid>
Player's achievements for a game
stats <steamid> <appid>
Player's stats for a game
friends <steamid>
Friend list with relationship timestamps
level <steamid>
Steam level
badges <steamid>
All badges earned
bans <steamid>
VAC and game-ban status
players <appid>
Current-player count for a game
news <appid>
News articles for a game
schema <appid>
Stat + achievement schema for a game
resolve <vanity>
Vanity URL -> SteamID
api <interface> <method>
Call any of 170+ Web API endpoints directly
Run any command with
--help
for full flag documentation.
命令功能
profile <steamid>
玩家资料摘要(名称、国家、头像、可见性)
games <steamid>
已拥有游戏及总游戏时长
recent <steamid>
近期游玩的游戏(过去2周)
achievements <steamid> <appid>
玩家在某款游戏中的成就
stats <steamid> <appid>
玩家在某款游戏中的统计数据
friends <steamid>
好友列表及关系建立时间戳
level <steamid>
Steam等级
badges <steamid>
已获得的所有徽章
bans <steamid>
VAC和游戏封禁状态
players <appid>
某款游戏的当前玩家数量
news <appid>
某款游戏的新闻文章
schema <appid>
某款游戏的统计+成就架构
resolve <vanity>
自定义URL -> SteamID
api <interface> <method>
直接调用170+个Web API端点
执行任何命令时添加
--help
可查看完整的参数文档。

Agent Mode

Agent模式

Add
--agent
to any command. Expands to:
--json --compact --no-input --no-color --yes
.
  • Pipeable — JSON on stdout, errors on stderr
  • Filterable
    --select
    keeps a subset of fields, with dotted-path support (see below)
  • Previewable
    --dry-run
    shows the request without sending
  • Cacheable — GET responses cached for 5 minutes, bypass with
    --no-cache
  • Non-interactive — never prompts, every input is a flag
在任何命令后添加
--agent
参数。该参数等价于:
--json --compact --no-input --no-color --yes
  • 可管道传输 — 标准输出为JSON,错误信息输出到标准错误
  • 可过滤
    --select
    参数保留字段子集,支持点路径(见下文)
  • 可预览
    --dry-run
    参数显示请求内容但不发送
  • 可缓存 — GET请求的响应会缓存5分钟,可使用
    --no-cache
    绕过缓存
  • 非交互式 — 从不提示,所有输入均通过参数传递

Filtering output

输出过滤

--select
accepts dotted paths to descend into nested responses; arrays traverse element-wise:
bash
steam-web-pp-cli <command> --agent --select id,name
steam-web-pp-cli <command> --agent --select items.id,items.owner.name
Use this to narrow huge payloads to the fields you actually need — critical for deeply nested API responses.
--select
参数接受点路径以遍历嵌套响应;数组会逐个元素遍历:
bash
steam-web-pp-cli <command> --agent --select id,name
steam-web-pp-cli <command> --agent --select items.id,items.owner.name
使用该参数可将庞大的响应数据缩小到实际需要的字段——这对于深度嵌套的API响应至关重要。

Response envelope

响应信封

Data-layer commands wrap output in
{"meta": {...}, "results": <data>}
. Parse
.results
for data and
.meta.source
to know whether it's
live
or local. The
N results (live)
summary is printed to stderr only when stdout is a TTY; piped/agent consumers see pure JSON on stdout.
数据层命令会将输出包裹在
{"meta": {...}, "results": <data>}
中。解析
.results
获取数据,通过
.meta.source
判断数据是来自
live
(实时)还是本地。当标准输出为TTY时,
N results (live)
摘要仅会打印到标准错误;管道/agent消费者会在标准输出看到纯JSON。

Exit Codes

退出码

CodeMeaning
0Success
2Usage error (wrong arguments)
3Resource not found (player / game)
4Authentication required (STEAM_WEB_API_KEY missing or invalid)
5API error (Steam upstream; includes private-profile errors)
7Rate limited
代码含义
0成功
2使用错误(参数错误)
3资源未找到(玩家/游戏)
4需要认证(缺少或无效的STEAM_WEB_API_KEY)
5API错误(Steam上游错误;包括私人资料错误)
7请求受限(速率限制)