MCPcopy Index your code
hub / github.com/Philipp15b/go-steam

github.com/Philipp15b/go-steam @v3.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.0.0 ↗ · + Follow
20,931 symbols 25,019 edges 107 files 2,385 documented · 11% 1 cross-repo links updated 2y agov3.0.0 · 2021-12-06★ 42935 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Steam for Go

This library implements Steam's protocol to allow automation of different actions on Steam without running an actual Steam client. It is based on SteamKit2, a .NET library.

In addition, it contains APIs to Steam Community features, like trade offers and inventories.

Some of the currently implemented features:

  • Trading and trade offers, including inventories and notifications
  • Friend and group management
  • Chatting with friends
  • Persona states (online, offline, looking to trade, etc.)
  • SteamGuard with two-factor authentication
  • Team Fortress 2: Crafting, moving, naming and deleting items

If this is useful to you, there's also the go-steamapi package that wraps some of the official Steam Web API's types.

Installation

go get github.com/Philipp15b/go-steam

Usage

You can view the documentation with the godoc tool or online on godoc.org.

You should also take a look at the following sub-packages:

Working with go-steam

Whether you want to develop your own Steam bot or directly work on go-steam itself, there are are few things to know.

  • If something is not working, check first if the same operation works (under the same conditions!) in the Steam client on that account. Maybe there's something go-steam doesn't handle correctly or you're missing a warning that's not obviously shown in go-steam. This is particularly important when working with trading since there are restrictions, for example newly authorized devices will not be able to trade for seven days.
  • Since Steam does not maintain a public API for most of the things go-steam implements, you can expect that sometimes things break randomly. Especially the trade and tradeoffer packages have been affected in the past.
  • Always gather as much information as possible. When you file an issue, be as precise and complete as you can. This makes debugging way easier.
  • If you haven't noticed yet, expect to find lots of things out yourself. Debugging can be complicated and Steam's internals are too.
  • Sometimes things break and other SteamKit ports are fixed already. Maybe take a look what people are saying over there? There's also the SteamKit IRC channel.

Updating go-steam to a new SteamKit version

Go source code is generated with code in the generator directory. Look at generator/README.md for more information on how to use the generator.

Then, after generating new Go source files, update go-steam as necessary.

License

Steam for Go is licensed under the New BSD License. More information can be found in LICENSE.txt.

Extension points exported contracts — how you extend this code

IMsg (Interface)
Interface for all messages, typically outgoing. They can also be created by using the Read* methods in a PacketMsg. [5 …
protocol/msg.go
PacketHandler (Interface)
(no doc) [7 implementers]
client.go
Serializer (Interface)
(no doc) [64 implementers]
protocol/internal.go
IGCMsg (Interface)
An outgoing message to the Game Coordinator. [2 implementers]
protocol/gamecoordinator/msg.go
GCPacketHandler (Interface)
(no doc) [1 implementers]
gamecoordinator.go
IClientMsg (Interface)
Interface for client messages, i.e. messages that are sent after logging in. ClientMsgProtobuf and ClientMsg implement t [2 …
protocol/msg.go
Deserializer (Interface)
(no doc) [55 implementers]
protocol/internal.go
MessageBody (Interface)
(no doc) [44 implementers]
protocol/internal.go

Core symbols most depended-on inside this repo

Write
called by 209
connection.go
ReadInt32
called by 55
rwu/rwu.go
ReadUint64
called by 50
rwu/rwu.go
ReadUint32
called by 37
rwu/rwu.go
Emit
called by 35
client.go
Read
called by 26
connection.go
Errorf
called by 23
client.go
ReadProtoMsg
called by 22
protocol/packet.go

Shape

Method 18,206
Struct 2,203
Function 273
TypeAlias 235
Interface 12
Class 2

Languages

Go100%
C#1%

Modules by API surface

tf2/protocol/protobuf/tf.pb.go2,023 symbols
protocol/protobuf/client_server.pb.go1,736 symbols
protocol/protobuf/client_server_2.pb.go1,676 symbols
csgo/protocol/protobuf/cstrike15gc.pb.go1,621 symbols
dota/protocol/protobuf/econ.pb.go1,289 symbols
dota/protocol/protobuf/steam.pb.go970 symbols
tf2/protocol/protobuf/base.pb.go824 symbols
csgo/protocol/protobuf/steam.pb.go804 symbols
protocol/protobuf/unified/player.pb.go790 symbols
csgo/protocol/protobuf/base.pb.go771 symbols
protocol/protobuf/unified/publishedfile.pb.go765 symbols
dota/protocol/protobuf/base.pb.go744 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add go-steam \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page