Metadata-Version: 2.4
Name: ichnos
Version: 0.0.2
Summary: Infer a DBML schema and ERD from SQL queries alone, with no database connection.
Keywords: dbml,erd,schema,sql
Author: Ozan Ozbeker
Author-email: Ozan Ozbeker <github@ozanozbeker.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Dist: cyclopts>=5.0.0,<6
Requires-Dist: sqlglot>=30.23.0,<30.28
Requires-Dist: sqlglot[c]>=30.23.0,<30.28 ; extra == 'c'
Maintainer: Ozan Ozbeker
Maintainer-email: Ozan Ozbeker <github@ozanozbeker.com>
Requires-Python: >=3.14
Project-URL: Homepage, https://github.com/ozanozbeker/ichnos
Project-URL: Issues, https://github.com/ozanozbeker/ichnos/issues
Project-URL: Repository, https://github.com/ozanozbeker/ichnos
Provides-Extra: c
Description-Content-Type: text/markdown

# ichnos

Infer a DBML schema and ERD from SQL queries alone.
No database connection needed.

ichnos reads a folder of Oracle queries and writes the tables, columns, keys, relationships and lineage those queries imply.
Every claim carries its evidence counts, and every ambiguity lists its candidates.

## Run it

`uvx` runs ichnos with no install and no compiler:

```sh
uvx ichnos dbml queries -o schema.dbml
uvx ichnos summary queries --keyword status
uvx ichnos join-path queries SALES.ORDERS INV.PRODUCTS
uvx ichnos upstream queries --report 055_key_customers
```

`uvx "ichnos[c]"` runs the same commands on compiled sqlglot, which is about 3x faster.

## Paste a slice into a chat on Windows

Every command writes UTF-8.
Windows PowerShell re-encodes what it pipes, so write the slice to a file with `-o` and copy the file:

```powershell
ichnos upstream queries --report 055_key_customers -o slice.dbml
Get-Content -Raw -Encoding UTF8 slice.dbml | Set-Clipboard
```
