Skip to main content

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 and argparse parsing;
  • 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 only core;
  • 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:

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: --target and --config are interchangeable aliases. Omitting --target, --instance, --schema, or --table expands the scope, just like the corresponding API endpoints. Results are always written as JSON to stdout; errors are written to stderr. Add --no-cache to 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}.md
  • storage/exports/okf/catalog/{config}/{instance}/{schema}/{table}.md (along with storage/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.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for irides-cli 0.1.4
File Size Uploaded Provenance Actions
irides_cli-0.1.4.tar.gz 14.2 kB Without provenance Details for irides_cli-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for irides-cli 0.1.4
File Interpreter ABI Platform Actions
irides_cli-0.1.4-py3-none-any.whl Python 3 none any Details for irides_cli-0.1.4-py3-none-any.whl

Total release size: 29.7 kB

Release files / irides_cli-0.1.4.tar.gz

Download URL irides_cli-0.1.4.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
72a966565bfcce10a3f69ecdb7cfe403f953084c7f95356d101031dfc5cfeea5
BLAKE2b-256 checksum
How to use checksums
9c1bc4e5d95536ff463f0c3ab1a95a0ac6ed546364a8e1fb386bbae877c17b55
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.4-py3-none-any.whl

Download URL irides_cli-0.1.4-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86211a2ff77714bd8f990e4ba0fba76a4613ec837dce2065d61e49a22b71d47a
BLAKE2b-256 checksum
How to use checksums
a05703c9261794d944a7507e0048fe4204c5864a5e66aceb15e59b47eaaa7419
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.4

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.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page