# Beacon - Installation

### Installing beacon.li

To get started with beacon.li and incorporate it into your project, you'll need to follow these simple steps for installation.

#### Prerequisites

Before you proceed, ensure that you have Node.js and npm (Node Package Manager) installed on your system. If you haven't already, you can download them from [nodejs.org](https://nodejs.org/).

#### Installation

Once you have Node.js and npm set up, open your terminal or command prompt and execute the following command to install Beacon.li:

```
npm install @beacon.li/bar
```

OR

```
yarn add @beacon.li/bar
```

OR

If you want to use a \<script> tag instead, you can use the below code snippet which will import and load the beacon bar directly without npm package.

{% code lineNumbers="true" fullWidth="true" %}

```
<script>
(function(b,e,a,c,o,n) {b[c] = {orgId:n, open:()=>{b[c].opened=true}};
  var s = e.createElement(a);
  s.src='https://cdn.beacon.li/sdk/latest.js';s.async=true;s.type='module';
  var d = e.createElement(o);
  d.id='beacon-user';
  e.body.appendChild(d);
  e.head.appendChild(s);
})(window, document, 'script', 'BeaconBar', 'div','ORG_ID');
</script>
```

{% endcode %}

This code will fetch the latest version of beacon.li and add it as a dependency to your project.

That's it! You're now ready to start using beacon.li in your project. If you encounter any issues during installation or have questions about how to use beacon.li, refer to our comprehensive documentation or reach out to our [support@beacon.li](https://app.gitbook.com/u/EHYP9cW6p6YCuiKBsBna98PPus53) for assistance.

Please note that you may need to refer to the below two steps as well, for robust integration and a better experience to your users.

{% content-ref url="native-routing-in-beacon" %}
[native-routing-in-beacon](https://api.beacon.li/native-routing-in-beacon)
{% endcontent-ref %}

{% content-ref url="implementing-content-security-policy-csp-for-beacon-integration" %}
[implementing-content-security-policy-csp-for-beacon-integration](https://api.beacon.li/implementing-content-security-policy-csp-for-beacon-integration)
{% endcontent-ref %}


---

# 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://api.beacon.li/beacon-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.
