CLI Usage

urimai is operated entirely through the urim command-line interface. Every interaction — from initial setup to chatting with your data — happens through subcommands documented below.

Typical workflow

A typical session looks like this:

urim setup              # one-time: configure provider and API key
urim init sales.db      # register a database
urim chat sales         # ask questions in plain English
urim export sales       # export a data dictionary when you're done

Command overview

Command

Description

urim setup

Run the setup wizard

urim init <path>

Register a SQLite database or CSV file

urim list

List registered databases

urim chat <name>

Start interactive chat with a database

urim sync <name>

Re-sync schema metadata

urim config

View or modify settings

urim export <name>

Export data dictionary

Global option

--model <provider>

Override the default LLM provider for a single invocation (e.g. urim chat mydb --model openai).


urim setup

Run the interactive setup wizard.

urim setup

Configures your API provider, API key, and user name. Settings are stored in ~/.urimai/config.toml and keys in the system keyring.

You only need to run this once. To change settings later, use urim config.


urim init

Register a new database.

urim init <path> [OPTIONS]

Option

Description

--name TEXT

Custom name (default: filename stem)

--table-name TEXT

Table name for CSV import (default: LLM-suggested)

--delimiter TEXT

CSV delimiter (default: ,)

--encoding TEXT

CSV file encoding (default: utf-8)

When you register a database, urimai:

  1. Extracts the schema (tables, columns, types).

  2. Uses the LLM to enrich column descriptions.

  3. Profiles each column (min, max, nulls, distribution).

  4. Runs data-quality checks.

Examples

# Register a SQLite database
urim init sales.db

# Register with a custom name
urim init sales.db --name quarterly_sales

# Import a CSV file (auto-converted to SQLite)
urim init report.csv --delimiter ";" --encoding latin-1

urim list

List all registered databases.

urim list

Displays each database’s name, file path, and last sync time.


urim chat

Start an interactive chat session with a registered database.

urim chat <db_name>

Inside the session, type questions in plain English. urimai generates SQL, executes it, and explains the results. Type exit or press Ctrl+D to end the session.

Example

urim chat sales
You: What were the top 5 products by revenue last quarter?

urimai will select the relevant tables, write a SQL query, run it, and present the results with an explanation.


urim sync

Re-sync schema metadata for a database whose structure has changed.

urim sync <db_name>

This re-extracts all table schemas and re-runs LLM enrichment, profiling, and quality checks. Useful after you’ve added tables or columns to the underlying database.


urim config

View or modify configuration.

urim config [KEY] [VALUE] [OPTIONS]

Option

Description

--reset

Reset configuration to defaults

--path

Show config and data directory paths

Examples

urim config                              # show all settings
urim config provider.default openai      # change default provider
urim config settings.query_timeout 120   # set query timeout
urim config --reset                      # reset to defaults
urim config --path                       # show directory paths

See Configuration for the full list of settings.


urim export

Export a data dictionary for a registered database.

urim export <db_name> [OPTIONS]

Option

Description

--format, -f

Output format: xlsx or markdown (default: xlsx)

--output, -o

Output file path

--include-sample-data

Include sample data rows

--include-profile / --no-include-profile

Include column profile stats (default: on)

--include-quality / --no-include-quality

Include quality report (default: on)

Examples

urim export mydb
urim export mydb -f markdown -o docs/mydb.md
urim export mydb --include-sample-data --no-include-quality