diff options
| author | Nikolay Perfilov <[email protected]> | 2026-07-14 13:29:24 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-14 13:29:24 +0300 |
| commit | 345cf9df9923a4d214bfe902b2bd2e723b24bfa3 (patch) | |
| tree | 697446a6ebf666182715d730c643142c3f19b329 | |
| parent | 72d706a9d5746cf5be37cdc1d796c4445f1bc8db (diff) | |
Update YDB CLI readme.md and agents.md (#45061)
| -rw-r--r-- | ydb/apps/ydb/README.md | 17 | ||||
| -rw-r--r-- | ydb/public/lib/ydb_cli/AGENTS.md | 12 |
2 files changed, 27 insertions, 2 deletions
diff --git a/ydb/apps/ydb/README.md b/ydb/apps/ydb/README.md index 8f168613f05..10f88dae296 100644 --- a/ydb/apps/ydb/README.md +++ b/ydb/apps/ydb/README.md @@ -2,6 +2,8 @@ This is the official YDB command line client that works via public API. +Full documentation: https://ydb.tech/docs/en/reference/ydb-cli/ + The structure of commands in YDB CLI is similar to one in YDB API and consists of services (table, scheme, etc.). There is also an additional "tools" section which provides useful utilities for common operations with the database. @@ -9,4 +11,17 @@ There is a couple of options that every call has to be provided with (or it can - endpoint - Endpoint to connect to; - database - Database to work with. -You can use --help option on root or any subcommand for more info.
\ No newline at end of file +You can use --help option on root or any subcommand for more info. + +## Development + +- App entrypoint: `ydb/apps/ydb/`; main library: `ydb/public/lib/ydb_cli/`. +- Build (release): `./ya make -r ydb/apps/ydb`. +- User-visible changes must be recorded in [CHANGELOG.md](CHANGELOG.md). + +### Tests + +Run with `./ya make -tA <dir>` (Linux only): + +- Unit and binary tests (C++): `ut/` dirs next to the code, plus `ydb/apps/ydb/ut/` (drives the built `ydb` binary against a YDB recipe). +- Functional tests (Python): `ydb/tests/functional/ydb_cli/` (start a real cluster and run the `ydb` binary against it).
\ No newline at end of file diff --git a/ydb/public/lib/ydb_cli/AGENTS.md b/ydb/public/lib/ydb_cli/AGENTS.md index ff6d5ee1731..fbf84bbd400 100644 --- a/ydb/public/lib/ydb_cli/AGENTS.md +++ b/ydb/public/lib/ydb_cli/AGENTS.md @@ -6,6 +6,12 @@ - Main CLI library: `ydb/public/lib/ydb_cli/` (commands, common, dump, import, topic) - This library is reused by other internal CLI targets +## Build + +Build the CLI in release: `./ya make -r ydb/apps/ydb` (`-r` = `--build release`). +Prefer `-r` over the repo-wide `relwithdebinfo` default; that default mainly helps the +server (crash dumps with symbols), not the CLI. + ## Dependency rules CLI code MUST NOT depend on `ydb/core/` or its subdirectories. @@ -22,4 +28,8 @@ Follow the existing bullet-point style in the file. ## Tests -Tests (`ya make -tA`) can be run only on Linux. +Run with `./ya make -tA <dir>` (builds the binary first; Linux only). + +- Unit tests (C++): `ut/` dirs next to the code (e.g. `ydb/public/lib/ydb_cli/common/.../ut/`). +- Binary/integration tests (C++): `ydb/apps/ydb/ut/` — drive the built `ydb` against a YDB recipe. +- Functional tests (Python): `ydb/tests/functional/ydb_cli/` — start a real cluster and run `ydb`; interactive cases use pexpect, golden output in `canondata/`. |
