Skip to main content
Loss of provenance

A previous release had provenance metadata, but this release does not. View details.

BAUCLI

Business-logic context for your databases — kept true to production.

BAUCLI runs on the developer's machine. It connects to Oracle, PostgreSQL, MySQL and SQL Server, extracts the real structure and PL/SQL logic, and turns it into documentation that is reviewed by people and consumed by AI — then writes it back where it belongs: COMMENT ON in the database and context files in your repository.

Because the context is extracted from the live database on every sync, it does not drift away from what is actually deployed. That is the difference between documentation you trust and documentation you stopped reading.

It is the local component of the BAU platform (BEG Application Utilities), which stores the catalog, runs the AI drafting and holds the approval workflow.

Quick Start

# Install
pip install baucli

# or with all database drivers
pip install baucli[all]

# Activate license
baucli init --license BAU-XXXX-XXXX-XXXX-XXXX

# Add a database
baucli connect --name dev_oracle --engine oracle \
  --host localhost --port 1521 --service XEPDB1 --user DEMO_HR \
  --schemas DEMO_HR

# Sync objects to BAU Server
baucli sync

# Download AI context for your IDE
baucli context

Commands

Command Description
baucli init --license <key> Activate license, receive API key
baucli connect --name <alias> ... Add and test a database connection
baucli sync [--db name | --all] Sync objects to BAU Server
baucli context [--db name] Download AI context (CLAUDE.md)
baucli status Show config, quota, pending deploys
baucli documentation list List pending deploys
baucli documentation approve <id> Approve a deploy
baucli documentation apply <id> Download and apply deploy script
baucli db list List configured databases
baucli db remove <name> Remove a database
baucli db default <name> Set default database

Multi-Database Support

Configure multiple databases in ~/.baucli/config.json:

# Add Oracle dev
baucli connect --name dev_oracle --engine oracle --host localhost --port 1521 --service XEPDB1 --user HR

# Add a legacy Oracle reached by SID (typical of 11g / Oracle Forms)
baucli connect --name erp_11g --engine oracle --host erp-db --port 1521 --sid ORCL --user ERP

# Add PostgreSQL staging
baucli connect --name staging_pg --engine postgresql --host pg-staging --port 5432 --database erp --user app_user

# Add SQL Server production
baucli connect --name prod_mssql --engine mssql --host sql-prod --port 1433 --database erp --user bau_reader

# Sync specific database
baucli sync --db staging_pg

# Sync all
baucli sync --all

# Set default
baucli db default dev_oracle

Oracle 11g (and other databases older than 12.1)

The default (thin) driver reaches Oracle Database 12.1 or later. For 11.2 the BAUCLI switches by itself to thick mode, which needs Oracle Instant Client. Point ORACLE_INSTANT_CLIENT_DIR at it before connect / sync:

export ORACLE_INSTANT_CLIENT_DIR=~/opt/instantclient_23_26
baucli connect --name erp_11g --engine oracle --host erp-db --port 1521 --sid ORCL --user ERP

Oracle certifies Instant Client 23 only for 19c or later, but it reached an 11.2.0.4 database in practice (macOS arm64, 2026-11-18). If the 11g server refuses the client (ORA-28040), use Instant Client 19 — not available for Apple Silicon Macs: run the BAUCLI on Linux/Windows or under an x86 Python via Rosetta — or ask the DBA to relax SQLNET.ALLOWED_LOGON_VERSION_SERVER.

Supported Databases

Engine Driver Install
Oracle 19c+ oracledb (thin mode) pip install baucli (included)
PostgreSQL 14+ psycopg pip install baucli (included)
SQL Server 2019+ python-tds pip install baucli (included)
MySQL 8.0+ mysql-connector pip install baucli (included)

Configuration

Config file: ~/.baucli/config.json

{
  "license_key": "BAU-XXXX-XXXX-XXXX-XXXX",
  "api_url": "https://begbrokerdev.begcloud.com/ords/bauctx/api/v1",
  "api_key": "bau_cli_xxxx",
  "tenant_code": "ACME_CORP",
  "default_db": "dev_oracle",
  "databases": {
    "dev_oracle": {
      "engine": "oracle",
      "host": "localhost",
      "port": 1521,
      "service": "XEPDB1",
      "user": "DEMO_HR",
      "schemas": ["DEMO_HR"]
    },
    "staging_pg": {
      "engine": "postgresql",
      "host": "pg-staging.internal",
      "port": 5432,
      "database": "erp_hml",
      "user": "app_user",
      "schemas": ["public", "hr"]
    }
  },
  "sync_interval_min": 30,
  "context_output": "CLAUDE.md"
}

Passwords are stored separately in ~/.baucli/.credentials (restricted permissions).

Override config dir with BAUCLI_HOME=~/.baucli-tenant2 to keep multiple isolated profiles on the same machine.

Security

  • Database credentials never leave the developer's machine
  • Only extracted metadata and source code are sent to BAU Server via HTTPS
  • API key uses SHA256 hash — plain token shown once at baucli init
  • Passwords stored in ~/.baucli/.credentials with mode 600 (or OS keychain when available)
  • BAU Server never executes DDL on your database

Requirements

  • Python 3.9+
  • Network access to BAU Server (HTTPS)
  • Database access (read-only on DBA_SOURCE, DBA_TABLES, etc.)

Unwrap de PL/SQL (opt-in)

O sync/extract sabe reverter o wrap do Oracle (10g/11g/12c) para documentar objetos ofuscados — é o que permitiu documentar os ~90% de units wrapped em catálogos legados. Vem DESLIGADO por padrão: distribuir um deobfuscator tem implicação de propriedade intelectual (o wrap é do fornecedor do cliente), então cada projeto liga explicitamente, declarando ter direito sobre o código-fonte.

Ligar por projeto no bau.toml:

unwrap_enabled = true

Ou por sessão via env: BAUCLI_UNWRAP=1. Quando ligado, db/oracle.py::extract_objects desempacota via baucli/unwrap.py (is_wrapped → unwrap_source) antes do CREATE OR REPLACE; unit em formato 9i/corrompido é mantido wrapped (não fatal). Não cobre o formato 9i.

⚠️ Num schema com objetos wrapped, o flag PRECISA estar ligado antes do sync. Com o gate OFF, o sync captura o texto wrapped e o grava por cima da documentação — corrompendo o catálogo em silêncio. Por isso, num projeto cujo alvo tem PL/SQL wrapped (ex.: Exatron/ODIN), o bau.toml deve nascer com unwrap_enabled = true, e o smoke test antes do primeiro sync real é: BAUCLI_UNWRAP=1 baucli sync --dry-run --object <objeto_wrapped> → deve voltar UNCHANGED. (Se rodar o dry-run SEM o flag, o UNCHANGED é falso — ele nem tentou desempacotar.)

License

Proprietary — BEG Support © 2025-2026 www.begcloud.com

Metadata

Release files for baucli 1.0.169

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

Loss of provenance

These files do not have provenance metadata, despite files in a prior release including this data.

We recommend further investigation before installing these files. View details.

Source distribution (sdist)

Source distribution for baucli 1.0.169
File Size Uploaded Provenance Actions
baucli-1.0.169.tar.gz 1.1 MB Without provenance Details for baucli-1.0.169.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for baucli 1.0.169
File Interpreter ABI Platform Actions
baucli-1.0.169-py3-none-any.whl Python 3 none any Details for baucli-1.0.169-py3-none-any.whl

Total release size: 2.0 MB

Release files / baucli-1.0.169.tar.gz

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL baucli-1.0.169.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
4c53cba63e415858448f913c719d0141c250efe1383cd9eb6c50627c5be17d06
BLAKE2b-256 checksum
How to use checksums
0918d952c11f2592c83bad5f2ed26a3f4afe83fb8a86fd79a46a25c555e41387
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / baucli-1.0.169-py3-none-any.whl

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL baucli-1.0.169-py3-none-any.whl
Size 921.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d31e7d873a59b3b766083dcc8c4049b8b30dd98664bb393a0cc2090e5f75e795
BLAKE2b-256 checksum
How to use checksums
eae2f9c940c5c2bccaf2a3f170ce7879d0869187d76f5327f39ae3da6df3222c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for baucli 1.0.169

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.

Loss of provenance

A previous release of these files had provenance metadata, but this release does not.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Release comparison

  • Removed 1.0.167 2 files With provenance
  • Added 1.0.169 2 files Without provenance

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

1.0.169 This release

2 release files Loss of 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