Metadata-Version: 2.5
Name: soigia
Version: 1.0.6
Summary: Python SDK for Soi Gia — core package
Author-email: Soi Gia <sojgja@gmail.com>
License: SOI GIA — VIEW-ONLY LICENSE (GIẤY PHÉP CHỈ XEM)
        
        Copyright (c) 2026, Soi Gia (sojgja@gmail.com). Mọi quyền được bảo lưu.
        
        Mã nguồn của package này được công bố NHẰM MỤC ĐÍCH THAM KHẢO. Bạn được phép xem, đọc và nghiên cứu mã nguồn.
        
        Bạn KHÔNG được phép:
        1. Sử dụng package này hoặc bất kỳ phần nào của nó trong bất kỳ sản phẩm, dịch vụ, dự án nào — kể cả mục đích cá nhân, nội bộ, phi thương mại hoặc thương mại.
        2. Sao chép, tái phân phối, xuất bản, bán, cho thuê hoặc cho mượn toàn bộ hoặc một phần mã nguồn.
        3. Sửa đổi, chuyển thể, dịch hoặc tạo sản phẩm phái sinh từ mã nguồn.
        4. Nhúng mã nguồn vào phần mềm khác dưới mọi hình thức.
        5. Gỡ bỏ, thay đổi hoặc che giấu thông báo bản quyền này.
        
        Bất kỳ hình thức sử dụng nào không được liệt kê ở trên đều cần sự đồng ý bằng văn bản trước từ chủ sở hữu bản quyền.
        
        MÃ NGUỒN ĐƯỢC CUNG CẤP "NGUYÊN TRẠNG" (AS-IS) KHÔNG KÈM BẤT KỲ BẢO HÀNH NÀO, DÙ TƯỜNG MINH HAY NGỤ Ý. CHỦ SỞ HỮU BẢN QUYỀN KHÔNG CHỊU TRÁCH NHIỆM VỀ BẤT KỲ THIỆT HẠI NÀO PHÁT SINH TỪ VIỆC SỬ DỤNG MÃ NGUỒN, KỂ CẢ KHI ĐÃ ĐƯỢC THÔNG BÁO VỀ KHẢ NĂNG XẢY RA THIỆT HẠI ĐÓ.
License-File: LICENSE
Keywords: python,sdk,soigia
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: loguru>=0.7
Requires-Dist: pyyaml>=6
Requires-Dist: rich>=13
Requires-Dist: tree-sitter-language-pack>=0.4
Requires-Dist: tree-sitter>=0.21
Provides-Extra: analysis
Requires-Dist: beniget>=0.5; extra == 'analysis'
Requires-Dist: gast>=0.7; extra == 'analysis'
Provides-Extra: fire
Requires-Dist: fire>=0.6; extra == 'fire'
Description-Content-Type: text/markdown

<div align="center">

# 🐍 soigia

Tool framework cho Python — **132 tools** (85 engines) để debug, investigate và phân tích code, dữ liệu, database, git.

[![PyPI - soigia](https://img.shields.io/pypi/v/soigia.svg?style=flat-square&logo=pypi&logoColor=white&label=soigia)](https://pypi.org/project/soigia/)
[![Python](https://img.shields.io/badge/python-%3E%3D3.12-blue.svg?style=flat-square&logo=python&logoColor=white)](https://www.python.org/)
[![License](https://img.shields.io/badge/license-Proprietary-red.svg?style=flat-square)](LICENSE)
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg?style=flat-square)](https://github.com/sojgja/soigia-sdk)

</div>

## ✨ Tính năng

- **132 tools sẵn sàng** — AST, call graph, code metrics, database, data profiling, git, network, pipeline…
- **Tool nào cũng là CLI** — `soigia <tool> [flags...]`, không cần nhớ cú pháp riêng
- **Dễ mở rộng** — đăng ký tool tùy chỉnh bằng `@tool` decorator (Registry + Scanner)
- **Không phụ thuộc bên thứ ba**, type-safe (`py.typed`, PEP 561)
- **Tool Discovery** — `soigia tool search "sql"` tìm đúng tool trong 100ms (Exact + FTS5 + Ranker, tới 10k tools)
- **Debugging & Investigation Toolkit** — tự khám phá/chạy/reproduce/fix project Python bất kỳ (xem [Yêu cầu & Hiện trạng](docs/requirements-and-implementation.md))
- **Tài liệu kiến trúc chi tiết** — layers, vòng đời tool, CLI dispatch, discovery subsystem… (xem [Kiến trúc](docs/architecture.md))

## 🚀 Cài đặt

```bash
pip install soigia
```

## 💻 CLI — bắt đầu nhanh

Một lệnh cho mọi việc:

```bash
soigia reader --path README.md     # đọc file
soigia search diff                  # tìm tool theo từ khóa
soigia list                         # liệt kê toàn bộ tools
soigia info reader                  # thông tin chi tiết một tool
soigia fire env --include-env       # chạy tool với flag lenient
soigia --help                       # trợ giúp đầy đủ
```

`soigia <tool> --help` hiển thị tham số riêng của từng tool.

## 🧰 Nhóm tool

| Nhóm | Ví dụ tool |
| ---- | ---------- |
| `code-analysis` | `ast-multi`, `call-graph`, `code-radon`, `code-metrics`, `impact-analysis` |
| `data` | `data-profiler`, `df-compare`, `detect-anomaly`, `data-quality` |
| `database` | `db-sniffer`, `execute-sql`, `db-compare`, `describe-table`, `duckdb-query` |
| `debug` | `parse-stacktrace`, `icecream-debug`, `live-debug`, `async-tracer` |
| `file-system` | `reader`, `finder`, `filesystem`, `edit-file`, `tree` |
| `git` | `git-diff`, `git-blame`, `git-history`, `git-log-advanced` |
| `integration` | `jira`, `confluence`, `google`, `network-snoop` |
| `investigation` | `investigate-exception`, `save-evidence`, `generate-report`, `root-cause-analysis` |
| `runtime` | `env`, `process`, `run-python`, `run-function` |
| `test` | `test-helper`, `mutation-test`, `coverage`, `test-generator` |
| `utility` | `console`, `converter`, `hash`, `json-query` |

Ví dụ chạy tool trong nhóm:

```bash
soigia db-sniffer --db-path data.db --command tables
soigia compare-files --path-a a.txt --path-b b.txt
soigia tail-log --path app.log --n 50
```

## 🐍 Python API

```python
import soigia

print(soigia.__version__)   # 1.0.5
```

Mở rộng: package cung cấp `ToolRegistry`, `Scanner` và `@tool` decorator
(`soigia.base.decorator`) để đăng ký tool riêng — chạy `soigia help` để xem
thêm.

## 📄 License

[BSD-3-Clause](LICENSE)
