Metadata-Version: 2.4
Name: tribune-agent
Version: 0.1.0a1
Summary: AI code/PR review agent. Fetches a pull request, asks an LLM to review it, posts inline comments + summary verdict back to the VCS. Self-hosted, multi-VCS (GitHub, GitLab, Bitbucket, Azure DevOps), multi-LLM (Anthropic / OpenAI / Google / Claude Code / Ollama). Standalone: no inter-package runtime deps.
Project-URL: Homepage, https://thinknextsoftware.com
Project-URL: Documentation, https://github.com/Thinknext-Software-Solutions/Tribune
Project-URL: Repository, https://github.com/Thinknext-Software-Solutions/Tribune
Project-URL: Issues, https://github.com/Thinknext-Software-Solutions/Tribune/issues
Project-URL: Changelog, https://github.com/Thinknext-Software-Solutions/Tribune/releases
Author-email: ThinkNext Software Solutions <hello@thinknextsoftware.com>
License: MIT License
        
        Copyright (c) 2026 ThinkNext Software Solutions
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
License-File: LICENSE
Keywords: agent,agentic-ai,ai,ai-agent,anthropic,azure-devops,bitbucket,claude,code-review,gemini,github,gitlab,llm,merge-request,open-source,openai,pr-review,pull-request,self-hosted
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Version Control
Requires-Python: >=3.11
Requires-Dist: click>=8.1.0
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.0
Requires-Dist: pygithub>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: requests>=2.31
Provides-Extra: all
Requires-Dist: anthropic>=0.30; extra == 'all'
Requires-Dist: claude-agent-sdk>=0.1; extra == 'all'
Requires-Dist: google-generativeai>=0.7; extra == 'all'
Requires-Dist: openai>=1.30; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.30; extra == 'anthropic'
Provides-Extra: claude-code
Requires-Dist: claude-agent-sdk>=0.1; extra == 'claude-code'
Provides-Extra: dev
Requires-Dist: black>=24.0; extra == 'dev'
Requires-Dist: build>=1.0; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Provides-Extra: google
Requires-Dist: google-generativeai>=0.7; extra == 'google'
Provides-Extra: openai
Requires-Dist: openai>=1.30; extra == 'openai'
Description-Content-Type: text/markdown

# Tribune

> AI code/PR review agent. Fetches a pull request, asks an LLM to review it, posts inline comments + a verdict back to the VCS.

[![PyPI](https://img.shields.io/pypi/v/tribune-agent.svg?label=PyPI&color=22d3ee)](https://pypi.org/project/tribune-agent/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Status](https://img.shields.io/badge/status-alpha-22d3ee.svg)](#)
[![Built by ThinkNext](https://img.shields.io/badge/built%20by-ThinkNext-22d3ee.svg)](https://thinknextsoftware.com)

> **Status**: alpha, live on PyPI as `tribune-agent==0.1.0a1`. Standalone: no inter-package runtime deps. GitHub + GitLab fully implemented in 0.1.0a1; Bitbucket lands in 0.1.0a2; Azure DevOps in 0.1.0a3.

## What it does

```bash
tribune review https://github.com/owner/repo/pull/42
```

Tribune fetches the PR, asks your LLM to review the diff, then posts:

- **Inline comments** anchored to specific file + line, tagged severity (blocker / warning / nit) and category (bug / security / performance / test / style / docs / design).
- **A top-level summary** with a verdict (approve / request_changes / comment-only).

You can also run `--no-post` to print the review to your terminal without touching the PR.

## Why this exists

ThinkNext ships an OSS agentic SDLC stack:

| Stage | Tool |
|---|---|
| Idea to code | [Cascade](https://github.com/Thinknext-Software-Solutions/Cascade) (human-gated) or [Relay](https://github.com/Thinknext-Software-Solutions/Relay) (autonomous) |
| **Code to review** | **Tribune** (this repo) |
| Code to tested running app | [Sentinel](https://github.com/Thinknext-Software-Solutions/Sentinel) |

Tribune is the only piece that touches every PR, regardless of who wrote it. Human, Cascade, Relay, Copilot, anything else.

## Install

```bash
pip install 'tribune-agent[anthropic]'        # or [openai], [google], [claude-code], [all]
```

## Configure

```bash
# LLM provider
tribune configure llm claude_code --set-default
# Or use a key-based provider:
tribune configure llm anthropic --key sk-ant-xxx --set-default

# VCS provider (token needs PR read + comment write scopes)
tribune configure vcs github --token ghp_xxx --set-default
```

Credentials live at `~/.config/tribune/config.yaml` (mode 0600).

## Run

```bash
# Print the review without posting (useful for dogfooding):
tribune review https://github.com/owner/repo/pull/42 --no-post

# Post the review back to the PR:
tribune review https://github.com/owner/repo/pull/42
```

## What ships in 0.1.0a1

| Capability | Status |
|---|---|
| GitHub PRs (read + inline comments + review) | Full |
| GitLab MRs (read + discussions + approve) | Full |
| Bitbucket PRs | Stub (lands in 0.1.0a2) |
| Azure DevOps Repos PRs | Stub (lands in 0.1.0a3) |
| Multi-LLM via vendored client (Anthropic / OpenAI / Google / Claude Code / Ollama) | Full |
| Diff chunking for large PRs | Full |
| Skip lockfiles, removed files, binaries | Full |
| Structured findings (severity + category + line anchor + optional suggestion) | Full |
| GitHub Actions / GitLab CI / Bitbucket Pipelines / Azure Pipelines wrappers | Planned 0.1.0a2 |
| Per-repo `tribune.yaml` (rules to apply, paths to skip, custom prompt) | Planned 0.1.0a2 |

## How it differs from existing tools

| | CodeRabbit / Greptile | GitHub Copilot review | Tribune |
|---|---|---|---|
| Multi-VCS (GitHub + GitLab + Bitbucket + Azure) | Limited | GitHub only | Yes |
| Self-hosted (your code stays on your network) | No | No | Yes |
| Bring your own LLM key | No | No | Yes |
| Free for individuals | Partial | Subscription | Yes |
| Open source | No | No | Yes |

## License

MIT. See [LICENSE](LICENSE).

## About

Built and maintained by [ThinkNext Software Solutions](https://thinknextsoftware.com), alongside [Cascade](https://github.com/Thinknext-Software-Solutions/Cascade), [Relay](https://github.com/Thinknext-Software-Solutions/Relay), and [Sentinel](https://github.com/Thinknext-Software-Solutions/Sentinel).
