baucli 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
baucli-1.0.1/PKG-INFO ADDED
@@ -0,0 +1,179 @@
1
+ Metadata-Version: 2.4
2
+ Name: baucli
3
+ Version: 1.0.1
4
+ Summary: BAUCLI — AI-powered database documentation CLI for BAU
5
+ Home-page: https://www.begcloud.com
6
+ Author: BEG Support
7
+ Author-email: contato@begcloud.com
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: Other/Proprietary License
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: Database
19
+ Classifier: Topic :: Documentation
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: click>=8.0
23
+ Requires-Dist: requests>=2.28
24
+ Requires-Dist: rich>=13.0
25
+ Requires-Dist: oracledb>=2.0
26
+ Requires-Dist: mysql-connector-python>=8.0
27
+ Requires-Dist: psycopg>=3.0
28
+ Requires-Dist: python-tds>=1.12
29
+ Requires-Dist: mcp>=1.2
30
+ Provides-Extra: keyring
31
+ Requires-Dist: keyring>=24.0; extra == "keyring"
32
+ Provides-Extra: screenshot
33
+ Requires-Dist: playwright>=1.40; extra == "screenshot"
34
+ Dynamic: author
35
+ Dynamic: author-email
36
+ Dynamic: classifier
37
+ Dynamic: description
38
+ Dynamic: description-content-type
39
+ Dynamic: home-page
40
+ Dynamic: provides-extra
41
+ Dynamic: requires-dist
42
+ Dynamic: requires-python
43
+ Dynamic: summary
44
+
45
+ # BAUCLI
46
+
47
+ **AI-powered database documentation CLI for BAU** — runs on the developer's machine.
48
+
49
+ BAUCLI connects to your databases, extracts PL/SQL objects and table metadata, and syncs them with the BAU Server for automatic AI documentation.
50
+
51
+ ## Quick Start
52
+
53
+ ```bash
54
+ # Install
55
+ pip install baucli
56
+
57
+ # or with all database drivers
58
+ pip install baucli[all]
59
+
60
+ # Activate license
61
+ baucli init --license BAU-XXXX-XXXX-XXXX-XXXX
62
+
63
+ # Add a database
64
+ baucli connect --name dev_oracle --engine oracle \
65
+ --host localhost --port 1521 --service XEPDB1 --user DEMO_HR \
66
+ --schemas DEMO_HR
67
+
68
+ # Sync objects to BAU Server
69
+ baucli sync
70
+
71
+ # Download AI context for your IDE
72
+ baucli context
73
+ ```
74
+
75
+ ## Commands
76
+
77
+ | Command | Description |
78
+ |---------|-------------|
79
+ | `baucli init --license <key>` | Activate license, receive API key |
80
+ | `baucli connect --name <alias> ...` | Add and test a database connection |
81
+ | `baucli sync [--db name \| --all]` | Sync objects to BAU Server |
82
+ | `baucli context [--db name]` | Download AI context (CLAUDE.md) |
83
+ | `baucli status` | Show config, quota, pending deploys |
84
+ | `baucli deploy list` | List pending deploys |
85
+ | `baucli deploy approve <id>` | Approve a deploy |
86
+ | `baucli deploy apply <id>` | Download and apply deploy script |
87
+ | `baucli db list` | List configured databases |
88
+ | `baucli db remove <name>` | Remove a database |
89
+ | `baucli db default <name>` | Set default database |
90
+
91
+ ## Multi-Database Support
92
+
93
+ Configure multiple databases in `~/.baucli/config.json`:
94
+
95
+ ```bash
96
+ # Add Oracle dev
97
+ baucli connect --name dev_oracle --engine oracle --host localhost --port 1521 --service XEPDB1 --user HR
98
+
99
+ # Add PostgreSQL staging
100
+ baucli connect --name staging_pg --engine postgresql --host pg-staging --port 5432 --database erp --user app_user
101
+
102
+ # Add SQL Server production
103
+ baucli connect --name prod_mssql --engine mssql --host sql-prod --port 1433 --database erp --user bau_reader
104
+
105
+ # Sync specific database
106
+ baucli sync --db staging_pg
107
+
108
+ # Sync all
109
+ baucli sync --all
110
+
111
+ # Set default
112
+ baucli db default dev_oracle
113
+ ```
114
+
115
+ ## Supported Databases
116
+
117
+ | Engine | Driver | Install |
118
+ |--------|--------|---------|
119
+ | Oracle 19c+ | oracledb (thin mode) | `pip install baucli` (included) |
120
+ | PostgreSQL 14+ | psycopg | `pip install baucli` (included) |
121
+ | SQL Server 2019+ | python-tds | `pip install baucli` (included) |
122
+ | MySQL 8.0+ | mysql-connector | `pip install baucli` (included) |
123
+
124
+ ## Configuration
125
+
126
+ Config file: `~/.baucli/config.json`
127
+
128
+ ```json
129
+ {
130
+ "license_key": "BAU-XXXX-XXXX-XXXX-XXXX",
131
+ "api_url": "https://begbrokerdev.begcloud.com/ords/bauctx/api/v1",
132
+ "api_key": "bau_cli_xxxx",
133
+ "tenant_code": "ACME_CORP",
134
+ "default_db": "dev_oracle",
135
+ "databases": {
136
+ "dev_oracle": {
137
+ "engine": "oracle",
138
+ "host": "localhost",
139
+ "port": 1521,
140
+ "service": "XEPDB1",
141
+ "user": "DEMO_HR",
142
+ "schemas": ["DEMO_HR"]
143
+ },
144
+ "staging_pg": {
145
+ "engine": "postgresql",
146
+ "host": "pg-staging.internal",
147
+ "port": 5432,
148
+ "database": "erp_hml",
149
+ "user": "app_user",
150
+ "schemas": ["public", "hr"]
151
+ }
152
+ },
153
+ "sync_interval_min": 30,
154
+ "context_output": "CLAUDE.md"
155
+ }
156
+ ```
157
+
158
+ Passwords are stored separately in `~/.baucli/.credentials` (restricted permissions).
159
+
160
+ Override config dir with `BAUCLI_HOME=~/.baucli-tenant2` to keep multiple isolated profiles on the same machine.
161
+
162
+ ## Security
163
+
164
+ - Database credentials **never leave the developer's machine**
165
+ - Only extracted metadata and source code are sent to BAU Server via HTTPS
166
+ - API key uses SHA256 hash — plain token shown once at `baucli init`
167
+ - Passwords stored in `~/.baucli/.credentials` with mode 600 (or OS keychain when available)
168
+ - BAU Server **never executes DDL** on your database
169
+
170
+ ## Requirements
171
+
172
+ - Python 3.9+
173
+ - Network access to BAU Server (HTTPS)
174
+ - Database access (read-only on DBA_SOURCE, DBA_TABLES, etc.)
175
+
176
+ ## License
177
+
178
+ Proprietary — BEG Support © 2025-2026
179
+ www.begcloud.com
baucli-1.0.1/README.md ADDED
@@ -0,0 +1,135 @@
1
+ # BAUCLI
2
+
3
+ **AI-powered database documentation CLI for BAU** — runs on the developer's machine.
4
+
5
+ BAUCLI connects to your databases, extracts PL/SQL objects and table metadata, and syncs them with the BAU Server for automatic AI documentation.
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ # Install
11
+ pip install baucli
12
+
13
+ # or with all database drivers
14
+ pip install baucli[all]
15
+
16
+ # Activate license
17
+ baucli init --license BAU-XXXX-XXXX-XXXX-XXXX
18
+
19
+ # Add a database
20
+ baucli connect --name dev_oracle --engine oracle \
21
+ --host localhost --port 1521 --service XEPDB1 --user DEMO_HR \
22
+ --schemas DEMO_HR
23
+
24
+ # Sync objects to BAU Server
25
+ baucli sync
26
+
27
+ # Download AI context for your IDE
28
+ baucli context
29
+ ```
30
+
31
+ ## Commands
32
+
33
+ | Command | Description |
34
+ |---------|-------------|
35
+ | `baucli init --license <key>` | Activate license, receive API key |
36
+ | `baucli connect --name <alias> ...` | Add and test a database connection |
37
+ | `baucli sync [--db name \| --all]` | Sync objects to BAU Server |
38
+ | `baucli context [--db name]` | Download AI context (CLAUDE.md) |
39
+ | `baucli status` | Show config, quota, pending deploys |
40
+ | `baucli deploy list` | List pending deploys |
41
+ | `baucli deploy approve <id>` | Approve a deploy |
42
+ | `baucli deploy apply <id>` | Download and apply deploy script |
43
+ | `baucli db list` | List configured databases |
44
+ | `baucli db remove <name>` | Remove a database |
45
+ | `baucli db default <name>` | Set default database |
46
+
47
+ ## Multi-Database Support
48
+
49
+ Configure multiple databases in `~/.baucli/config.json`:
50
+
51
+ ```bash
52
+ # Add Oracle dev
53
+ baucli connect --name dev_oracle --engine oracle --host localhost --port 1521 --service XEPDB1 --user HR
54
+
55
+ # Add PostgreSQL staging
56
+ baucli connect --name staging_pg --engine postgresql --host pg-staging --port 5432 --database erp --user app_user
57
+
58
+ # Add SQL Server production
59
+ baucli connect --name prod_mssql --engine mssql --host sql-prod --port 1433 --database erp --user bau_reader
60
+
61
+ # Sync specific database
62
+ baucli sync --db staging_pg
63
+
64
+ # Sync all
65
+ baucli sync --all
66
+
67
+ # Set default
68
+ baucli db default dev_oracle
69
+ ```
70
+
71
+ ## Supported Databases
72
+
73
+ | Engine | Driver | Install |
74
+ |--------|--------|---------|
75
+ | Oracle 19c+ | oracledb (thin mode) | `pip install baucli` (included) |
76
+ | PostgreSQL 14+ | psycopg | `pip install baucli` (included) |
77
+ | SQL Server 2019+ | python-tds | `pip install baucli` (included) |
78
+ | MySQL 8.0+ | mysql-connector | `pip install baucli` (included) |
79
+
80
+ ## Configuration
81
+
82
+ Config file: `~/.baucli/config.json`
83
+
84
+ ```json
85
+ {
86
+ "license_key": "BAU-XXXX-XXXX-XXXX-XXXX",
87
+ "api_url": "https://begbrokerdev.begcloud.com/ords/bauctx/api/v1",
88
+ "api_key": "bau_cli_xxxx",
89
+ "tenant_code": "ACME_CORP",
90
+ "default_db": "dev_oracle",
91
+ "databases": {
92
+ "dev_oracle": {
93
+ "engine": "oracle",
94
+ "host": "localhost",
95
+ "port": 1521,
96
+ "service": "XEPDB1",
97
+ "user": "DEMO_HR",
98
+ "schemas": ["DEMO_HR"]
99
+ },
100
+ "staging_pg": {
101
+ "engine": "postgresql",
102
+ "host": "pg-staging.internal",
103
+ "port": 5432,
104
+ "database": "erp_hml",
105
+ "user": "app_user",
106
+ "schemas": ["public", "hr"]
107
+ }
108
+ },
109
+ "sync_interval_min": 30,
110
+ "context_output": "CLAUDE.md"
111
+ }
112
+ ```
113
+
114
+ Passwords are stored separately in `~/.baucli/.credentials` (restricted permissions).
115
+
116
+ Override config dir with `BAUCLI_HOME=~/.baucli-tenant2` to keep multiple isolated profiles on the same machine.
117
+
118
+ ## Security
119
+
120
+ - Database credentials **never leave the developer's machine**
121
+ - Only extracted metadata and source code are sent to BAU Server via HTTPS
122
+ - API key uses SHA256 hash — plain token shown once at `baucli init`
123
+ - Passwords stored in `~/.baucli/.credentials` with mode 600 (or OS keychain when available)
124
+ - BAU Server **never executes DDL** on your database
125
+
126
+ ## Requirements
127
+
128
+ - Python 3.9+
129
+ - Network access to BAU Server (HTTPS)
130
+ - Database access (read-only on DBA_SOURCE, DBA_TABLES, etc.)
131
+
132
+ ## License
133
+
134
+ Proprietary — BEG Support © 2025-2026
135
+ www.begcloud.com
@@ -0,0 +1,8 @@
1
+ """BAUCLI — AI-powered database documentation CLI for BAU."""
2
+
3
+ import warnings
4
+ warnings.filterwarnings("ignore", message="urllib3 v2 only supports OpenSSL")
5
+
6
+ __version__ = "1.0.1"
7
+ __product__ = "BAUCLI"
8
+ __author__ = "BEG Support"