{"id":30798944,"url":"https://github.com/fsecada01/reports-ai","last_synced_at":"2026-04-16T14:02:46.603Z","repository":{"id":313123850,"uuid":"1050119558","full_name":"fsecada01/reports-ai","owner":"fsecada01","description":"Django app to generate AI-assisted summaries from Git commit history (OpenAI/Anthropic/Gemini).","archived":false,"fork":false,"pushed_at":"2025-09-04T02:07:42.000Z","size":255,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-04T04:21:35.180Z","etag":null,"topics":["ai","django","django-ai-assistant","git","llm","pdoc","reporting"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fsecada01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-09-04T01:25:43.000Z","updated_at":"2025-09-04T02:07:46.000Z","dependencies_parsed_at":"2025-09-04T04:22:54.907Z","dependency_job_id":"8f5b5822-1959-4aef-9e44-e562f73222ed","html_url":"https://github.com/fsecada01/reports-ai","commit_stats":null,"previous_names":["fsecada01/reports-ai"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/fsecada01/reports-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsecada01%2Freports-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsecada01%2Freports-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsecada01%2Freports-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsecada01%2Freports-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fsecada01","download_url":"https://codeload.github.com/fsecada01/reports-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsecada01%2Freports-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273805610,"owners_count":25171560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","django","django-ai-assistant","git","llm","pdoc","reporting"],"created_at":"2025-09-05T19:02:29.150Z","updated_at":"2026-04-16T14:02:41.534Z","avatar_url":"https://github.com/fsecada01.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Reports AI - Alpha\n\n**Status: This project is in Alpha. APIs and features may change.**\n\nReports AI is a Django module that leverages the power of Large Language Models (LLMs) to automatically generate summary reports from your project's Git history. It provides a simple, yet powerful, interface within the Django admin to create, manage, and view these reports.\n\n![Reports AI Screenshot](https://placehold.co/600x400)\n\n## Features\n\n- **Automated Report Generation**: Analyze your Git commit history and generate high-level summaries of development progress.\n- **LLM Integration**: Powered by `django-ai-assistant`, it supports a wide range of LLM providers, including OpenAI, Anthropic, and Google.\n- **Private Repository Support**: Securely access private GitHub repositories using a personal access token.\n- **Django Admin Interface**: Manage and view reports directly from the Django admin.\n- **Customizable**: Easily extendable to support different LLM providers and models.\n\n## Installation\n\n1.  **Install the package**:\n\n    ```bash\n    pip install -e git+https://github.com/fsecada01/reports_ai.git#egg=reports_ai\n    ```\n\n2.  **Add to `INSTALLED_APPS`**:\n\n    In your project's `settings.py`, add `reports_ai` and `django_ai_assistant` to the `INSTALLED_APPS` list:\n\n    ```python\n    INSTALLED_APPS = [\n        # ...\n        'reports_ai',\n        'django_ai_assistant',\n    ]\n    ```\n\n3.  **Run migrations**:\n\n    ```bash\n    python manage.py migrate\n    ```\n\n## Requirements\n\n- Python 3.11+\n- Django 4.2+\n\n## Configuration\n\n1.  **Environment Variables**:\n\n    Create a `.env` file in your project's root directory and add the following variables:\n\n    ```\n    # .env\n    REPORTS_AI_LLM_PROVIDER=openai\n    REPORTS_AI_LLM_API_KEY=your_api_key\n    # Optional: override model (default: gpt-4o)\n    REPORTS_AI_LLM_MODEL=gpt-4o\n    REPORTS_AI_GITHUB_TOKEN=your_github_token\n    ```\n\n2.  **`settings.py`**:\n\n    Add the following to your `settings.py` to configure the LLM provider and clone path:\n\n    ```python\n    # settings.py\n    REPORTS_AI_CLONE_PATH = \"git_repos\"\n\n    LLM_PROVIDER = os.getenv('REPORTS_AI_LLM_PROVIDER', 'openai')\n    LLM_API_KEY = os.getenv('REPORTS_AI_LLM_API_KEY')\n\n    if LLM_PROVIDER == 'openai':\n        os.environ['OPENAI_API_KEY'] = LLM_API_KEY\n    elif LLM_PROVIDER == 'anthropic':\n        os.environ['ANTHROPIC_API_KEY'] = LLM_API_KEY\n    elif LLM_PROVIDER == 'google':\n        os.environ['GOOGLE_API_KEY'] = LLM_API_KEY\n    ```\n\n### Providers and required packages\n\n`reports_ai` uses LangChain chat models under the hood. Depending on `REPORTS_AI_LLM_PROVIDER`, ensure the corresponding package is installed:\n\n- `openai` (default): `langchain-openai` (already included via dependency tree)\n- `anthropic`: install `langchain-anthropic`\n- `google` (Gemini): install `langchain-google-genai`\n\nExample with `uv`:\n\n```bash\nuv add langchain-anthropic  # or langchain-google-genai\n```\n\n## Usage\n\n1.  **Navigate to the Django Admin**:\n\n    Go to your Django admin interface and you will see a \"Report Instances\" section.\n\n2.  **Create a Report Instance**:\n\n    -   Click \"Add Report Instance\".\n    -   Fill in the title and the URL of the Git repository.\n    -   Save the instance.\n\n3.  **Generate a Report**:\n\n    -   From the report instance detail view, click the \"Generate/Regenerate Report\" button.\n    -   The report generation will be queued as a background task.\n    -   The status of the report will be updated to \"Generating\" and then \"Completed\" or \"Failed\".\n\n4.  **View the Report**:\n\n    -   Once the report is completed, the generated summary will be displayed in the report instance detail view.\n\n## Customization\n\n### Supported LLM Providers\n\nThis module supports OpenAI, Anthropic, and Google out of the box. To add a new provider, you need to:\n\n1.  Update the `settings.py` to set the provider-specific API key.\n2.  Update `reports_ai/ai_assistants.py` to include the new provider and model.\n\n### Report Generation Prompt\n\nYou can customize the prompt used for report generation by modifying the `instructions` in the `ReportAssistant` class in `reports_ai/ai_assistants.py`.\n\n## Development: Pre-commit hooks\n\nInstall and run pre-commit to keep code formatted and linted consistently:\n\n```bash\nuv sync --dev\npre-commit install\npre-commit run --all-files\n```\n\n## Releasing\n\nWe use tag-driven releases. To cut a release:\n\n- Update version in `pyproject.toml` (`[project].version`).\n- Commit the change, then create and push a tag:\n\n```bash\ngit commit -am \"chore(release): vX.Y.Z\"\ngit tag -a vX.Y.Z -m \"Release vX.Y.Z\"\ngit push origin vX.Y.Z\n```\n\nCI will build artifacts, create a GitHub Release, and publish to PyPI (requires `PYPI_API_TOKEN` secret). See CONTRIBUTING.md for details.\n\n## TODO (Beta)\n\n- **API stability**: finalize public interfaces, document breaking changes,\n  add deprecation path where needed.\n- **Tests (≥80% coverage)**: add unit tests for services, models, and admin\n  actions; include basic integration for report generation flow.\n- **Error handling**: tighten exception handling in tasks/services; surface\n  actionable errors in the admin; add structured logging.\n- **Docs templates**: replace HTML post-processing with pdoc template\n  overrides (`PDOC_TEMPLATE_DIR`), version-pinned to current pdoc.\n- **Docs templating setup**: stub `docs/pdoc_templates/` (or `docs/templates/`),\n  wire `PDOC_TEMPLATE_DIR` in the docs build, and migrate current navbar,\n  footer, and head injections into Jinja overrides.\n- **Docs fonts**: add custom fonts (e.g., Inter + JetBrains Mono) with\n  local fallbacks; ensure no network fetch in CI/Pages.\n- **Active nav highlighting**: highlight the current page in the top navbar\n  across docs pages.\n- **Docs content**: expand guides (configuration, usage, troubleshooting),\n  add admin screenshots and examples; improve landing page.\n- **CI controls**: keep deploys on `main` only; add `workflow_dispatch` for\n  manual releases; require status checks before release deploy.\n- **Security \u0026 config**: validate required env vars at startup; ensure clone\n  path permissions and cleanup; re-verify no secrets in repo.\n- **Performance**: cache/clobber strategy for repo clones; tune Celery\n  concurrency and task timeouts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsecada01%2Freports-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffsecada01%2Freports-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsecada01%2Freports-ai/lists"}