Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion server/cli/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,9 @@ def _add_lint_instructions_parser(
p_lint.add_argument(
"--all", action="store_true", help="list clean files too (default: stale only)"
)
p_lint.add_argument("--json", action="store_true")
p_lint.add_argument(
"--json", action="store_true", help="print the report as JSON instead of text"
)
p_lint.add_argument(
"--fail-on-stale", action="store_true", help="exit 1 when any reference is stale (for CI)"
)
Expand Down
4 changes: 3 additions & 1 deletion server/cli/maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ def _add_reembed_parser(sub: Any) -> None:
)
p_reembed.add_argument("--org", default="", help="Limit to one org")
p_reembed.add_argument("--namespace", default="", help="Limit to one namespace")
p_reembed.add_argument("--batch-size", type=int, default=200)
p_reembed.add_argument(
"--batch-size", type=int, default=200, help="Rows read per page (default 200)"
)
p_reembed.add_argument(
"--in-database",
default="",
Expand Down
8 changes: 7 additions & 1 deletion server/cli/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ def _add_reconcile_parser(sub: Any) -> None:
"a ClickHouse restore) publish again every revision committed after it. Stop every "
"server and worker first. Dry run by default.",
)
p.add_argument("--restored", choices=["clickhouse", "postgres", "both"], required=True)
p.add_argument(
"--restored",
choices=["clickhouse", "postgres", "both"],
required=True,
help="the store restored from a backup; the other store's records past the restore "
"point run again in it (both is refused: no store holds them)",
)
p.add_argument(
"--point",
required=True,
Expand Down
4 changes: 3 additions & 1 deletion server/cli/settings_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def register_settings_cli(sub: Any) -> None:
"history", help="Recorded changes, newest first: who, the value before and after."
)
hs.add_argument("name", nargs="?", default="", help="One setting; all when omitted")
hs.add_argument("--limit", type=int, default=50)
hs.add_argument(
"--limit", type=int, default=50, help="The most changes to print, newest first (default 50)"
)
hs.add_argument("--json", action="store_true", help="One JSON array")
hs.set_defaults(func=_cmd_history)
8 changes: 4 additions & 4 deletions tests/unit/snapshots/cli_help.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
],
"loom code lint-instructions": [
"usage: loom code lint-instructions [-h] [--org ORG] [--namespace NAMESPACE] [--file FILE] [--glob GLOB] [--symbols] [--all] [--json] [--fail-on-stale]",
"options: -h, --help show this help message and exit --org ORG default: LOOM_CODE_ORG --namespace NAMESPACE default: LOOM_CODE_NAMESPACE --file FILE lint only these repo-relative files (repeatable) --glob GLOB also lint tree paths matching this fnmatch pattern, e.g. 'docs/*.md' (repeatable) --symbols also resolve `Qualified::names` against loom.code_symbols --all list clean files too (default: stale only) --json --fail-on-stale exit 1 when any reference is stale (for CI)"
"options: -h, --help show this help message and exit --org ORG default: LOOM_CODE_ORG --namespace NAMESPACE default: LOOM_CODE_NAMESPACE --file FILE lint only these repo-relative files (repeatable) --glob GLOB also lint tree paths matching this fnmatch pattern, e.g. 'docs/*.md' (repeatable) --symbols also resolve `Qualified::names` against loom.code_symbols --all list clean files too (default: stale only) --json print the report as JSON instead of text --fail-on-stale exit 1 when any reference is stale (for CI)"
],
"loom decisions": [
"usage: loom decisions [-h] {extract} ...",
Expand Down Expand Up @@ -223,7 +223,7 @@
"loom settings history": [
"usage: loom settings history [-h] [--limit LIMIT] [--json] [name]",
"positional arguments: name One setting; all when omitted",
"options: -h, --help show this help message and exit --limit LIMIT --json One JSON array"
"options: -h, --help show this help message and exit --limit LIMIT The most changes to print, newest first (default 50) --json One JSON array"
],
"loom secrets": [
"usage: loom secrets [-h] {reseal} ...",
Expand Down Expand Up @@ -288,7 +288,7 @@
],
"loom reembed": [
"usage: loom reembed [-h] [--org ORG] [--namespace NAMESPACE] [--batch-size BATCH_SIZE] [--in-database NAMED_COLLECTION] [--dry-run] [--delete-old] [--key-only] [--resume RESUME]",
"options: -h, --help show this help message and exit --org ORG Limit to one org --namespace NAMESPACE Limit to one namespace --batch-size BATCH_SIZE --in-database NAMED_COLLECTION Re-embed inside ClickHouse with aiEmbed (ClickHouse 26.7+): the named collection holding provider/endpoint/api_key. One INSERT … SELECT per table instead of a Python loop; refuses when an embed-text switch is on, and with a customer or identity header set or the inference gateway required (ClickHouse's calls name no one and skip the gateway check). --dry-run Count off-model rows without writing --delete-old Delete off-model rows after re-embedding, except in the orgs the run left for later --key-only Rebuild only the key-axis vectors in scope, from the current key-axis text; value vectors are kept --resume RESUME Continue after the row a previous run's `resume:` line names (the tables before it are done; it carries the orgs --delete-old keeps)"
"options: -h, --help show this help message and exit --org ORG Limit to one org --namespace NAMESPACE Limit to one namespace --batch-size BATCH_SIZE Rows read per page (default 200) --in-database NAMED_COLLECTION Re-embed inside ClickHouse with aiEmbed (ClickHouse 26.7+): the named collection holding provider/endpoint/api_key. One INSERT … SELECT per table instead of a Python loop; refuses when an embed-text switch is on, and with a customer or identity header set or the inference gateway required (ClickHouse's calls name no one and skip the gateway check). --dry-run Count off-model rows without writing --delete-old Delete off-model rows after re-embedding, except in the orgs the run left for later --key-only Rebuild only the key-axis vectors in scope, from the current key-axis text; value vectors are kept --resume RESUME Continue after the row a previous run's `resume:` line names (the tables before it are done; it carries the orgs --delete-old keeps)"
],
"loom reextract": [
"usage: loom reextract [-h] --org ORG --namespace NAMESPACE --into INTO [--base-url BASE_URL] [--token TOKEN] [--dates {auto,none}] [--concurrency CONCURRENCY] [--limit-sessions LIMIT_SESSIONS] [--dry-run]",
Expand Down Expand Up @@ -418,7 +418,7 @@
],
"loom reconcile": [
"usage: loom reconcile [-h] --restored {clickhouse,postgres,both} --point POINT [--allow-live] [--apply | --dry-run]",
"options: -h, --help show this help message and exit --restored {clickhouse,postgres,both} --point POINT the restored backup's time (ISO 8601, UTC when no offset), from the backup's own metadata --allow-live run although a worker reported a pass within two workers-lease terms (LOOM_SUPERVISOR_LEASE_TTL_S, a minute by default) --apply run the erasures and redactions again and publish (default: dry run) --dry-run report what --apply would write, write nothing (the default)"
"options: -h, --help show this help message and exit --restored {clickhouse,postgres,both} the store restored from a backup; the other store's records past the restore point run again in it (both is refused: no store holds them) --point POINT the restored backup's time (ISO 8601, UTC when no offset), from the backup's own metadata --allow-live run although a worker reported a pass within two workers-lease terms (LOOM_SUPERVISOR_LEASE_TTL_S, a minute by default) --apply run the erasures and redactions again and publish (default: dry run) --dry-run report what --apply would write, write nothing (the default)"
],
"loom router": [
"usage: loom router [-h] {serve,migrate} ...",
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/snapshots/cli_tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -3226,7 +3226,7 @@
"nargs": 0,
"type": null,
"required": false,
"help": null,
"help": "print the report as JSON instead of text",
"metavar": null
},
{
Expand Down Expand Up @@ -6326,7 +6326,7 @@
"nargs": null,
"type": "builtins:int",
"required": false,
"help": null,
"help": "The most changes to print, newest first (default 50)",
"metavar": null
},
{
Expand Down Expand Up @@ -7523,7 +7523,7 @@
"nargs": null,
"type": "builtins:int",
"required": false,
"help": null,
"help": "Rows read per page (default 200)",
"metavar": null
},
{
Expand Down Expand Up @@ -12120,7 +12120,7 @@
"nargs": null,
"type": null,
"required": true,
"help": null,
"help": "the store restored from a backup; the other store's records past the restore point run again in it (both is refused: no store holds them)",
"metavar": null
},
{
Expand Down