Metadata-Version: 2.4
Name: ai-blog-publisher
Version: 0.2.0
Summary: An enterprise-grade CLI utility to generate structured blog posts using local Ollama and push them to GitHub JSON schemas.
Author-email: Engineering Professional <developer@example.com>
License-Expression: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: ollama>=0.1.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: rich>=13.0.0

Markdown
# ai-blog-publisher

[![PyPI version](https://img.shields.io/pypi/v/ai-blog-publisher.svg)](https://pypi.org/project/ai-blog-publisher/)
[![Python Versions](https://img.shields.io/pypi/pyversions/ai-blog-publisher.svg)](https://pypi.org/project/ai-blog-publisher/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**ai-blog-publisher** (`aiblog`) is an enterprise-grade, resilient CLI utility that leverages local **Ollama** LLMs to generate structured blog posts and safely commit them to remote JSON schema files on GitHub.

---

## Features

* **LLM Resilience & JSON Repair:** Strips markdown code fences and repairs malformed model outputs automatically.
* **Service Health-Check:** Validates that the local Ollama daemon and selected model are online before execution.
* **Exponential Backoff Retries:** Handles transient network failures during GitHub API interactions.
* **Dry-Run Safety Mode:** Test generation locally without committing to remote repositories (`--dry-run`).

---

## Installation

```bash
pip install --editable .
Configuration
Set your environment variables:

Bash
export GITHUB_TOKEN="your_github_token"
export GITHUB_REPO="your-username/your-repo-name"
Usage
Bash
# Standard interactive run
aiblog

# Test generation without pushing to GitHub
aiblog --dry-run

# Use custom model or file path
aiblog --model "llama3" --path "_data/posts.json"

License
Distributed under the MIT License. See LICENSE for more information.
