This bot allows you to generate readable passwords directly from Telegram without necessity to open external utilities such as KeePass. An inspiration for this bot came from famous XKCD 936 strip.
Try it now: https://t.me/passgenbot
- Presets of different complexity;
- Ability to generate customized password;
- Inline mode with colored complexity;
- No personal data is collected!
- Basic multilanguage support (En+Ru), depending on
language_codefrom Bot API;
- Python 3.14+
- aiogram – Telegram Bot API framework;
- XKCD-password-generator – the library behind XKCD-style password generation
- uv
- Clone the repository and enter the project directory.
- Copy
settings.example.tomltosettings.tomland fill in the values:bot.token— your Telegram bot token from @BotFatherxkcd.wordfile— absolute path towords.txt(included in the repo)
- Install dependencies:
uv sync
uv run -m botFor a persistent deployment on a Linux server, a sample unit file is provided at passgenbot.example.service.
- Copy and edit the file:
cp passgenbot.example.service /etc/systemd/system/passgenbot.service
# Edit User=, WorkingDirectory=, and ExecStart= to match your setup
nano /etc/systemd/system/passgenbot.service- After the first
uv sync, the virtual environment is created at.venv/. SetExecStartto:
ExecStart=/path/to/passgenbot/.venv/bin/python -m bot
- Enable and start the service:
systemctl daemon-reload
systemctl enable --now passgenbotCheck status with systemctl status passgenbot and logs with journalctl -u passgenbot -f.
Use /generate to create a password. The bot replies with the password and an inline keyboard that lets you adjust it on the fly:
- − Word / + Word — decrease or increase the number of words (2 to 5);
- Show/Hide delimiters — toggle digit separators between words;
- Add/Remove edge — add or remove a delimiter at the beginning and end of the password;
- Regenerate — generate a new password with the same settings;
- Copy — copy the password to clipboard (Telegram native button);
- Delete — remove the message.
When the query is empty, descriptions show preset details; when it is not, the query itself is shown as the description.
You can also use this bot in inline mode. An indicator on the left shows rough password complexity (green is good, red is not).
The project uses pytest with uv as the package manager.
uv run pytest tests/Add -v for verbose output:
uv run pytest tests/ -vThis project uses Calendar Versioning with the following rules:
- Versions should look like
vAAAA.BB.C, where:vAAAAis the letter "v" followed by the 4-digit year of release, e.g.,v2026.BBis the 2-digit month number, e.g.,05for May.Cis the release number for that month, not zero-padded, e.g., 1 for the first release in May.
For example, the first release to use the new versioning schema is v2026.05.1.
This scheme makes it easier to understand which Bot API features might be supported in a given release and which are definitely not.


