Skip to main content

oceanbase-cli (obcli)

OceanBase / MySQL protocol CLI (pymysql):

  • Encrypted DSN under ~/.config/obcli/ (or $XDG_CONFIG_HOME/obcli/).
  • obcli sql — read-only without policy.json; with a valid policy.json, DML/DDL follow block_rules (no CLI flag or env to skip policy).
  • Chinese ops guide: docs/operations-guide-zh.md · Policy sample: examples/policy.example.json

Design note (historical): docs/cloud-platform-token-cli-skills-design.md

Agent skill: skills/oceanbase-cli/SKILL.md · Architecture (中文): docs/architecture-components-zh.md

Install

pip install -e ./oceanbase-cli

Dependencies: click, cryptography, pymysql. Optional oceanbase_cli.connection_pool for other tools; obcli uses one connection per command via executor.

Store DSN (stdin)

printf '%s' 'oceanbase://user:pass@host:2881/db' | obcli config set-dsn
obcli config status

Avoid obcli --dsn '...' where argv is visible in ps.

Commands

Command Purpose
obcli config set-dsn / clear-dsn / status Encrypted DSN + paths
obcli rules show / metadata / explain policy.json + policy_governs_writes 等
obcli sql, status, schema tables Data plane

Publishing to PyPI (maintainers)

Releases are automated from ecology-plugins: workflow publish-oceanbase-cli-pypi.yml (same Twine + token pattern as publish-pyobsql-pypi.yml).

  • Manual run: Actions → Publish OceanBase CLI to PyPI → Run workflow (optional version override, Test PyPI toggle).
  • Tag push: push a tag matching release_oceanbase_cli_* after bumping version in pyproject.toml.

Configure repository secrets PYPI_API_TOKEN / TEST_PYPI_API_TOKEN as in the monorepo root README.

Tests

cd oceanbase-cli && pip install -e ".[dev]" && pytest tests/ -v

Debug

OBCLI_AUDIT_LOG / OBCLI_AUDIT_DISABLED — audit JSONL.

Metadata

Release files for oceanbase-cli 0.1.0

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

Source distribution (sdist)

Source distribution for oceanbase-cli 0.1.0
File Size Uploaded
oceanbase_cli-0.1.0.tar.gz 19.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oceanbase-cli 0.1.0
File Interpreter ABI Platform
oceanbase_cli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.5 kB

Release files / oceanbase_cli-0.1.0.tar.gz

Download URL oceanbase_cli-0.1.0.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
eff664d4b08b059a886a5797d5ffbf9d73b7fd44298979903a894d336ce9318f
BLAKE2b-256 checksum
How to use checksums
91de6447b80e6a52637dcc2aee25e55d5b453c192897e900a087f8f99b5fa0ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / oceanbase_cli-0.1.0-py3-none-any.whl

Download URL oceanbase_cli-0.1.0-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb346839580c8848a41cf0903f36d239ee5aea98205dac81666f0be334af2bfb
BLAKE2b-256 checksum
How to use checksums
0abfc5eb8bdb7f117d68e3f6f369a6fbfeb10e9d5b9c2a392de73e52ca1b212f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

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