diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c7e17d..8039b57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,26 @@ All notable changes to tlgr are recorded here. The format follows semantic versioning at the CLI surface, which means the JSON shapes and exit codes documented in `AGENT.md` are the public API. +## [2.0.1] — 2026-09-10 + +### Changed + +- **The distribution is published as `tlgr-cli`.** PyPI refuses the name + `tlgr` as too similar to an existing `tlgrm`, so the name on the index is + `tlgr-cli`. Nothing else moves: the import package is still `tlgr`, the + command is still `tlgr`, and every module path is unchanged. Only the + install line differs. + + ```bash + pipx install tlgr-cli # was: pipx install git+https://github.com/tlgrcli/tlgr.git + ``` + + If you already run tlgr from a git or editable install, you do not need to + do anything. Do not `pipx install tlgr-cli` alongside an existing `tlgr` + pipx install: both provide the same `tlgr` command and the second one will + collide with the first. `pipx uninstall tlgr` first, or keep the install + you have. + ## [2.0.0] — 2026-09-10 **Every command tlgr has is generated from the operation registry.** There is diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5bd3ce..4a5c0f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,11 +115,16 @@ workflow's OIDC token instead of an API token, so there is no publishing secret in this repository and nothing to leak or rotate. It has to be configured once, on pypi.org, before the first release that uses it: -- owner `tlgrcli`, repository `tlgr`, workflow `release.yml`, environment - `pypi`; +- PyPI project `tlgr-cli`, owner `tlgrcli`, repository `tlgr`, workflow + `release.yml`, environment `pypi`; - for the first release, add it as a *pending* publisher, since the project does not exist on PyPI until something is published to it. +The distribution is `tlgr-cli` rather than `tlgr` because PyPI rejects the +shorter name as too similar to an unrelated `tlgrm`. It is only the name on +the index: the import package and the console script are both `tlgr`, and +nothing in the source refers to the distribution name. + Until that publisher exists the `publish` job fails and the GitHub release still succeeds, which is the intended order: the release is the artefact of record, PyPI is a distribution channel on top of it. diff --git a/README.md b/README.md index 6bd16a2..eb640c7 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,18 @@ Full Telegram account control from the terminal. Agent-friendly, daemon-based, with webhook event push. ``` -pipx install git+https://github.com/tlgrcli/tlgr.git +pipx install tlgr-cli ``` -tlgr is not published on PyPI, so `pip install tlgr` does not reach this -project. Install from the repository, or from the wheel attached to a -[release](https://github.com/tlgrcli/tlgr/releases). `pipx` is the -recommendation because tlgr runs a long-lived daemon and wants its own -environment; `pip install git+https://github.com/tlgrcli/tlgr.git` into a -virtualenv works the same way. +The command is `tlgr`; the distribution on PyPI is `tlgr-cli`, because the +shorter name was taken by an unrelated project. `pipx` is the recommendation +because tlgr runs a long-lived daemon and wants its own environment; +`pip install tlgr-cli` into a virtualenv works the same way. To track the +development tip instead, install from the repository: + +``` +pipx install git+https://github.com/tlgrcli/tlgr.git +``` > **For agents:** logging in is a sequence of ordinary commands — `tlgr auth send-code` then `tlgr auth verify-code` — so only *reading the code* needs a person. Secrets come from `--x-env`/`--x-stdin`/`--x-file`, never argv. See [AGENT.md](AGENT.md) for the full agent reference. diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index abf32b2..3f9464d 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -78,18 +78,24 @@ removed on the next start — but an *open file handle* is not. ## 2. Upgrade the install ```bash -pipx install --force git+https://github.com/tlgrcli/tlgr.git -tlgr --version # expect 2.0.0 +pipx install tlgr-cli +tlgr --version # expect 2.0.1 or later ``` -tlgr is not on PyPI, so `pipx upgrade tlgr` and `pip install -U tlgr` have -nothing to upgrade from: the install came from this repository and so does -the upgrade. `--force` because pipx will not reinstall over an existing -install otherwise. Into a virtualenv it is -`pip install -U 'tlgr @ git+https://github.com/tlgrcli/tlgr.git'`, and the -wheel attached to the [2.0.0 -release](https://github.com/tlgrcli/tlgr/releases/tag/v2.0.0) installs the -same build without git. +The distribution is named `tlgr-cli` on PyPI; the command it installs is +`tlgr`. **`pipx upgrade tlgr` does not work**, and neither does +`pip install -U tlgr`: a v1 install came from this repository, not from an +index, so there is no `tlgr` distribution for pipx to upgrade. Install the +new name, then remove the old install once you have checked it works: + +```bash +pipx uninstall tlgr # only after `tlgr --version` reports the new build +``` + +Both provide the same `tlgr` command, so do not leave the two installed +side by side. Into a virtualenv it is `pip install -U tlgr-cli`, and the +wheel attached to any [release](https://github.com/tlgrcli/tlgr/releases) +installs the same build without an index. ### A pipx editable install — the checkout *is* the install @@ -108,7 +114,7 @@ With the daemon stopped, move the checkout: git -C fetch git -C checkout main # or, on the deployed branch: git -C merge --ff-only origin/main -tlgr --version # expect 2.0.0 +tlgr --version # expect 2.0.1 or later ``` `--ff-only` on purpose: a merge commit in a deployment checkout is a local @@ -132,7 +138,7 @@ extra set rather than adding to it. Then check the imports resolve before starting anything: ```bash -tlgr --version # expect 2.0.0 +tlgr --version # expect 2.0.1 or later tlgr agent whoami --json # imports msgspec and Telethon; fails loudly if either is missing ``` diff --git a/pyproject.toml b/pyproject.toml index 28a7a2b..324efb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,10 @@ requires = ["setuptools>=61.0", "wheel"] build-backend = "setuptools.build_meta" [project] -name = "tlgr" +# The distribution name, which is not the import name and not the command. +# PyPI refuses "tlgr" as too similar to an existing "tlgrm"; the module stays +# `tlgr`, the console script stays `tlgr`, and only `pip install` differs. +name = "tlgr-cli" dynamic = ["version"] description = "Full Telegram account control CLI — agent-friendly, daemon-based, with webhook event push" readme = "README.md" diff --git a/tlgr/__init__.py b/tlgr/__init__.py index 23cba85..4ecd4ce 100644 --- a/tlgr/__init__.py +++ b/tlgr/__init__.py @@ -1,3 +1,3 @@ """tlgr — Full Telegram account control CLI.""" -__version__ = "2.0.0" +__version__ = "2.0.1"