Metadata-Version: 2.4
Name: redhat-oracle
Version: 0.1.0
Summary: AI-powered knowledge assistant for Red Hat engineering teams
Author: Red Hat Oracle Contributors
License-Expression: MIT
Project-URL: Homepage, https://github.com/dmzoneill/redhat-oracle
Project-URL: Repository, https://github.com/dmzoneill/redhat-oracle
Project-URL: Issues, https://github.com/dmzoneill/redhat-oracle/issues
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: httpx>=0.27
Requires-Dist: gitpython>=3.1
Requires-Dist: chromadb>=0.5
Requires-Dist: sentence-transformers>=3.0
Requires-Dist: click>=8.1
Requires-Dist: prompt-toolkit>=3.0
Requires-Dist: rich>=13.0
Requires-Dist: platformdirs>=4.0
Requires-Dist: PySide6>=6.6
Requires-Dist: pycookiecheat>=0.7
Requires-Dist: beautifulsoup4>=4.12
Provides-Extra: gui
Requires-Dist: PySide6-WebEngine>=6.6; extra == "gui"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.24; extra == "dev"
Requires-Dist: pytest-xdist>=3.5; extra == "dev"
Requires-Dist: ruff>=0.8; extra == "dev"
Requires-Dist: mypy>=1.13; extra == "dev"
Requires-Dist: types-PyYAML>=6.0; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"

# Red Hat Oracle

AI-powered knowledge assistant for Red Hat engineering teams. Ingests GitHub/GitLab repositories, Jira issues, GitLab Pages, public web docs, and Slack conversations, indexes them in a ChromaDB vector store, and provides RAG-based chat via local or cloud LLMs.

## Prerequisites

- Python 3.11+
- [Ollama](https://ollama.com/) running locally (recommended LLM backend)
- Git (for cloning source repos)

## Installation

```bash
# Clone the repo
git clone git@github.com:dmzoneill/redhat-oracle.git
cd redhat-oracle

# Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install in development mode (with dev dependencies)
pip install -e ".[dev]"

# Or install without dev dependencies
pip install -e .
```

## Configuration

Copy and edit the sample config:

```bash
cp oracle.yaml ~/.config/redhat-oracle/oracle.yaml
```

Config files are loaded and merged in order (higher precedence wins):

1. `/etc/redhat-oracle/oracle.yaml` (system)
2. `~/.config/redhat-oracle/oracle.yaml` (user)
3. `./oracle.yaml` (project)

### Secrets

Tokens are **never** stored in config files. Set them as environment variables:

```bash
export ORACLE_GITHUB_TOKEN="ghp_..."
export ORACLE_GITLAB_TOKEN="glpat-..."
export ORACLE_SLACK_TOKEN="xoxb-..."
export ORACLE_JIRA_TOKEN="..."
export OPENAI_API_KEY="sk-..."        # optional, if using OpenAI
export ANTHROPIC_API_KEY="sk-ant-..." # optional, if using Anthropic
```

## Usage

### CLI

```bash
oracle            # Start interactive chat
oracle sync       # Sync all configured sources
oracle status     # Show index status
```

### GUI (optional)

```bash
pip install -e ".[gui]"
oracle --gui
```

## Development

```bash
# Run tests
make test

# Lint
make lint

# Type check
make typecheck

# Build distribution
make build
```

Or run commands directly:

```bash
pytest tests/
ruff check src/ tests/
mypy src/
```

## Architecture

| Module | Purpose |
|---|---|
| `core/config.py` | YAML config loading with Pydantic validation |
| `core/sources/` | Data source connectors (GitHub, GitLab, Slack, Jira, Pages, Web) |
| `core/vectordb/` | ChromaDB vector store, AST-aware chunking, change tracking |
| `core/rag.py` | RAG pipeline: embed query, search, assemble context, stream LLM |
| `core/cache.py` | Response caching |
| `cli/app.py` | Click + prompt-toolkit + Rich terminal UI |
| `gui/app.py` | PySide6 (Qt) desktop GUI |

## License

MIT
