Thanks for your interest in contributing! This guide will help you get started.
- Python 3.13+
- uv package manager
# Fork and clone the repo
git clone https://github.com/YOUR_USERNAME/AutoViralAI.git
cd AutoViralAI
# Install all dependencies (including dev)
uv sync --dev
# Copy env file
cp .env.example .env
# Set ANTHROPIC_API_KEY in .env (only key needed for dev)
# Run tests to verify setup
uv run pytest# Run a single creation cycle (mock APIs, interactive approval)
uv run python scripts/manual_run.py
# Auto-approve mode (skips human approval)
uv run python scripts/manual_run.py --auto-approve
# Run the learning pipeline
uv run python scripts/manual_run.py --pipeline learning
# Health check
uv run python scripts/check_health.py-
Create a branch from
main:git checkout -b feat/your-feature
-
Make your changes and add tests.
-
Run checks before committing:
# Lint uv run ruff check . # Format uv run ruff format . # Tests uv run pytest
-
Commit with a clear message:
feat: add Twitter platform support fix: handle empty research results gracefully docs: update configuration examples test: add ranking edge case tests -
Push and open a PR against
main.
- We use ruff for linting and formatting.
- Line length: 100 characters.
- Target: Python 3.13.
- Type hints are expected on all public functions.
- Use
async/awaitfor I/O operations.
Ruff handles everything — no need for black, isort, or flake8.
src/
├── models/ # Pydantic data models (state, strategy, content, etc.)
├── graphs/ # LangGraph pipeline definitions
├── nodes/ # Individual pipeline steps (one file per node)
├── tools/ # External service wrappers (mock-first)
├── prompts/ # LLM prompt templates
└── store/ # Knowledge base wrapper
Key principles:
- Mock-first: Every external service has a mock implementation. Tests should never require API keys.
- Nodes are pure-ish: Each node takes state + dependencies, returns state updates. Side effects go through injected clients.
- Structured LLM output: Use Pydantic models with
.with_structured_output()— never parse raw text.
# Run all tests
uv run pytest
# With coverage
uv run pytest --cov=src --cov-report=term-missing
# Run specific test file
uv run pytest tests/test_nodes/test_ranking.py
# Run specific test
uv run pytest tests/test_nodes/test_ranking.py::test_rank_selects_best -vTests live in tests/ and mirror the src/ structure. If you add a new node or tool, add corresponding tests.
Look for issues labeled good first issue. Some ideas:
- Add more content pattern templates
- Improve error handling with retry logic
- Add tests for uncovered edge cases
- Improve documentation or examples
- Add support for new research sources (HackerNews, ProductHunt)
The architecture supports multiple platforms. To add one:
- Create
src/tools/your_platform_client.pyimplementing the client interface - Add mock + real implementations (see
threads_api.pyfor reference) - Add tests in
tests/test_tools/ - Update
config/settings.pywith new env vars - Update
.env.example
Open an issue or start a discussion. We're happy to help!