An open API service indexing awesome lists of open source software.

https://github.com/zapthedingbat/ask-glean

An automation tool for asking Glean
https://github.com/zapthedingbat/ask-glean

Last synced: about 1 year ago
JSON representation

An automation tool for asking Glean

Awesome Lists containing this project

README

          

# Ask Glean

AI and automation are all about driving efficiency, but sometimes using these tools can feel a little inefficient. This tool brings the efficiency of automation to AI by automating the process of logging in and asking questions so you can stay focused on the tasks that matter and be more efficient!

## Running locally

Run once to automate logging into Glean and asking a question.

- Log into Glean
- Grab the cookie named `azure-hosted-login-session-store`
- Set this and your email in the environment variables or `.env` file
- Run `main.js`

If you're using a .env file you'll need to require `dotenv/config` like so.
```
node -r dotenv/config src/main.js
```

## Running in docker

There's a docker file that can be build and run the automation on a schedule (daily at 9:00 by default)

- Log into Glean
- Grab the cookie named `azure-hosted-login-session-store`
- Set this and your email in environment variables GLEAN_EMAIL and GLEAN_COOKIE
- (optionally) Set the `GLEAN_CRON` environment variable to control the schedule. e.g `0 9 * * *`

Build the image:
```
docker build -t ask-glean .
```

Run the docker container
```
docker run -d --name ask-glean -e GLEAN_EMAIL="user.name@example.com" -e GLEAN_COOKIE="AbCXzY123" ask-glean
```
or with a .env file
```
docker run -d --name ask-glean --env-file .env ask-glean
```