Metadata-Version: 2.4
Name: branchpy-cli
Version: 1.2.1
Summary: Analyze Ren'Py projects for branching structure, assets, QA issues, and flow.
Author: BranchPy Inc.
License: Proprietary
Project-URL: Homepage, https://branchpy.com
Project-URL: Documentation, https://branchpy.com/docs/
Project-URL: Issues, https://branchpy.com/contact
Project-URL: Changelog, https://branchpy.com/changelog
Keywords: renpy,visual novel,analysis,qa,flowchart
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: appdirs>=1.4.4
Requires-Dist: click>=8.0.0
Requires-Dist: jinja2>=3.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: websockets>=12.0
Requires-Dist: psutil>=5.9.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: tomli>=2.0.0; python_version < "3.11"
Requires-Dist: Pillow>=10.0.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: lmdb>=1.4.1
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.23.0
Requires-Dist: tabulate>=0.9.0
Requires-Dist: rich>=13.0.0
Requires-Dist: openpyxl>=3.1.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: pytest-benchmark>=4.0; extra == "dev"
Requires-Dist: pytest-timeout>=2.0; extra == "dev"
Requires-Dist: pytest-xdist>=3.0; extra == "dev"
Requires-Dist: pytest-json-report>=1.5; extra == "dev"
Requires-Dist: pytest-rerunfailures>=13.0; extra == "dev"
Requires-Dist: coverage[toml]>=7.0; extra == "dev"
Requires-Dist: tomli>=2.0.0; extra == "dev"
Requires-Dist: toml>=0.10.2; extra == "dev"
Requires-Dist: pymysql>=1.0.0; extra == "dev"
Requires-Dist: requests>=2.28.0; extra == "dev"
Requires-Dist: httpx>=0.24.0; extra == "dev"
Requires-Dist: PyJWT>=2.0.0; extra == "dev"
Requires-Dist: psycopg2-binary>=2.9.0; extra == "dev"
Requires-Dist: openai>=1.0.0; extra == "dev"
Requires-Dist: anthropic>=0.70.0; extra == "dev"
Requires-Dist: argon2-cffi>=21.3.0; extra == "dev"
Requires-Dist: email-validator>=2.0.0; extra == "dev"
Requires-Dist: google-generativeai>=0.3.0; extra == "dev"
Requires-Dist: plotly>=5.0.0; extra == "dev"
Requires-Dist: matplotlib>=3.5.0; extra == "dev"
Requires-Dist: black==24.10.0; extra == "dev"
Requires-Dist: isort==5.13.2; extra == "dev"
Requires-Dist: ruff==0.8.4; extra == "dev"
Provides-Extra: ml
Requires-Dist: torch>=2.1.0; extra == "ml"
Requires-Dist: torchvision>=0.15; extra == "ml"
Requires-Dist: scikit-learn>=1.3.0; extra == "ml"
Provides-Extra: ai
Requires-Dist: openai>=1.0.0; extra == "ai"
Requires-Dist: anthropic>=0.70.0; extra == "ai"
Requires-Dist: google-generativeai>=0.3.0; extra == "ai"
Provides-Extra: ai-ml
Requires-Dist: torch>=2.1.0; extra == "ai-ml"
Provides-Extra: image-validation
Requires-Dist: Pillow>=10.0.0; extra == "image-validation"
Requires-Dist: numpy>=1.26.0; extra == "image-validation"
Requires-Dist: lmdb>=1.4.1; extra == "image-validation"
Requires-Dist: torch>=2.1.0; extra == "image-validation"
Dynamic: license-file

﻿# BranchPy

Analyze Ren'Py projects for branching structure, assets, QA issues, and story flow.

Local-first analysis tool for Ren'Py projects — no cloud required.

## What this is

BranchPy is a developer tool for Ren'Py visual novel projects. It analyzes your project locally and generates reports covering story structure, branching paths, asset validation, and quality issues.

Used to analyze large Ren'Py projects and production-scale visual novels.

It runs from the command line and integrates with Visual Studio Code for a full visual workflow.

## Installation

Install the CLI:

```bash
pip install branchpy-cli
```

After installation, run `branchpy` or `bpy`.

Install the VS Code extension from the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=branchpy.branchpy) for the full visual experience (flowcharts, one-click analysis, and in-editor reports).

## Quick start

```bash
# Analyze a Ren'Py project
branchpy analyze --project "/path/to/your/renpy/project"

# Generate a story flowchart
branchpy flowchart --project "/path/to/your/renpy/project"

# Run structural statistics
branchpy stats --project "/path/to/your/renpy/project"

# Validate assets
branchpy media --project "/path/to/your/renpy/project"
```

Both `branchpy` and `bpy` are available as CLI entry points.

## Features

- **Story flow analysis** — detect unreachable labels, broken jumps, and structural issues
- **Branching path exploration** — enumerate paths through your project from configurable entry points
- **Asset validation** — find missing, unused, or misreferenced images and audio files
- **Project statistics** — structural classification (finite, loop-based, hybrid), complexity metrics, and coverage ratios
- **Compare** — track changes between analysis runs
- **Local-first** — no cloud dependency, no telemetry without consent, works offline

Some advanced features (semantic image similarity) require optional local dependencies. See https://branchpy.com/docs/ for details.

## VS Code extension

Install BranchPy from the VS Code Marketplace to access:

- Interactive flowchart visualization
- One-click analysis from the Control Center
- Visual report panels (Insights, PILOT, Stats, OMEGA)
- Real-time output and error console

The extension detects the installed CLI automatically. If the CLI is not found, it shows an install prompt with the exact command.

## Requirements

- Python 3.11 or higher
- A Ren'Py project directory

## Links

- **Website:** https://branchpy.com
- **Documentation:** https://branchpy.com/docs/
- **Changelog:** https://branchpy.com/changelog/
- **Support:** https://branchpy.com/contact

## Licensing

BranchPy offers a free tier for Ren'Py projects.

Some advanced features may require activation through the BranchPy website.

See https://branchpy.com for details.
