# Installation

## Installing

Using the packet manager of your choice you can install chocolat like this:

```bash
yarn add chocolat
# or 
npm install chocolat
```

You can also clone or download the source and copy the `./dist/` folder in your working directory :

```
https://github.com/nicolas-t/chocolat/archive/master.zip
```

#### Classic import

If you do not use a module , you can still import chocolat via script tags (preferably just before closing `</body>`) :&#x20;

```markup
    <!-- ... -->
    <script src="dist/js/chocolat.js"></script>
</body>
```

You will also need to import the css between the `<head>` tags :

```markup
<head>
    <!-- ... -->
    <link rel="stylesheet" href="../dist/css/chocolat.css" />
    <!-- ... -->
</head>
```

#### Modern import&#x20;

If you use a bundler like webpack you can then import Chocolat module in your javascript file :

```javascript
import Chocolat from 'chocolat'
```

And import the CSS in your CSS file :&#x20;

```css
@import '~chocolat/dist/css/chocolat.css';
```


---

# 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://chocolat.gitbook.io/chocolat/master.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.
