ReiltasGG/apartment-hunter

GitHub: ReiltasGG/apartment-hunter

Stars: 0 | Forks: 0

# 🏠 Apartment Hunter CLI A terminal-based apartment hunter powered by **Ollama + Gemma 4**. Scrapes Craigslist listings, uses a local AI model to rank them against your amenity wishlist and budget, and outputs a clean **PDF report** of the top 3 matches. ## Prerequisites - Python 3.11+ - [Ollama](https://ollama.com) installed and running - Gemma 4 model pulled in Ollama ## Setup ### 1. Clone the repo git clone https://github.com/ReiltasGG/apartment-hunter.git cd apartment-hunter ### 2. Create and activate a virtual environment python3 -m venv venv source venv/bin/activate ### 3. Install dependencies pip install -r requirements.txt ### 4. Pull the model in Ollama (one time) ollama pull gemma4:e4b ### 5. Start Ollama in a separate terminal ollama serve ## Usage Just run the script — it will ask you everything it needs: python apartment_hunter.py You'll be prompted for: - **City** — Craigslist city subdomain (e.g. `houston`, `austin`, `dallas`) - **Min budget** — optional minimum rent - **Max budget** — maximum monthly rent (strictly enforced) - **Bedrooms** — optional bedroom count filter - **Amenities** — comma-separated list of what you want (e.g. `gym, parking, in-unit laundry, pet friendly`) ## Output The script will: 1. Show live progress as it scrapes and queries the AI 2. Print the top 3 results directly in the terminal 3. Save a **PDF report** containing: - Rent, location, and link to the listing - ✅ Amenities found / ❌ Amenities missing - What's nearby (restaurants, transit, parks) - AI summary of why it's a good pick - Match score out of 100 ## Returning to the project cd apartment-hunter source venv/bin/activate python apartment_hunter.py ## Troubleshooting | Problem | Fix | |---------|-----| | `Cannot connect to Ollama` | Run `ollama serve` in another terminal | | `No listings found` | Try a wider price range or check city spelling | | `JSON parse error` | Raw Ollama output saved to `ollama_raw.txt` for debugging | | Results over budget | Budget is now hard-filtered before and after AI ranking |