---
title: "SDKs"
description: "Client and server libraries for sending events and managing identity: Web, Android, iOS, Flutter, Node, Go, Ruby, and the raw HTTP API."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.pug.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

Client and server libraries for sending events and managing identity from your
apps. Every integration shares one mental model (**initialize once, track
events, identify users, reset on sign-out**) whether you use a browser/app SDK,
a server-side SDK (**Node**, **Go** or **Ruby**), or call the API directly. The one
exception is *reset*: a server SDK has no ambient user or session to reset, so
you name the user's distinct ID on each call instead.

- `init(projectId, options)` - once at app startup
  - `track(name, props)` - throughout the app
  - `identify(id, traits)` - after sign-in
  - `reset()` - on sign-out (client SDKs)

## Choose your platform

| Platform | Use it when | Package |
|----------|-------------|---------|
| [**Web**](/sdks/web) | Browser apps: React, Vue, Next.js, or plain JavaScript | `@pug-sh/browser` |
| [**Android**](/sdks/android) | Native Android apps, in Kotlin or Java | `sh.pug:android` |
| [**iOS**](/sdks/ios) | Native iOS and iPadOS apps, in Swift | `github.com/pug-sh/sdk-ios` |
| [**Flutter**](/sdks/flutter) | Cross-platform mobile & desktop apps | `pug_flutter` |
| [**Node**](/sdks/node) | A Node.js backend that sends events **and** reads analytics | `@pug-sh/node` |
| [**Go**](/sdks/go) | A Go backend that sends events **and** reads analytics | `github.com/pug-sh/sdk-go` |
| [**Ruby**](/sdks/ruby) | A Ruby or Rails backend that sends events **and** reads analytics | `pug-sh` |
| [**HTTP API**](/sdks/http) | Any other backend or language (anything that can POST JSON) | - |

Each SDK page follows the same outline: install, initialize, track events,
identify users, auto-tracking, consent, and upgrade notes. Every page is also
published as markdown for agents - append `/index.md` to its URL, as in
`/sdks/flutter/index.md`.

A React Native SDK is on the [roadmap](/roadmap). Until it ships, use
**Flutter** for cross-platform mobile, or the **HTTP API** from any runtime.

**Client vs server keys.** The **Web**, **Android**, **iOS** and **Flutter** SDKs run in
untrusted environments and authenticate with your **public key** (`pub_...`) -
write-scoped (events + identify) and safe to ship in client code. The **Node**, **Go** and **Ruby**
SDKs run on your server and use your **private key** (`prv_...`), which
additionally unlocks analytics **reads** (profiles, activity, insights); never
embed it in client code. See [Authentication](/get-started/authentication).

> **Endpoint defaults to Pug Cloud**
>
> Every SDK defaults `endpoint` to `https://api.pugs.dev`, so you only set it when
> **self-hosting**, pointing it at your own server (the dev server listens on port
> `3000`). See [Connect your SDKs](/self-hosting/connect-sdks).

## Further reading

- [Quickstart](/get-started): your first event in five minutes
- [Core concepts](/get-started/concepts): events, profiles, sessions, identity
- [Well-known events](/reference/well-known-events): the typed event catalog
- [Auto-properties](/reference/auto-properties): every `$`-property the SDKs and server attach
- [Authentication](/get-started/authentication): public vs. private keys, rotation
- [Self-hosting](/self-hosting): run the Pug stack on your own infrastructure
- **API reference:** [Events](/api/events) | [Profiles](/api/profiles) | [RPC services](/reference/rpc-services)
- **SDK source:** [browser](https://github.com/pug-sh/sdk-browser) | [android](https://github.com/pug-sh/sdk-android) | [ios](https://github.com/pug-sh/sdk-ios) | [flutter](https://github.com/pug-sh/sdk-flutter) | [node](https://github.com/pug-sh/sdk-node) | [go](https://github.com/pug-sh/sdk-go) | [ruby](https://github.com/pug-sh/sdk-ruby)

Source: https://docs.pug.sh/sdks/index.mdx
