# Installation

> Add github.com/stxapp/stx-go to your module and import it.

Source: https://docs.stxapp.io/sdks/go/installation/

```bash
go get github.com/stxapp/stx-go
```

Requires Go 1.24 or newer. The module depends on the standard library and one WebSocket library, `github.com/coder/websocket`.

## Importing

The package name is `stx`:

```go
package main

import (
	"fmt"

	stx "github.com/stxapp/stx-go"
)

func main() {
	fmt.Println("stx-go", stx.Version)
}
```

```text
stx-go 0.1.0
```

OAuth for apps lives in its own package, `github.com/stxapp/stx-go/oauth`. Import it only if you build an app that acts for other STX members; see [Apps](/sdks/go/apps/).

## Run an example

The examples in this guide are complete programs or fragments of one. Save a complete program as `main.go` in a module that requires the SDK, and run it:

```bash
go mod init example.com/stx-quickstart
go get github.com/stxapp/stx-go
go run .
```

Fragments assume a `ctx` (a `context.Context`) and a `client` from `stx.New()`, as in the [overview](/sdks/go/).

Pin a version in production. Before 1.0.0, a minor release can change the API.
