Pangu RCA CLI
AI-powered log analysis tool for developers. Analyze error logs directly from your terminal.
Installation
pip install pangu-rca
Quick Start
# Analyze a log file
pangu-rca analyze error.log
# Analyze with English output
pangu-rca analyze error.log --lang en
# Pipe log content directly
cat error.log | pangu-rca analyze --stdin
# Get JSON output (for scripting)
pangu-rca analyze error.log --output json
# Check service health
pangu-rca health
Examples
Analyze a Java error log
$ pangu-rca analyze java_error.log
English version:
============================================================
🔍 Pangu RCA Agent - Analysis Result
============================================================
📋 Problem Type: Application Error
🎯 Confidence: 90.0%
📝 Detailed Reason:
NullPointerException occurred during profile update request processing
🔑 Key Evidence:
1. 2026-04-05 15:10:27 ERROR [http-nio-8080-exec-1] java.lang.NullPointerException: null
2. 2026-04-05 15:10:27 ERROR [http-nio-8080-exec-1] at com.example.UserService.updateProfile(UserService.java:145)
3. 2026-04-05 15:10:27 WARN [http-nio-8080-exec-1] Request processing failed; nested exception is java.lang.NullPointerException
💡 Fix Suggestions:
Review the UserService.updateProfile method at line 145 to identify potential null references. Add null checks and proper error handling to prevent similar issues.
Chinese version:
============================================================
🔍 Pangu RCA Agent - 分析结果
============================================================
📋 问题类型: 数据库连接超时
🎯 置信度: 95.0%
📝 详细原因:
数据库连接池配置过小,导致在高并发场景下连接被耗尽...
🔑 关键证据:
1. java.sql.SQLException: Connection timeout
2. Caused by: java.sql.SQLTimeoutException: Timeout waiting for connection
💡 修复建议:
增加数据库连接池的最大连接数,建议从 10 调整为 50...
Pipe from another command
# Analyze Docker container logs
docker logs my-container 2>&1 | pangu-rca analyze --stdin
# Analyze system logs
journalctl -u my-service --no-pager | pangu-rca analyze --stdin --lang en
Options
| Option | Description | Default |
|---|---|---|
--lang |
Output language: zh or en |
zh |
--output |
Output format: text or json |
text |
--api-url |
Custom API endpoint | https://www.pangulab.com/api/analyze |
Commands
pangu-rca analyze <file>— Analyze a log filepangu-rca analyze --stdin— Read logs from stdinpangu-rca health— Check API service statuspangu-rca --version— Show versionpangu-rca --help— Show help
About
Pangu RCA Agent is an AI-powered log analysis tool that helps developers quickly identify root causes of errors from application logs. It supports Java, Python, Go, Rust, JavaScript, and many other programming languages.
Web version: https://www.pangulab.com
License
MIT
Metadata
Release files for pangu-rca 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pangu_rca-0.1.1.tar.gz | 5.8 kB | Without provenance | Details for pangu_rca-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pangu_rca-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pangu_rca-0.1.1-py3-none-any.whl |
Total release size: 11.7 kB
Release files / pangu_rca-0.1.1.tar.gz
| Download URL | pangu_rca-0.1.1.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1228b84c51da998b76422cee67d53a8ddadd2caf34cc029943ff3dcbf96e1911
|
|
BLAKE2b-256 checksum How to use checksums |
927d58c7acb3783df9863262b2afe291e40e09e5ef7ef18b5dac31a6c2dcfe14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|
Release files / pangu_rca-0.1.1-py3-none-any.whl
| Download URL | pangu_rca-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f476a132c862462842c86d72b13e6e2a310f57e16e281f18c247ea8000d3b2e4
|
|
BLAKE2b-256 checksum How to use checksums |
89a7b4e059bfc87838ffb83ed0573aa989eef87f1795e1895e94873425aed342
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|
Security for pangu-rca 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.