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.0a4-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 ~/.musigate/.env by default. You can override this location with MUSIGATE_HOME.

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.0a4-py3-none-any.whl

开发模式安装:

pip install -e .[dev]

配置

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

musigate login

如果还没有 TELEGRAM_API_IDTELEGRAM_API_HASHmusigate 会直接提示你输入,并默认保存到 ~/.musigate/.env。如果你想改位置,也可以设置 MUSIGATE_HOME

如果你更喜欢手动配置,也可以自己写 .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.0a4.tar.gz (29.1 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.0a4-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: musigate-0.1.0a4.tar.gz
  • Upload date:
  • Size: 29.1 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.0a4.tar.gz
Algorithm Hash digest
SHA256 9416c970c20edef134746a1699e0da07fb40ce985234841976bfc74908456d59
MD5 6efa36947f3e234e2f38fc9f71c1e8cc
BLAKE2b-256 7cdff5413eb1872699dbf1f84cfb3758d5e25e1ec8796b166c7791ba8d896118

See more details on using hashes here.

File details

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

File metadata

  • Download URL: musigate-0.1.0a4-py3-none-any.whl
  • Upload date:
  • Size: 24.8 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.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 fff70de14739701abf47cc81168c4602ec1434eeb44b2792f09ec852ff01d5c2
MD5 c8220f836b1ddbc4529d45d6888b7970
BLAKE2b-256 e3d3a47c44a8e6ead4ed24b23387195384ba12a8e2f2bda8d55b26bc25a48054

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