Skip to main content

blp — Official Bots.LT CLI

Sync your Telegram bot commands like Git.

pip install botslt

Quick Start

# 1. Save your API key (from Settings → Security on bots.lt)
blp login

# 2. Create a project in your bot's folder
mkdir my-bot && cd my-bot
blp init

# 3. Map your commands to .py files
blp add /start start.py
blp add /help  help.py
blp add @       at_handler.py

# 4. Write your code, then push!
blp push

How it Works

Your project folder will look like this:

my-telegram-bot/
├── blp.json        ← Bot ID + command mappings (safe to commit to Git)
├── botslt.lock        ← Hash cache for change detection (Git-ignored)
├── start.py           ← Code for /start command
├── help.py            ← Code for /help command
└── at_handler.py      ← Code for @ (global) handler

Your API key is stored globally in ~/.botslt/credentials.json — never in the project folder, so it's never accidentally committed to Git.


Commands

Command Description
blp login Save your API key
blp logout Remove saved credentials
blp init Create blp.json in current folder
blp add /cmd file.py Map a command to a local file
blp push Push changed commands to server
blp push file.py Push a specific file
blp push --all Push all commands (ignore change detection)
blp pull Pull all server commands to local files
blp status Show which files have changed
blp logs Show recent bot error logs
blp bots List all your bots
blp commands [bot_id] List all commands for a bot
blp view <cmd> [bot_id] View the code of a specific command
blp rename <old> <new> [bot_id] Rename a command on the server
blp delete <cmd> [bot_id] Delete a command from the server
blp start [bot_id] Start a bot (ID is optional if in project)
blp stop [bot_id] Stop a bot (ID is optional if in project)
blp docs Update AI context (AGENTS.md) locally

💡 Tip: You can run blp <command> --help at any time to see detailed usage, options, and examples for that specific command. (e.g., blp rename --help)


Managing Commands from CLI

You can fetch, view, rename, and delete your commands directly from the CLI. Like start and stop, these commands are smart enough to know which bot to target based on your context:

# 1. Inside a project folder (uses bot_id from blp.json)
blp commands
blp view /start
blp rename /old_cmd /new_cmd
blp delete /test_callback

# 2. Outside a project folder (prompts for Bot ID automatically)
blp view /start

# 3. Pass Bot ID explicitly to override
blp rename /old_cmd /new_cmd 12345678
blp delete /test_callback 12345678

Note: If you run blp rename or blp delete inside a project folder, the CLI will automatically update your local blp.json mapping so your next blp push or blp pull works flawlessly!


Starting and Stopping Bots

You can start and stop your bots directly from the CLI using the exact same context rules:

blp start
blp stop
blp start 12345678

Example blp.json (with Aliases)

{
    "bot_id": "12345678",
    "commands": {
        "/start": {
            "file": "start.py",
            "aliases": ["/menu"]
        },
        "/help": "help.py",
        "/balance": {
            "file": "balance.py",
            "aliases": ["/bal", "Balance"]
        },
        "@": "at_handler.py",
        "*": "fallback.py"
    }
}

Example Bot Command (start.py)

bot.sendMessage(
    text=f"<b>Welcome, {user.first_name}!</b>\n\nHow can I help you?",
    parse_mode="html",
    reply_markup={
        "keyboard": [
            [{"text": "💰 Balance"}],
            [{"text": "❓ Help"}]
        ],
        "resize_keyboard": True
    }
)

.gitignore

blp init automatically adds botslt.lock to your .gitignore:

# BotsLT
botslt.lock

Never commit ~/.botslt/credentials.json — it contains your API key.


Metadata

Release files for botslt 1.1.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for botslt 1.1.17
File Size Uploaded Provenance Actions
botslt-1.1.17.tar.gz 14.0 kB Without provenance Details for botslt-1.1.17.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for botslt 1.1.17
File Interpreter ABI Platform Actions
botslt-1.1.17-py3-none-any.whl Python 3 none any Details for botslt-1.1.17-py3-none-any.whl

Total release size: 27.7 kB

Release files / botslt-1.1.17.tar.gz

Download URL botslt-1.1.17.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
458288ef5c95f303a2133315cbcbc7b8f6c37dccc76b06a00353d3c0f6e40ea4
BLAKE2b-256 checksum
How to use checksums
4d90d060132e6b9f5f6eebb4a6018726ca36d164052c1bacbb729e1a7baf4fd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / botslt-1.1.17-py3-none-any.whl

Download URL botslt-1.1.17-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7defc4193410deb99c48042af828c4e22cccb255b6adc606746c0f3385556d46
BLAKE2b-256 checksum
How to use checksums
30337801fc0f90f27976bb298f5e81be82603af3435b962c0422a33b62039bc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for botslt 1.1.17

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page