Basil Docs

v1.0.0

Basil Installation

Installation

Multiple installation methods to get Basil running in your environment. Choose the method that works best for your setup.

Prerequisites

Required

  • Docker (recommended) or Python 3.11+
  • Groq API Key (for AI processing)
  • Git for cloning the repository

Groq API Key Required

Get your free Groq API key at console.groq.com. The free tier includes generous usage limits perfect for getting started.

Method 1: Docker Installation (Recommended)

Recommended for production and easy deployment

Step 1: Clone the Repository

git clone https://github.com/basil-retriever/Basil cd Basil

Step 2: Configure Environment

Copy the environment template and add your Groq API key:

cp .env.example .env # Edit .env and add your GROQ_API_KEY

Step 3: Launch with Docker Compose

docker-compose up -d

What this does:

  • • Builds the Basil application container
  • • Sets up ChromaDB for vector storage
  • • Configures networking between services
  • • Exposes API on port 8000

Method 2: Manual Installation

Requires Python 3.11+ and manual dependency management

Step 1: Clone and Navigate

git clone https://github.com/basil-retriever/Basil cd Basil/basil-search

Step 2: Create Virtual Environment (Recommended)

python -m venv basil-env source basil-env/bin/activate # On Windows: basil-env\Scripts\activate

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Configure Environment

cp .env.example .env # Edit .env and add your GROQ_API_KEY

Key Dependencies Installed:

Core Framework:

  • • FastAPI 0.104.1
  • • Uvicorn 0.24.0
  • • ChromaDB 0.4.15

AI & Processing:

  • • Sentence Transformers 2.2.2
  • • BeautifulSoup4 4.12.2
  • • Requests 2.31.0

Configuration

Environment Variables

Configure Basil by setting these environment variables in your .env file:

Variable Description Default Required
GROQ_API_KEY API key for Groq AI processing - Yes
API_HOST Server host address 0.0.0.0 No
API_PORT Server port 8000 No
CHROMA_COLLECTION_NAME Database collection name basil_docs No
EMBEDDING_MODEL Sentence transformer model all-MiniLM-L6-v2 No

Example .env File

# Required GROQ_API_KEY=your_groq_api_key_here # Optional (with defaults) API_HOST=0.0.0.0 API_PORT=8000 CHROMA_COLLECTION_NAME=basil_docs EMBEDDING_MODEL=all-MiniLM-L6-v2

Production Deployment

Docker Compose with Nginx

For production deployments, use the included Nginx reverse proxy:

docker-compose --profile production up -d

Production Features:

  • • Nginx reverse proxy
  • • SSL/TLS termination ready
  • • Load balancing capabilities
  • • Static file serving
  • • Gzip compression

Performance Benefits:

  • • 100+ concurrent users
  • • Sub-second search responses
  • • Efficient resource usage
  • • Automatic container restart
  • • Health check monitoring

Verify Installation

Check Configuration

python pipeline.py --check-config

Test API Health

curl http://localhost:8000/health

Expected Response

{ "status": "healthy", "version": "1.0.0", "components": { "database": "connected", "ai_service": "available" } }
Installation Complete!

If you see the healthy response, Basil is ready to scrape and search websites.

Next Steps

Get Started

Learn how to scrape your first website and start searching with Basil.

View Getting Started Guide

API Documentation

Explore all available endpoints and integrate Basil into your applications.

View API Reference