Irides Prism (irides-prism)
Satellite package for Irides that scans local directories, monorepos, or Git repositories to generate standardized, at-a-glance database.md and technology.md overview documents.
Features
- Zero-AI static baseline: Works out of the box without any LLM API key.
database.md: Summarizes database types, instances, sanitized hosts, and involved tables (read/write/ddl) across SQL, dbt, ORM models (SQLAlchemy, Django, Prisma, TypeORM, JPA), migrations,docker-compose, Terraform,.env.example, andirides.yaml.technology.md: Summarizes prominent technologies (AWS S3, Databricks, Spark, Delta Lake, dbt, Airflow, Kafka, Redis, Docker, Terraform, FastAPI, etc.) grouped by category.
- Optional 2-stage AI refinement (
--use-ai): Runs only when explicitly requested and an API key (LITELLM_API_KEYor provider key) is present, degrading cleanly to static results on missing key or errors. - Monorepo & multi-folder support: Scans one or multiple local non-Git directories or auto-detects subprojects in monorepos (
--mode auto|single|monorepo,--project-dir). - Git & Pull Requests (
--open-pr): Commits, pushes, and opens or updates GitHub Pull Requests (GITHUB_TOKEN) and GitLab Merge Requests (GITLAB_TOKEN).
Ownership & Overwrite Policy
Every file generated by irides-prism includes YAML frontmatter with managed_by: irides.
- New file: Created atomically (
database.md/technology.md). - Existing Irides-managed file (
managed_by: irides): Overwritten completely when content changes (unchangedotherwise, ensuring no spurious Git diffs). - Existing unmanaged file (including case-insensitive matches such as
DATABASE.MD): Skipped with aconflict_unmanagederror (non-zero CLI exit code) to prevent accidental loss of hand-written documentation. Pass--forceto explicitly overwrite unmanaged files.
Installation
# Standalone installation (includes the `irides-prism` binary; no `irides-cli` or `redis` required):
pip install irides-prism
# Optional extras:
pip install "irides-prism[sql,ai,git]"
# Or install together with the unified Irides CLI (`irides prism`):
pip install "irides-cli[prism]"
Standalone CLI (irides-prism) & Unified CLI (irides prism)
You can run Prism either directly via its standalone irides-prism binary (no irides-cli needed) or as a plugin under irides prism when irides-cli is installed:
# Standalone binary (identical flags apply to `irides prism ...`)
irides-prism ./service-a ./service-b
irides-prism ./my-monorepo --mode monorepo --output-dir ./irides/prism
irides-prism ./my-repo --dry-run
irides-prism ./my-repo --force
irides-prism ./my-repo --use-ai
irides-prism https://github.com/org/repo.git --open-pr --base-branch main
Python Library Usage (Standalone)
You can also use irides-prism directly from Python without starting Redis, the API, or irides-cli:
from irides_prism import PrismOptions, run_prism
report = run_prism(
PrismOptions(
paths=["./my-monorepo"],
mode="monorepo",
output_dir="./irides/prism",
)
)
print(report.ok, [t.project for t in report.targets])
CLI Options Reference (irides-prism / irides prism)
# Scan current folder or multiple non-Git folders
irides prism ./service-a ./service-b
# Scan a monorepo (dry run)
irides prism ./my-monorepo --mode monorepo --dry-run
# Overwrite pre-existing non-Irides DATABASE.MD / technology.md
irides prism ./my-repo --force
# Optional AI refinement
irides prism ./my-repo --use-ai
# Clone/update a Git repo and open or update a GitHub/GitLab PR
irides prism https://github.com/org/repo.git --open-pr --base-branch main
# Aggregate multiple repos into a shared central vault alongside `irides describe` (`STORAGE_EXPORT_DIR=./irides/database`)
irides prism https://github.com/org/service-a.git --output-dir ./irides/prism
Central Vault Layout (--output-dir)
When --output-dir is set, outputs are always nested by project so multiple runs never overwrite each other:
- Single project:
<output_dir>/<project>/database.mdandtechnology.md - Monorepo subproject:
<output_dir>/<repo>/<subproject>/database.mdandtechnology.md
When combined with --open-pr, files are written inside the repository for the Pull Request and mirrored into --output-dir.
Unified Metadata & OKF Export Pipeline
Like irides describe, the irides-prism / irides prism CLI (and worker_prism) delegates canonical JSON persistence and derived Markdown + OKF v0.2 catalog exports to Irides' shared FileMetadataStore and FileArtifactStore:
- Canonical JSON:
STORAGE_METADATA_DIR/prism/{project}/database.jsonandtechnology.json - Derived Markdown:
STORAGE_EXPORT_DIR/markdown/prism/{project}/database.mdandtechnology.md - Derived OKF v0.2:
STORAGE_EXPORT_DIR/okf/catalog/prism/{project}/database.mdandtechnology.md(indexed alongside DB tables inokf/catalog/index.md)
Opt out cleanly with --no-save-metadata, --no-export-markdown, or --no-export-okf.
Git Authentication & PR Permissions (--open-pr)
When cloning private repositories or running with --open-pr, set one of:
GITHUB_TOKEN(GitHub clones and PRs)GITLAB_TOKEN(GitLab clones and MRs)IRIDES_GIT_TOKEN(generic fallback token for either provider)
For GitHub Fine-grained Personal Access Tokens:
- Under Repository access, select
Only select repositories(choosing the target repo) orAll repositories(Public repositories only grants read-only access). - Under Repository permissions, grant
Contents: Read and write(required forgit push) andPull requests: Read and write(required to open/update PRs). - Alternatively, a Classic PAT with the
reposcope provides both permissions.
Downstream Catalog Enrichment
Once irides describe and irides prism have populated STORAGE_METADATA_DIR, run irides-enrichment (irides enrich) to link database.md files to catalog DB tables with bidirectional used_by backlinks and PK/FK wikilinks. See packages/enrichment/README.md.
Async Platform Integration
For asynchronous multi-repository scans triggered via REST API (POST /api/v1/prism/scan) or MCP (enqueue_prism_scan), see services/worker_prism/README.md, services/api/README.md, and infra/README.md.
Metadata
Release files for irides-prism 0.2.0
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 |
|---|---|---|---|---|
| irides_prism-0.2.0.tar.gz | 40.7 kB | Without provenance | Details for irides_prism-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| irides_prism-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for irides_prism-0.2.0-py3-none-any.whl |
Total release size: 85.5 kB
Release files / irides_prism-0.2.0.tar.gz
| Download URL | irides_prism-0.2.0.tar.gz |
|---|---|
| Size | 40.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
692e32c5aab1cb9f958eeffdb4e48f9465839a2a1e79088cc1170291492021e6
|
|
BLAKE2b-256 checksum How to use checksums |
96ba0c8f3ada0ca028fc9be88a57798f6436d5d555ba112f305aa5ce691860ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Release files / irides_prism-0.2.0-py3-none-any.whl
| Download URL | irides_prism-0.2.0-py3-none-any.whl |
|---|---|
| Size | 44.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d485a546610d973f06377f5da0c0a0b78612024c2e8aeb2374a0ae1f9577a306
|
|
BLAKE2b-256 checksum How to use checksums |
5dc13990cd0994164c35d754cc920dc2ad08c0487e1396d00a8a5fecd9afa5a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Security for irides-prism 0.2.0
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.