> ## Documentation Index
> Fetch the complete documentation index at: https://omnicron.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Follow these steps to install Omnicron and get started quickly.

## Installation

To install Omnicron, follow these steps:

<Steps>
  <Step title="Clone the Repository">
    Clone the Git repository to your local machine:

    ```sh theme={null}
    git clone https://github.com/kingmariano/omnicron.git
    ```
  </Step>

  <Step title="Set Up Environment Variables">
    Configure the necessary environment variables for Omnicron.

    * **MY API KEY**: Generate a random API key. It can be done using various methods. Either by using openssl or any other method suitable for you.

    ```sh theme={null}
    openssl rand -base64 32
    ```

    * **Port**: Set the port to `9000` or any other port number.

    * **GROK API KEY**: Signup/Login to the [Grok Console Cloud](https://console.groq.com/login) and retrieve your API token.

    * **GEMINI PRO API KEY**: Signup/Login to the [Google Gemini Studio](https://ai.google.dev/aistudio/) and retrieve your API token.

    * **REPLICATE API TOKEN**: Signup/Login to [Replicate](https://replicate.com/) and retrieve your API token.

    * **CLOUDINARY URL**: Signup/Login to Cloudinary. Navigate to the [Cloudinary Console](https://console.cloudinary.com/) and get your Cloudinary URL secret. It should look like this: `cloudinary://<your_api_key>:<your_api_secret>@djagytapi`

      * **TESSDATA PREFIX**: This is the location of where Tesseract is installed on your machine. Install [Tesseract](https://tesseract-ocr.github.io/tessdoc/Installation.html) for your OS and set the location to `/usr/local/share/tessdata` for Linux or `C:\Program Files\Tesseract-OCR\tessdata` for Windows. If yours is configured to a different file location, set it to where the **tessdata** location is on your machine.

    * **FAST API BASE URL**: Set this to `http://0.0.0.0:8000` or `http://localhost:8000` to connect the FastAPI server to the Go code.

    * **Environment Variables**: Create a `.env` file in the project root directory and add the following:

    ```ini env theme={null}
    PORT=9000
    MY_API_KEY=YOUR_API_KEY_HERE
    GROK_API_KEY=YOUR_GROK_API_KEY_HERE
    GEMINI_PRO_API_KEY=YOUR_GEMINI_PRO_API_KEY_HERE
    REPLICATE_API_TOKEN=YOUR_REPLICATE_API_TOKEN_HERE
    CLOUDINARY_URL=YOUR_CLOUDINARY_URL_HERE
    TESSDATA_PREFIX=/usr/local/share/tessdata  # or C:\Program Files\Tesseract-OCR\tessdata for Windows
    FAST_API_BASE_URL=http://0.0.0.0:8000
    ```
  </Step>

  <Step title="Build and Run the Application">
    First, install all the Python dependencies by running:

    ```sh bash theme={null}
    pip install --upgrade -r ./python/requirements.txt
    ```

    Then build and run the application:

    ```sh bash theme={null}
    go build -o omnicron && ./omnicron
    ```
  </Step>

  <Step title="Using Docker Compose">
    You can use Docker Compose to build the image:

    ```sh docker theme={null}
    docker-compose up --build
    ```
  </Step>

  <Step title="Usage">
    After setting up and running the application, you can navigate to `http://localhost:9000/readiness` to check the health of the application.
  </Step>
</Steps>
