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

# Javascript / Node.js

## Getting Started

To install llongterm, use npm or yarn:

```bash
npm install llongterm
```

or

```bash
yarn add llongterm
```

After installation, ensure you setup your `.env` file to house your credentials privately.

```sh
OPENAI_API_KEY=abcdefg...
LLONGTERM_KEY=hijklmnop
```

Then we can initialise Llongterm.

```ts
import { Llongterm } from 'llongterm' 
```

```javascript
// after importing Llongterm

const llongterm = new Llongterm({
  keys: { llongterm: process.env.LLONGTERM_KEY, openai: process.env.OPENAI_API_KEY },
});
```

To get all you can out of Llongterm, you'll need to create a mind that can store memory. That's next!
