Metadata-Version: 2.4
Name: oci-policy-analysis
Version: 5.2.1
Summary: OCI Policy Analysis
Author: Andrew Gregory
License: UPL-1.0
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: Universal Permissive License (UPL)
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE.txt
License-File: NOTICE.txt
Requires-Dist: oci==2.168.0
Requires-Dist: deepdiff==8.5.0
Requires-Dist: antlr4-python3-runtime==4.13.2
Provides-Extra: core
Provides-Extra: ui
Provides-Extra: web
Requires-Dist: fastapi>=0.110; extra == "web"
Requires-Dist: uvicorn>=0.29; extra == "web"
Requires-Dist: itsdangerous>=2.2; extra == "web"
Provides-Extra: mcp
Requires-Dist: fastmcp==2.12.5; extra == "mcp"
Provides-Extra: all
Requires-Dist: fastapi>=0.110; extra == "all"
Requires-Dist: uvicorn>=0.29; extra == "all"
Requires-Dist: itsdangerous>=2.2; extra == "all"
Requires-Dist: fastmcp==2.12.5; extra == "all"
Provides-Extra: docs
Requires-Dist: sphinx>=7; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=3; extra == "docs"
Requires-Dist: myst-parser>=2; extra == "docs"
Requires-Dist: sphinxcontrib-mermaid>=2; extra == "docs"
Provides-Extra: commit
Requires-Dist: pipdeptree>=2.30.0; extra == "commit"
Requires-Dist: pre_commit>=4.5.0; extra == "commit"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# OCI Policy Analysis

Analyze Oracle Cloud IAM policies and identity data.

📘 **Full documentation:**  
👉 [https://agregory999.github.io/oci-policy-analysis](https://agregory999.github.io/oci-policy-analysis)

## Limited Mode (Web)

- Overview doc: [docs/source/limited_mode.md](docs/source/limited_mode.md)

## Quick Start (Desktop App)
```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
python -m oci_policy_analysis.main
```

## Quick Start (Web App Only)

If you want web mode only (no desktop/Tk workflow):

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[web]"
oci-policy-analysis-web --host 127.0.0.1 --port 8000
```

Then open: `http://127.0.0.1:8000`

## Quick Start (Using Local Helper Scripts)

Build and run by mode:

```bash
./local-build.sh --mode web
./local-run.sh --mode web --host 127.0.0.1 --port 8000
```

Other supported modes:

- `desktop`
- `web`
- `cli`
- `mcp`
- `all` (build script only)

## Server / Nohup Example (Web)

```bash
nohup ./local-run.sh --mode web --host 0.0.0.0 --port 8080 > oci-policy-analysis-web.log 2>&1 &
```

Check process/logs:

```bash
ps -ef | grep oci-policy-analysis-web
tail -f oci-policy-analysis-web.log
```

## Run the Web App via PyPI (no repo clone)

(Won't work until out of beta)

Install in a virtual environment and run the packaged web entrypoint:

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install "oci-policy-analysis[web]"
oci-policy-analysis-web
```

For server usage, you can run with explicit bind options:

```bash
oci-policy-analysis-web --host 0.0.0.0 --port 8080
```

Example startup script (`start-oci-policy-analysis-web.sh`):

```bash
#!/usr/bin/env bash
set -euo pipefail

source /opt/oci-policy-analysis/.venv/bin/activate
exec oci-policy-analysis-web --host 0.0.0.0 --port 8080
```

Then make executable and run:

```bash
chmod +x start-oci-policy-analysis-web.sh
./start-oci-policy-analysis-web.sh
```

Or run a packaged release right from your desktop:
```bash
oci-policy-analysis.exe   # Windows
oci-policy-analysis.app   # macOS
```

For the executables, disable the OS Security for the application so it can run.  
- MAC: Settings -> Privacy & Security - Open Anyway
- Windows: Double-click EXE -> More Info - Run Anyway

![Mac](/images/mac_security_bypass.png)
![Windows](/images/windows_security_bypass.png)
