Metadata-Version: 2.4
Name: textor-nexuum
Version: 1.0.1
Summary: Textor Nexuum — Weave AI clarity into every GitHub issue.
Author: FratresMedAI
License-Expression: MIT
Project-URL: homepage, https://github.com/FratresMedAI/TextorNexuum
Project-URL: repository, https://github.com/FratresMedAI/TextorNexuum
Project-URL: Issues, https://github.com/FratresMedAI/TextorNexuum/issues
Keywords: github,triage,ai,oss,maintainer,issues
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.6
Requires-Dist: typer>=0.12
Requires-Dist: rich>=13.7
Requires-Dist: requests>=2.31
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: mypy>=1.8; extra == "dev"
Requires-Dist: types-PyYAML>=6.0; extra == "dev"
Requires-Dist: types-requests>=2.31; extra == "dev"
Dynamic: license-file

<p align="center">
  <img src="docs/assets/banner.png" alt="Textor Nexuum professional branding banner" width="920"/>
</p>

# Textor Nexuum ??

**Weave AI clarity into every GitHub issue.**

Textor Nexuum is a production-minded Python CLI named **`nexuum`**. It triages GitHub issues with Grok, OpenAI-compatible APIs, and now Anthropic Claude via the same structured JSON contract. Output stays safe by default (dry-run first; writes only with `--apply`).

- **Repository:** [FratresMedAI/TextorNexuum](https://github.com/FratresMedAI/TextorNexuum)
- **PyPI:** `textor-nexuum`
- **Python:** 3.11+
- **License:** MIT

## Install

```bash
python -m pip install textor-nexuum
```

From source:

```bash
git clone https://github.com/FratresMedAI/TextorNexuum.git
cd TextorNexuum
python -m pip install -e ".[dev]"
```

## Quick start

```bash
nexuum --version
nexuum analyze octocat/Hello-World --limit 3 --verbose
nexuum config init
```

Without `GITHUB_TOKEN`, built-in mock issues are used so the CLI still demos cleanly.

## New in v1.0 line

- **Anthropic support**: if `base_url` contains `anthropic`, Nexuum uses `/messages` + `x-api-key` + `anthropic-version`.
- **Configurable duplicate threshold**: `duplicate_threshold` in `.nexuum.yaml` (default `0.82`).
- **Better duplicate detection**: weighted score on title + first 200 chars of body.
- **Verbose mode**: `--verbose` prints issue-level reasoning and token usage.
- **API resilience**: retry/backoff (3 attempts) for LLM calls with explicit fallback message.

## Environment variables

| Name | Role |
|------|------|
| `GITHUB_TOKEN` | Real issue data + enables `--apply` writes. |
| `GROK_API_KEY` | Key for xAI/OpenAI-compatible style calls. |
| `OPENAI_API_KEY` | Key for OpenAI-compatible base URLs. |
| `ANTHROPIC_API_KEY` | Use with `--base-url https://api.anthropic.com/v1` and Claude models. |

## Commands

```bash
nexuum analyze owner/repo --limit 10
nexuum analyze owner/repo --issue 42
nexuum analyze owner/repo --format json
nexuum analyze owner/repo --verbose
nexuum analyze owner/repo --apply --yes
nexuum config init
nexuum version
```

Typer completion is enabled. Install completion with your shell profile if desired (e.g. `--install-completion`).

## Configuration

Resolution order:

1. `.nexuum.yaml`
2. `.weaver.yaml` (legacy)
3. `~/.config/nexuum/config.yaml`

Example `.nexuum.yaml`:

```yaml
model: claude-3-5-sonnet-latest
base_url: https://api.anthropic.com/v1
max_issues: 30
duplicate_threshold: 0.82
allowed_labels: [bug, feature, documentation, question, enhancement]
custom_labels: [needs-triage, good-first-issue]
prompt_additions: ""
```

## Real-world examples

### Grok / OpenAI-compatible

```bash
nexuum analyze owner/repo --limit 15 --model grok-4.1-fast --base-url https://api.x.ai/v1
```

### Anthropic Claude

```bash
set ANTHROPIC_API_KEY=your-key
nexuum analyze owner/repo --limit 15 --model claude-3-5-sonnet-latest --base-url https://api.anthropic.com/v1
```

### Single issue with detailed diagnostics

```bash
nexuum analyze owner/repo --issue 123 --verbose
```

## How it works

1. Load config + CLI flags into `NexuumConfig`.
2. Fetch issues from GitHub (or mock fixtures when unauthenticated).
3. Build prompt from `src/nexuum/prompts.py`.
4. Call selected LLM provider (OpenAI-compatible or Anthropic).
5. Parse strict JSON into `TriageResult`; fallback to heuristics on failures.
6. Run duplicate checks with configurable threshold and confidence.
7. Render Rich table + exports (`md`, `json`); optional guarded apply flow.

## Comparison to other tools

- **GitHub native triage:** Great for manual workflows, but no deterministic structured AI output or local automation.
- **Dosu:** Strong hosted assistant model, less local CLI control over provider routing/fallback behavior.
- **PR-Agent:** PR-focused automation; Textor Nexuum is issue-triage focused with explicit duplicate heuristics.
- **Sweep:** Strong coding automation path; Nexuum is intentionally lightweight triage-first with safe dry-run defaults.

## GitHub Action (summary-only)

Use [`.github/workflows/nexuum.yml`](.github/workflows/nexuum.yml): analyze + post one summary comment. It does **not** run `--apply`.

## Quality gate

```bash
ruff check . --fix && ruff format .
mypy src/nexuum --strict
pytest tests/ -q
```

## Support

Issues and PRs: [github.com/FratresMedAI/TextorNexuum/issues](https://github.com/FratresMedAI/TextorNexuum/issues)
