Skip to main content

YAML-driven Telegram Bot orchestration engine for automated interactions

Project description

musigate

English | 中文

English

musigate is a Python CLI for searching and downloading music through Telegram bots with a YAML-driven adapter system.

This release is an alpha build. The core CLI flow is working, but bot behavior still depends on upstream Telegram bots and may change over time.

Install

From a published package:

pip install musigate

From a local wheel:

pip install dist/musigate-0.1.0a3-py3-none-any.whl

For development:

pip install -e .[dev]

Setup

The easiest setup flow is to run:

musigate login

If TELEGRAM_API_ID or TELEGRAM_API_HASH is missing, musigate will prompt for them and save them to .env in your current directory by default.

You can still configure credentials manually with .env if you prefer. Required values:

  • TELEGRAM_API_ID
  • TELEGRAM_API_HASH

Built-in Bots

  • music163
  • music_v1

Agent Skills

The repository now includes a local skills directory for agent ecosystems such as Codex or OpenClaw.

Current skills:

Usage

Login to Telegram:

musigate login

Search only:

musigate search "Numb" --bot music163

Download with smart matching:

musigate download "Numb" --bot music163

Download a specific numbered search result:

musigate download "海底" --bot music_v1 --pick 2

Write files to a custom directory:

musigate download "海底" --bot music_v1 --pick 2 --output ./downloads/favorites

Machine-readable JSON output:

musigate search "Numb" --bot music163 --json
musigate download "Numb" --bot music163 --json
musigate list-bots --json

Normal CLI downloads show periodic progress updates including speed and ETA.

中文

musigate 是一个 Python 命令行工具,用来通过 Telegram 机器人搜索和下载音乐,核心采用 YAML 驱动的适配器架构。

当前版本是 alpha 初版。CLI 主流程已经可用,但具体机器人的行为仍依赖上游 Telegram 机器人,后续可能会变化。

安装

从已发布的包安装:

pip install musigate

从本地 wheel 安装:

pip install dist/musigate-0.1.0a3-py3-none-any.whl

开发模式安装:

pip install -e .[dev]

配置

最省事的方式是直接运行:

musigate login

如果当前目录还没有 TELEGRAM_API_IDTELEGRAM_API_HASHmusigate 会直接提示你输入,并默认保存到当前目录的 .env

如果你更喜欢手动配置,也可以自己写 .env。必填项:

  • TELEGRAM_API_ID
  • TELEGRAM_API_HASH

内置 Bot

  • music163
  • music_v1

智能体 Skills

仓库根目录新增了一个本地 skills 目录,方便 Codex、OpenClaw 这类智能体快速接入。

当前提供:

使用方式

登录 Telegram:

musigate login

仅搜索,不下载:

musigate search "Numb" --bot music163

按智能匹配下载:

musigate download "Numb" --bot music163

按搜索结果编号精确下载:

musigate download "海底" --bot music_v1 --pick 2

下载到自定义目录:

musigate download "海底" --bot music_v1 --pick 2 --output ./downloads/favorites

输出机器可读 JSON:

musigate search "Numb" --bot music163 --json
musigate download "Numb" --bot music163 --json
musigate list-bots --json

普通 CLI 下载模式会定期显示进度、速度和预计剩余时间。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

musigate-0.1.0a3.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

musigate-0.1.0a3-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file musigate-0.1.0a3.tar.gz.

File metadata

  • Download URL: musigate-0.1.0a3.tar.gz
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for musigate-0.1.0a3.tar.gz
Algorithm Hash digest
SHA256 338d19efcd0c9141c98e6ef157fb8555bf877ab1c9886c667a6026e8522c86d2
MD5 f695a66a74a92d9e07f228a3252bbe9a
BLAKE2b-256 6227ff096bb469408fd349e821eaa22f21e118b3486c5ffa1172d28e8b92682e

See more details on using hashes here.

File details

Details for the file musigate-0.1.0a3-py3-none-any.whl.

File metadata

  • Download URL: musigate-0.1.0a3-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for musigate-0.1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 4617fee7ff654ba709ac7f9103ce14974ebaf5f3afa6c297e3557a80e18be799
MD5 fa499d315c91484a339c6d420b1b081b
BLAKE2b-256 9e69eb62caf6a783480507de9ddaf6b3de13974d4e73e01889365edfde4ae598

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page