# Installation

The **gospace Floorplan SDK** (`@gospace-ai/floorplan`) can be installed via npm/yarn for use in modern JavaScript projects, or loaded directly in the browser via a public CDN.

***

### 1) Install via npm or yarn

```bash
npm install @gospace-ai/floorplan
```

or

```bash
yarn add @gospace-ai/floorplan
```

***

### 2) Import the SDK

**ESM (recommended)**

```ts
import Floorplan from "@gospace-ai/floorplan";
```

**CommonJS**

```js
const Floorplan = require("@gospace-ai/floorplan");
```

***

### 3) Use via CDN in Browser Environments

You can load the SDK without installing by using a public npm CDN such as **jsDelivr** or **unpkg**:

```html
<!-- Latest (auto-updates to the newest version) -->
<script src="https://cdn.jsdelivr.net/npm/@gospace-ai/floorplan@latest/dist/floorplan.umd.js"></script>

<!-- Or pin a specific version -->
<script src="https://cdn.jsdelivr.net/npm/@gospace-ai/floorplan@2.14.0/dist/floorplan.umd.js"></script>

<!-- unpkg alternative -->
<script src="https://unpkg.com/@gospace-ai/floorplan/dist/floorplan.umd.js"></script>
```

When loaded this way, the SDK is available as a global `Floorplan` object.

***

### 4) Requirements

* Node.js v18+ for local development
* A valid **access token** from gospace
* Supported browsers: Chrome, Edge, Safari, Firefox (latest two versions)
* Internet access to load the hosted floorplan at [**https://floorplan.gospace.app**](https://floorplan.gospace.app/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.gospace.com/floorplan-sdk/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
