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

# Plugin SDK

> Build plugins for Stratos using the @skyvexsoftware/stratos-sdk package.

The Stratos Plugin SDK (`@skyvexsoftware/stratos-sdk`) provides everything you need to build plugins for Stratos: types, React hooks, UI components, Vite build config, and dev server auto-connect.

## Quick Start

```bash theme={null}
pnpx create-stratos-plugin
cd my-plugin
pnpm install
pnpm dev        # starts the dev server — auto-connects to Stratos
```

Make sure Stratos is running with [developer mode](/sdk/developer-mode) enabled (`--dev` flag). Your plugin auto-connects and appears in the sidebar with live reload on save. See the [Getting Started](/sdk/getting-started) guide for the full walkthrough.

## Installation

```bash theme={null}
pnpm add @skyvexsoftware/stratos-sdk
```

## What's in the SDK

| Export Path                           | What it provides                                                                                                                                                                                                         |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `@skyvexsoftware/stratos-sdk`         | Hooks (`useSimData`, `useFlightPhase`, `useTrackingSession`, etc.), types (`FlightPhase`, `FlightData`, `EventCategory`, etc.), UI components, `createPlugin` helper, `cn` utility, deprecated `STRATOS_ICONS` re-export |
| `@skyvexsoftware/stratos-sdk/types`   | Plugin contract types (`PluginManifest`, `PluginContext`, etc.)                                                                                                                                                          |
| `@skyvexsoftware/stratos-sdk/hooks`   | React hooks for shell integration, flight data, system events                                                                                                                                                            |
| `@skyvexsoftware/stratos-sdk/ui`      | Shared UI components (Button, Card, Dialog, etc.)                                                                                                                                                                        |
| `@skyvexsoftware/stratos-sdk/helpers` | `createPlugin`, unit conversion helpers (`weightToLbs`, `weightFromLbs`, `formatAltitude`, etc.), unit types (`WeightUnit`, `AltitudeUnit`, `DistanceUnit`, `UnitPreferences`)                                           |
| `@skyvexsoftware/stratos-sdk/vite`    | `createPluginConfig` — Vite build config with dev server auto-connect                                                                                                                                                    |

## Peer Dependencies

Plugins run inside the Stratos shell, which provides these at runtime — you don't need to bundle them:

* `react` ^19.0.0
* `@tanstack/react-query` ^5.0.0
* `socket.io-client` ^4.0.0
* `lucide-react` >=0.300.0
* `class-variance-authority` ^0.7.0
* `@radix-ui/react-*` (alert-dialog, dialog, label, radio-group, select, separator, slider, slot, switch, tabs, tooltip)
* `@vitejs/plugin-react` ^5.0.0
* `vite` ^7.0.0

Additionally, `sonner`, `maplibre-gl`, and `react-map-gl/maplibre` are provided by the shell as externals at runtime but are **not** peer dependencies — you do not need to install them.

<Note>
  Third-party libraries that depend on React — `lucide-react`, `@radix-ui/*`, anything with React as a peer — work out of the box. The SDK aliases `react`, `react-dom`, and their jsx subpaths to shim modules that proxy to the shell's React instance, so every copy of React in the plugin graph resolves to the same singleton. Without this, you'd hit `Cannot read properties of null (reading 'useContext')` from two React instances racing.
</Note>
