Metadata-Version: 2.4
Name: tng-python
Version: 0.4.8
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Requires-Dist: typer>=0.9.0
Requires-Dist: rich>=13.0.0
Requires-Dist: ast2json>=0.2.1
License-File: LICENSE
Summary: TNG Python - Advanced Code Audit, Test Generation, and Visualization tool
Author-email: Binary Dreams LLC <support@tng.sh>
License: Proprietary
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# TNG Python

**TNG Python** is an advanced AI-powered tool for **Code Auditing**, **Automated Test Generation**, **Visualization**, and **Dead Code Detection**. It provides deep insights into your Python codebase and helps ensure code quality and correctness.

## Key Features

- **Automated Test Generation**: Generate unit and integration tests for Flask, FastAPI, Django, and more.
- **Deep Code Auditing**: Identify logical flaws, security issues, and performance bottlenecks.
- **X-Ray Visualization**: Generate Mermaid.js flowcharts to visualize complex method logic.
- **Dead Code Detection**: Find unreachable code, unused variables, and unused parameters.
- **Clone Detection**: Identify duplicated code blocks across your project.
- **Symbolic Tracing**: Trace method execution paths to understand complex behavior.
- **Call Sites**: Find real in-repo usage patterns for a method.
- **Regression Check (Impact)**: Detect breaking changes by analyzing the blast radius of a method update.

## Installation

```bash
pip install tng-python
```

## Quick Start

1. **Initialize TNG**:
   ```bash
   tng init
   ```

2. **Launch Interactive UI**:
   The most powerful way to use TNG is through its interactive dual-pane UI.
   ```bash
   tng i
   ```

3. **Analyze Specific Files**:
   ```bash
   # Find dead code in a file
   tng --deadcode -f path/to/file.py

   # Check for duplicates
   tng --clones -f path/to/file.py

   # Generate X-Ray for a method
   tng x -f path/to/file.py -m my_method

   # Find call sites for a method
   tng --callsites -f path/to/file.py -m my_method

   # Run regression check (impact) for a method
   tng --impact -f path/to/file.py -m my_method
   ```

## CLI Reference

| Option | Flag | Description |
|--------|------|-------------|
| `--file` | `-f` | Target Python file path |
| `--method` | `-m` | Target method name |
| `--deadcode` | `-d` | Run dead code analysis |
| `--clones` | `-c` | Run duplicate code detection |
| `--audit` | | Run code audit mode |
| `--trace` | | Run symbolic trace analysis |
| `--callsites` | | Find in-repo call sites for a method |
| `--impact` | | Run regression check (blast radius check) |
| `--json` | | Output results in JSON format |
| `--ui` | | Open findings in the interactive Go UI |

### Subcommands

- `tng i`: Interactive multi-tool UI.
- `tng xray`: Generate Mermaid.js logic diagrams.
- `tng init`: Setup project configuration.

## Supported Ecosystem

- **Frameworks**: FastAPI, Flask, Django
- **Async**: Celery, RQ, Asyncio
- **ORM**: SQLAlchemy, Django ORM, Tortoise
- **Testing**: Pytest, Unittest

## License

Proprietary - Binary Dreams LLC

