Irides CLI (irides-cli)
Command-line interface for database introspection, repository discovery (prism), and catalog enrichment (enrich), built on irides-core. It does not require FastAPI, MCP, or the Redis worker.
Structure
The CLI is organized by responsibility:
irides_cli/presentation/: command definitions andargparseparsing;irides_cli/controllers/: maps command-line arguments to use cases;irides_cli/dto/: immutable, typed request DTOs;irides_cli/services/: live introspection and metadata operations usingirides-core;irides_cli/plugins.py: entry-point plugin loader (irides.cli_plugins) for satellite packages such asirides-prismandirides-enrichment;irides_cli/main.py: composition root, JSON serialization, and process-level error handling.
Installation
# Install from PyPI:
pip install irides-cli
# With Prism, Enrichment, and Redis support:
pip install "irides-cli[prism]"
pip install "irides-cli[enrichment]"
pip install "irides-cli[all]"
# Or editable install from this monorepo:
pip install -e ./packages/core -e ./packages/cli -e ./packages/prism -e ./packages/enrichment
Quickstart & Configuration
Irides supports two ways to configure database targets:
Option 1: Declarative Config File (irides.yaml) — Recommended
Generate a template configuration with:
irides init
This creates an irides.yaml file in the current directory:
targets:
my_postgres:
type: postgres
host: localhost
port: 5432
user: postgres
password: "${PG_PASSWORD:-secret}"
database: my_database
local_sqlite:
type: sqlite
database: ./app.db
You can pass a custom config file anytime using -c / --config-file:
irides -c /path/to/my_config.yaml configurations
Option 2: Environment Variables (.env)
You can initialize an environment template with:
irides init --format env
Or specify an explicit .env file via -e / --env-file:
irides -e /path/to/.env configurations
Commands
# Initialize template configuration
irides init
# List configured database targets
irides configurations
# Test database connection
irides connect my_postgres
# List database instances
irides instances --target my_postgres
# List schemas in a database
irides schemas --target my_postgres --instance localhost
# List tables (supports --limit and --offset)
irides tables --target my_postgres --instance localhost --schema public --limit 50
# Introspect table schema
irides describe --target my_postgres --instance localhost --schema public --table orders
irides describe --target my_postgres --instance localhost --schema public --table orders --generate-ai-docs
irides describe --target my_postgres --instance localhost --schema public --table orders --no-export-okf
Note:
--targetand--configare interchangeable aliases. Omitting--target,--instance,--schema, or--tableexpands the scope, just like the corresponding API endpoints. Results are always written as JSON to stdout; errors are written to stderr. Add--no-cacheto introspection commands to bypass Redis.
describe saves canonical JSON metadata and generates both Markdown and Open Knowledge Format (OKF v0.2) exports by default.
Available options for describe:
--generate-ai-docs: generate domain summary and column descriptions via LiteLLM.--no-save-metadata: skip saving the canonical JSON metadata file (exports are still generated if enabled).--only-if-changed: skip writing if the schema is identical to the stored version.--no-export-markdown: disable the default Markdown export.--no-export-okf: disable the default OKF catalog bundle generation.--no-preformat: export full metadata instead of the essential deterministic record.--save-markdown: legacy compatibility flag for Markdown export.
Artifacts are persisted under STORAGE_EXPORT_DIR (default storage/exports):
storage/exports/markdown/database/{config}/{instance}/{schema}/{table}.mdstorage/exports/okf/catalog/database/{config}/{instance}/{schema}/{table}.md(along withstorage/exports/okf/catalog/index.md)
Metadata
irides metadata instances
irides metadata databases db1.company.com
irides metadata tables db1.company.com production
irides metadata get db1.company.com production orders
irides metadata update db1.company.com production orders '{"owner":"data-team","tags":["billing"]}'
The CLI does not include async scan commands for DBs (those run via the API + worker using Redis Streams).
Repository Discovery Plugin (irides prism)
When irides-prism is installed (e.g. pip install "irides-cli[prism]"), irides automatically exposes the prism subcommand via the irides.cli_plugins entry-point group to generate database.md and technology.md:
# Scan local non-Git directories or a monorepo
irides prism ./service-a ./service-b
irides prism ./my-monorepo --mode monorepo --output-dir ./irides/prism
# Preview without writing files or overwrite pre-existing unmanaged files
irides prism ./my-repo --dry-run
irides prism ./my-repo --force
# Optional AI refinement (when LITELLM_API_KEY / provider key is configured)
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
See packages/prism/README.md for details on the managed_by: irides ownership policy, Git PAT permissions, and --output-dir central vault structure.
Catalog & Markdown Enrichment Plugin (irides enrich)
When irides-enrichment is installed (e.g. pip install "irides-cli[enrichment]" or pip install "irides-cli[all]"), irides also exposes the enrich subcommand to connect PK/FK wikilinks across same-instance DB tables, link database.md files to catalog tables, ensure base preformatters, and optionally generate AI TL;DRs:
irides enrich
irides enrich ./examples/sqlite_demo --use-ai
irides enrich --dry-run
See packages/enrichment/README.md for full details.
Docker
The CLI Docker Compose service reads its configuration from packages/cli/.env and attaches to the shared irides-net network (docker compose -f infra/docker-compose.infra.yml up -d or docker network create irides-net).
Tokens & Environment Variables
Put GITHUB_TOKEN, GITLAB_TOKEN, IRIDES_GIT_TOKEN, LITELLM_API_KEY, and DB_TARGETS in packages/cli/.env (or pass --env-file .env to docker compose to use the repository root .env). Inside the container, packages/cli/.env is also mounted at /app/cli/.env (usable via irides -e /app/cli/.env ...).
One-Off Commands
docker compose -f packages/cli/docker-compose.yml build
docker compose -f packages/cli/docker-compose.yml run --rm irides-cli configurations
docker compose -f packages/cli/docker-compose.yml run --rm irides-cli -c /app/examples/sqlite_demo/irides.yaml describe --target demo_sqlite
Keep Container Active (Persistent Dev Shell)
Because packages/cli/Dockerfile sets ENTRYPOINT ["irides"], override the entrypoint to keep a container running across describe, prism, and enrich:
# Start persistent container in background
docker compose -f packages/cli/docker-compose.yml run -d --name irides-cli-dev --entrypoint sleep irides-cli infinity
# Enter an interactive shell or run commands directly
docker exec -it irides-cli-dev bash
docker exec irides-cli-dev irides -c /app/examples/sqlite_demo/irides.yaml describe --target demo_sqlite
docker exec irides-cli-dev irides prism /app/examples/sqlite_demo --output-dir /app/storage/prism
docker exec irides-cli-dev irides enrich --dry-run
docker exec irides-cli-dev irides enrich
# Stop and remove when done
docker rm -f irides-cli-dev
Or launch a temporary interactive shell that removes itself on exit:
docker compose -f packages/cli/docker-compose.yml run --rm --entrypoint bash irides-cli
Metadata
Release files for irides-cli 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_cli-0.2.0.tar.gz | 17.6 kB | Without provenance | Details for irides_cli-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| irides_cli-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for irides_cli-0.2.0-py3-none-any.whl |
Total release size: 35.6 kB
Release files / irides_cli-0.2.0.tar.gz
| Download URL | irides_cli-0.2.0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b2ce1bbcacc76cac1df9e62c20da561181cb0996643e7eb4560fb44a625fd37
|
|
BLAKE2b-256 checksum How to use checksums |
6b31e95e30f87d062dd8c97d4cf7aa4e6e60500d169f0030d8a9f87355a0602f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Release files / irides_cli-0.2.0-py3-none-any.whl
| Download URL | irides_cli-0.2.0-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a99d8e9a90f8205298df550a6f6a87a7e4c61a9b1f5a6336b28cb7d68cb2a33
|
|
BLAKE2b-256 checksum How to use checksums |
96550a1128a0a77cecbc5ae9dbdea4cc113a9fc13a130424633f22778919df03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Security for irides-cli 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.