npm package: @kozmoai/glint
Description: <!-- markdownlint-disable MD030 -->
Latest version: 1.0.0

<!-- markdownlint-disable MD030 -->

<img width="100%" src="https://github.com/kozmoai/glint/blob/main/images/glint.png?raw=true"></a>

# Glint - Build LLM Apps Easily

[![Release Notes](https://img.shields.io/github/release/kozmoai/glint)](https://github.com/kozmoai/glint/releases)
[![Discord](https://img.shields.io/discord/1087698854775881778?label=Discord&logo=discord)](https://discord.gg/jbaHfsRVBW)
[![Twitter Follow](https://img.shields.io/twitter/follow/kozmoai?style=social)](https://twitter.com/kozmoai)
[![GitHub star chart](https://img.shields.io/github/stars/kozmoai/glint?style=social)](https://star-history.com/#kozmoai/glint)
[![GitHub fork](https://img.shields.io/github/forks/kozmoai/glint?style=social)](https://github.com/kozmoai/glint/fork)


<h3>Drag & drop UI to build your customized LLM flow</h3>
<a href="https://github.com/kozmoai/glint">
<img width="100%" src="https://github.com/kozmoai/glint/blob/main/images/glint.gif?raw=true"></a>

## ⚡Quick Start

Download and Install [NodeJS](https://nodejs.org/en/download) >= 18.15.0

1. Install Glint
    ```bash
    npm install -g @kozmoai/glint
    ```
2. Start Glint

    ```bash
    npx glint start
    ```

    With username & password

    ```bash
    npx glint start --GLINT_USERNAME=user --GLINT_PASSWORD=1234
    ```

3. Open [http://localhost:3000](http://localhost:3000)

## 🐳 Docker

### Docker Compose

1. Go to `docker` folder at the root of the project
2. Copy `.env.example` file, paste it into the same location, and rename to `.env`
3. `docker-compose up -d`
4. Open [http://localhost:3000](http://localhost:3000)
5. You can bring the containers down by `docker-compose stop`

### Docker Image

1. Build the image locally:
    ```bash
    docker build --no-cache -t glint .
    ```
2. Run image:

    ```bash
    docker run -d --name glint -p 3000:3000 glint
    ```

3. Stop image:
    ```bash
    docker stop glint
    ```

## 👨‍💻 Developers

Glint has 3 different modules in a single mono repository.

-   `server`: Node backend to serve API logics
-   `ui`: React frontend
-   `components`: Third-party nodes integrations

### Prerequisite

-   Install [PNPM](https://pnpm.io/installation)
    ```bash
    npm i -g pnpm
    ```

### Setup

1. Clone the repository

    ```bash
    git clone https://github.com/kozmoai/glint.git
    ```

2. Go into repository folder

    ```bash
    cd Glint
    ```

3. Install all dependencies of all modules:

    ```bash
    pnpm install
    ```

4. Build all the code:

    ```bash
    pnpm build
    ```

5. Start the app:

    ```bash
    pnpm start
    ```

    You can now access the app on [http://localhost:3000](http://localhost:3000)

6. For development build:

    - Create `.env` file and specify the `VITE_PORT` (refer to `.env.example`) in `packages/ui`
    - Create `.env` file and specify the `PORT` (refer to `.env.example`) in `packages/server`
    - Run

        ```bash
        pnpm dev
        ```

    Any code changes will reload the app automatically on [http://localhost:8080](http://localhost:8080)

## 🔒 Authentication

To enable app level authentication, add `GLINT_USERNAME` and `GLINT_PASSWORD` to the `.env` file in `packages/server`:

```
GLINT_USERNAME=user
GLINT_PASSWORD=1234
```

## 🌱 Env Variables

Glint support different environment variables to configure your instance. You can specify the following variables in the `.env` file inside `packages/server` folder. Read [more](https://github.com/kozmoai/glint/blob/main/CONTRIBUTING.md#-env-variables)

## 📖 Documentation

[Glint Docs](https://docs.wearekozmoai.com/)

## 🌐 Self Host

Deploy Glint self-hosted in your existing infrastructure, we support various [deployments](https://docs.wearekozmoai.com/configuration/deployment)

-   [AWS](https://docs.wearekozmoai.com/deployment/aws)
-   [Azure](https://docs.wearekozmoai.com/deployment/azure)
-   [Digital Ocean](https://docs.wearekozmoai.com/deployment/digital-ocean)
-   [GCP](https://docs.wearekozmoai.com/deployment/gcp)
-   <details>
      <summary>Others</summary>

    -   [Railway](https://docs.wearekozmoai.com/deployment/railway)

        [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/pn4G8S?referralCode=WVNPD9)

    -   [Render](https://docs.wearekozmoai.com/deployment/render)

        [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://docs.wearekozmoai.com/deployment/render)

    -   [HuggingFace Spaces](https://docs.wearekozmoai.com/deployment/hugging-face)

        <a href="https://huggingface.co/spaces/kozmoai/glint"><img src="https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg" alt="HuggingFace Spaces"></a>

    -   [Elestio](https://elest.io/open-source/kozmoai)

        [![Deploy](https://pub-da36157c854648669813f3f76c526c2b.r2.dev/deploy-on-elestio-black.png)](https://elest.io/open-source/kozmoai)

    -   [Sealos](https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dglint)

        [![](https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dglint)

    -   [RepoCloud](https://repocloud.io/details/?app_id=29)

        [![Deploy on RepoCloud](https://d16t0pc4846x52.cloudfront.net/deploy.png)](https://repocloud.io/details/?app_id=29)

      </details>

## 💻 Cloud Hosted

Coming soon