> For the complete documentation index, see [llms.txt](https://docs.freighter.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.freighter.app/extension-freighter-api/installation.md).

# Installation

Get up and running with Freighter by installing the browser extension and choosing the right integration method for your app.

## Prerequisites

1. Install the Freighter browser extension from the [Chrome Web Store](https://chromewebstore.google.com/detail/freighter/bcacfldlkkdogcmkkibnjlakofdplcbk) or [Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/freighter/).
2. Choose an integration method below based on your project setup.

## Choose Your Integration

### npm / yarn

Use this when building with a bundler (Webpack, Vite, etc.) in a React, Next.js, or other modern JS framework.

**Ideal for:**

* React, Vue, Svelte, or Angular applications
* Server-side rendered apps (Next.js, Nuxt)
* Any project using a JavaScript bundler

```bash
npm install @stellar/freighter-api
```

```bash
yarn add @stellar/freighter-api
```

Then import in your code. You can import the entire library:

```javascript
import freighterApi from "@stellar/freighter-api";
```

Or import only what you need:

```javascript
import {
  isConnected,
  getAddress,
  signAuthEntry,
  signTransaction,
  signMessage,
  addToken,
} from "@stellar/freighter-api";
```

> See the [Extension Integration](/extension-freighter-api/extension.md) for the full API reference.

### CDN (script tag)

Use this for plain HTML pages or projects without a build step. The library is loaded directly in the browser.

**Ideal for:**

* Static HTML sites
* Prototypes and quick experiments
* Projects without a bundler

Add to your `<head>`:

```html
<script src="https://unpkg.com/@stellar/freighter-api/build/index.min.js"></script>
```

This always loads the latest version automatically. To pin a specific version:

```html
<script src="https://unpkg.com/@stellar/freighter-api@6.0.1/build/index.min.js"></script>
```

Then access the API via `window.freighterApi`:

```javascript
const { address } = await window.freighterApi.requestAccess();
```

## Next steps

| I want to...                | Go to                                                            |
| --------------------------- | ---------------------------------------------------------------- |
| Connect my app to Freighter | [Connecting](/extension-freighter-api/connecting.md)             |
| Sign a transaction          | [Signing](/extension-freighter-api/signing.md)                   |
| Add a token                 | [Token Management](/extension-freighter-api/token-management.md) |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.freighter.app/extension-freighter-api/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
