rb-keys
Shared normalization keys (query, domain, URL) for linking records across tools
Usage
from rb_keys import KEYS_VERSION, norm_domain, norm_query, norm_url
norm_query("!Купить Ёлку -бесплатно") # "купить елку"
norm_domain("https://WWW.xn--e1afmkfd.xn--p1ai:443/") # "пример.рф"
norm_url("https://www.example.com/Catalog/?utm_source=x&p=2#top") # "example.com/Catalog?p=2"
Not in Python: keys query|domain|url VALUE [--json] prints the key (--json:
{"ok": true, "fn", "input", "key", "keys_version"}; not a URL → exit 2 INVALID_ARGUMENTS).
Batch: keys query|domain|url A B … [--input FILE|-] [--json] — one process for many values;
--json: {"ok": true, "fn", "count", "keys_version", "results": [{"input", "key"}]} in input order.
The rules are the contract vectors in vectors/keys-v1.yaml —
run them against your own implementation as a contract test.
Development
uv sync
uv run keys --help
uv run pytest --snapshot-update # after changing a command's help; review tests/snapshots/help/
The gate is gate check, run on this machine before a commit (.agents/antagor/antagor.toml).
pytest fails below the coverage floor in pyproject.toml; ruff includes the security (S) rules.
Release
The version is the git tag (vX.Y.Z) — pyproject.toml has no version =. Releases go through
Antagor: antagor publish runs the gate, writes CHANGELOG.md, tags and pushes.
Install
uv tool install rb-keys --index https://homeserver.tailee01ab.ts.net:3000/api/packages/bolandeu/pypi/simple
From the git tag instead (never a branch):
uv tool install "rb-keys @ git+https://homeserver.tailee01ab.ts.net:3000/bolandeu/keys.git@vX.Y.Z"
Replace vX.Y.Z with the latest release tag. An AI agent bootstraps the CLI the same way — see
src/rb_keys/data/SKILL.md. Update an installed copy: uv tool upgrade rb-keys.
After install, the command keys is available globally, on macOS, Linux and Windows alike.
Architecture
This project follows a fixed CLI architecture:
src/rb_keys/commands/— argument parsing only, no business logic.src/rb_keys/core/— services, models, errors: the real logic.src/rb_keys/providers/— external APIs/integrations.src/rb_keys/credentials/— secrets via the OS keychain (keyring) and environment variables. Secrets never live in.rb_keys/config.toml.src/rb_keys/output/— human (rich) and--jsonrendering.
Run keys doctor to check environment/config/auth readiness, and
keys --help for the full command surface. Every command supports
--json for machine/agent consumption; errors are structured (error.code,
fixed exit codes, error.action telling you what to do next) and go to
stderr in human mode, so stdout is always safe to pipe.
A project can require a minimum CLI version in its .rb_keys/config.toml
([cli] min_version = "..."); an older install refuses with exit 6 and
uv tool upgrade rb-keys fixes it.
See src/rb_keys/data/SKILL.md for the agent-facing usage guide
bundled with this package — install it into an AI tool with
keys skill install, or get it as plain text with
keys --ai (works even without file access).
Metadata
Release files for rb-keys 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rb_keys-0.2.3.tar.gz | 128.8 kB | Without provenance | Details for rb_keys-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rb_keys-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for rb_keys-0.2.3-py3-none-any.whl |
Total release size: 173.3 kB
Release files / rb_keys-0.2.3.tar.gz
| Download URL | rb_keys-0.2.3.tar.gz |
|---|---|
| Size | 128.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd9c450386799b00d62be5c5988fd7ab3b44d524a03d34172287d7889be5064e
|
|
BLAKE2b-256 checksum How to use checksums |
7e2414852b86734e56689fe14df33a1df5bbe58577c44e611b17c3154cac997b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / rb_keys-0.2.3-py3-none-any.whl
| Download URL | rb_keys-0.2.3-py3-none-any.whl |
|---|---|
| Size | 44.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4e572961d645101cbd78e547749ef72a3bfa5c88e61ca1bde1a299f9e362ea2
|
|
BLAKE2b-256 checksum How to use checksums |
4e6c8dd719d49e05b021475993c3d9d411e6954abcbdbad4b5e21dda36782b15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for rb-keys 0.2.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.