Iride CLI
Command-line interface for database introspection, built only on the core package and Python's standard library. 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 using onlycore;irides_cli/main.py: composition root, JSON serialization, and process-level error handling.
Local installation
pip install -e ./core -e ./cli
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/{config}/{instance}/{schema}/{table}.mdstorage/exports/okf/catalog/{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 scan commands. They are asynchronous and explicitly require Redis Streams and the worker service.
Docker
The CLI reads its configuration from cli/.env and uses the shared Redis network. Start by copying .env.example as shown above and configure at least one DB_TARGETS entry.
docker compose -f infra/docker-compose.infra.yml up -d
docker compose -f cli/docker-compose.yml run --rm irides-cli configurations
docker compose -f cli/docker-compose.yml run --rm irides-cli tables --config sales_mysql --schema public
docker compose -f cli/docker-compose.yml run --rm irides-cli describe --config sales_mysql --schema public --table orders
Metadata
Release files for irides-cli 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 |
|---|---|---|---|---|
| irides_cli-0.1.1.tar.gz | 11.5 kB | Without provenance | Details for irides_cli-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| irides_cli-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for irides_cli-0.1.1-py3-none-any.whl |
Total release size: 23.8 kB
Release files / irides_cli-0.1.1.tar.gz
| Download URL | irides_cli-0.1.1.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
365cb2bc1aa729a75b2b0077f4d76553f2634d746d1598d8fa63c3fc6b7b5fd5
|
|
BLAKE2b-256 checksum How to use checksums |
5a3c5fc7305cceee53da83e25b719cdba25908edeeb95d273e70d3562af59104
|
| 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.1.1-py3-none-any.whl
| Download URL | irides_cli-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06d5dfedb4a42c1fe42f7ffea5fe892ca78ae3ff7de3d9d56ef213410781fac3
|
|
BLAKE2b-256 checksum How to use checksums |
480d4cd3ae3ef48d86b3d270af04f8f3e3c0b0e15a790e25bfb6f39d27b7252f
|
| 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.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.