---
title: Installation
icon: terminal
---

Use [uv](https://github.com/astral-sh/uv) to add and manage PineText as a dependency in your project, or install it directly via `uv pip install` or `pip install`. See the [Installation](https://github.com/ezhuk/modbus-mcp/blob/main/docs/modbus-mcp/installation.mdx) section of the documentation for full installation instructions and more details.

```bash
uv add pinetext
```

It can be embedded in and run directly from your application.

```python
# app.py
from pinetext import PineText

def main():
    pt = PineText()
    pt.run()
```

It can also be launched from the command line using the provided `CLI` without modifying the source code.

```
pinetext
```

Or in an ephemeral, isolated environment using `uvx`. Check out the [Using tools](https://docs.astral.sh/uv/guides/tools/) guide for more details.

```bash
uvx pinetext
```

## Configuration

Place documents in the `data` folder and make sure to set `PINECONE_API_KEY` and the assistant name before starting PineText.

```bash
export PINETEXT_PINECONE__API_KEY=your-api-key
export PINETEXT_PINECONE__ASSISTANT=assistant-name
export PINETEXT_PINECONE__DATA_DIR=data
export PINETEXT_PINECONE__MODEL=o4-mini
```

These settings can also be specified in a `.env` file in the working directory.

```text
pinetext_pinecone__api_key=your-api-key
pinetext_pinecone__assistant=assistant-name
pinetext_pinecone__data_dir=data
pinetext_pinecone__model=o4-mini
```
