Skip to main content

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 deploy list List pending deploys
baucli deploy approve <id> Approve a deploy
baucli deploy 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 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

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

Release files for baucli 1.0.110

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

Source distribution (sdist)

Source distribution for baucli 1.0.110
File Size Uploaded
baucli-1.0.110.tar.gz 641.6 kB Details

Built distribution (wheel)

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

Total release size: 1.3 MB

Release files / baucli-1.0.110.tar.gz

Download URL baucli-1.0.110.tar.gz
Size 641.6 kB
Tags Source
SHA-256 checksum
How to use checksums
910019a5ebbf3181c446a5b467e81d2bd680b9ced24f834c97cd3e96d1cafb4b
BLAKE2b-256 checksum
How to use checksums
eb70cf1b2463928db1e37d3e9268bd48784c8e54a5acc368ad51fb04fe71d223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

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

Download URL baucli-1.0.110-py3-none-any.whl
Size 647.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a563f82e7ab411c5f7cdded1507c1301e3572732bc0bb2170c7cef51dbafe5e
BLAKE2b-256 checksum
How to use checksums
f0bdd584e8318e09d2f356755baf446fe8df756cd115fc287a92aa3d44b5d665
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.110 This release

2 release files

1.0.97

2 release files

1.0.96

2 release files

1.0.95

2 release files

1.0.94

2 release files

1.0.93

2 release files

1.0.87

2 release files

1.0.85

2 release files

1.0.84

2 release files

1.0.83

2 release files

1.0.82

2 release files

1.0.81

2 release files

1.0.80

2 release files

1.0.79

2 release files

1.0.78

2 release files

1.0.77

2 release files

1.0.76

2 release files

1.0.75

2 release files

1.0.74

2 release files

1.0.69

2 release files

1.0.65

2 release files

1.0.63

2 release files

1.0.62

2 release files

1.0.44

2 release files

1.0.43

2 release files

1.0.42

2 release files

1.0.41

2 release files

1.0.40

2 release files

1.0.39

2 release files

1.0.38

2 release files

1.0.37

2 release files

1.0.36

2 release files

1.0.35

2 release files

1.0.34

2 release files

1.0.33

2 release files

1.0.32

2 release files

1.0.31

2 release files

1.0.30

2 release files

1.0.29

2 release files

1.0.28

2 release files

1.0.27

2 release files

1.0.26

2 release files

1.0.25

2 release files

1.0.24

2 release files

1.0.23

2 release files

1.0.22

2 release files

1.0.21

2 release files

1.0.20

2 release files

1.0.19

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

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