Skip to main content

理音 TuneTidy

中文 | English

把网易云歌单按曲风拆成几个新歌单:先在本地生成整理结果,你调整并确认后,才在账号里新建歌单。

非官方项目,与网易云音乐及其运营方无关,也未获其授权。只读写你自己账号里的歌单信息,不下载音频。详见文末免责声明。

理音演示

30 秒上手

pipx install tunetidy
tunetidy ui

需要 Python 3.11 或更新的版本;没有 pipx 的话,用 uv tool install tunetidy 也一样。tunetidy ui 会在浏览器里打开理音(只监听本机),之后都在网页上完成:

  1. 用网易云 App 扫码登录。
  2. 选一个或几个歌单,点「开始整理」。第一次读取曲风比较慢,约每首 1.5 秒,之后有缓存。
  3. 看整理结果:换拆法、给新歌单改名、把分错的歌挪走。这些都只改本地,不动你的账号。
  4. 点「确认并开始建」,把启动理音的终端里显示的 6 位确认码输进网页,就会在你的账号里新建私密歌单。
  5. 不满意的话,在「历史」里撤销,同样要输确认码。

启动理音的终端窗口要一直开着,关掉它理音也会退出。

网页

没登录时先显示二维码,用网易云 App 扫码即可,登录态同样存进系统钥匙串;导航底部会显示当前账号,点它可以退出登录(只删本机保存的登录信息,整理记录保留;有任务在运行时要等它结束)。点「新整理」选要整理的歌单,默认是「我喜欢的音乐」;选几个歌单会按勾选的先后合并,重复的歌只算一次。读取时能看到进度、预计剩余时间和已经分出的曲风;关掉网页不影响读取,回到首页能接着看,也可以取消,已读到的曲风会保留。

首页每个歌单一张卡片;点进去能看到将要新建哪几个歌单、各多少首,可以切换拆法、给歌单改名、把分错的歌移到别的歌单,再把"没分好"的歌一首首选好去处。这些都只改本地的整理结果,不访问网易云。

确认后,网页会显示建歌单的进度;中途断了可以继续建,已加入的歌不会重复。「历史」里能看到每次建的歌单,撤销前会先检查这些歌单现在的样子,被你改过的只移除理音加的歌。对同一个歌单重新整理并建好后,如果上次用同一个账号建的那批还在,网页会问要不要撤销它;撤销要另外确认,不会自动发生。

同一个歌单整理过好几次时,旧的整理收在结果页右上角「以前的整理」里。没建歌单的旧整理不会自动删除,可以在那里点「现在清理」;只删这台电脑上的记录,建过歌单的会保留。

网页上会改动网易云账号的操作(建歌单、继续建、撤销)都要输入确认码;登录、退出登录、选歌单、读取、清理本机记录不改账号,不需要。确认码只显示在启动理音的终端窗口里,不经过网页。如果理音不是在终端窗口里启动的(比如被别的程序放到后台运行),网页确认不可用,页面会改为给出终端命令。

命令行

不想用网页的话,每一步也都有对应的命令:

tunetidy login                      # 用网易云 App 扫码登录,登录态存进系统钥匙串
tunetidy playlists                  # 看看有哪些歌单
tunetidy analyze "我喜欢的音乐"       # 读取曲风、生成整理(不改账号;首次约每首 1.5 秒,之后有缓存)
tunetidy approve <整理id>            # 你本人在终端确认(要输入屏幕上显示的确认码)
tunetidy apply <整理id>              # 新建私密歌单并加歌;中断后再运行即续传
tunetidy undo <整理id或运行id>        # 撤销:只删理音新建、你没改过的歌单;你改过的只移除理音加进去的歌

命令行生成的整理,同样可以在 tunetidy ui 里查看和修改。

拆法

默认按大类(一级曲风)拆。analyze 可以换拆法,标签已缓存时几秒出结果;在网页里也能随时切换:

tunetidy analyze "我喜欢的音乐" --only 流行               # 只分出流行,其余放进「其他」
tunetidy analyze "我喜欢的音乐" --only 流行 --match any   # 带流行标签的都算
tunetidy analyze "我喜欢的音乐" --level 2                 # 按细类(二级曲风)
tunetidy analyze "我喜欢的音乐" --top 5                   # 最多建 5 个歌单(不算「其他」)
tunetidy analyze "我喜欢的音乐" --groups my.toml --no-other  # 自己定怎么分,不建「其他」

自定义分组的写法见 taxonomies/examples/。网页里"自己定怎么分"可以导入、导出同样格式的文件。

在 Claude Code、Codex 里用(MCP)

理音自带 MCP 服务,AI 助手可以帮你列歌单、生成整理、查看明细,并在你确认后建歌单:

claude mcp add tunetidy -- tunetidy mcp     # Claude Code

Codex 在 ~/.codex/config.toml 里加:

[mcp_servers.tunetidy]
command = "tunetidy"
args = ["mcp"]

五个工具:list_playlists、create_plan、get_job_status、get_plan_items、apply_plan。分析和建歌单都在后台运行,工具立即返回任务 id,再用 get_job_status 查进度。MCP 里没有确认工具:确认只能由你本人在终端运行 tunetidy approve,apply_plan 只接受你确认过、之后内容没变的整理。

效果

作者自己的"我喜欢的音乐"(1033 首,2026-10-31),默认拆法(按大类):

歌曲数 没分好
全部 1033 2.7%
网易云给了曲风标签的 1026(99.3%) 2.1%
没有曲风标签的 7 85.7%

"没分好"的歌不会放进新歌单,可以在网页里一首首选好去处。人工改动比例要等更多人用过才有意义,暂不列出。这些数字只来自一个歌单,你的歌单可能不同;用 uv run python scripts/evaluate.py <整理id> 可以算自己的。

安全约定

  • 只新建歌单,绝不修改或删除你原有的歌单。新歌单默认私密。
  • 确认和撤销都要由你本人输入确认码:命令行的 approve、apply(包括 --yes)、undo 只能在交互式终端里运行;网页上的确认码只显示在启动理音的终端里。如果你使用 Claude Code、Codex 等 AI 助手,请不要在它们的权限设置里自动放行这几个命令,也不要把确认码告诉它们。
  • 网页确认输错太多次会暂停 10 分钟(重启理音也会恢复)。
  • 整理在确认后有任何改动,确认即作废;已建好的整理不能再建第二次。
  • 访问网易云带随机间隔限速,限速只读配置文件,任何命令或 MCP 工具都没有提速参数。默认直连,不使用系统代理。
  • 登录凭据存在系统钥匙串里;日志和报错信息里不打印凭据。网页服务只监听 127.0.0.1,并校验随机口令。

常见问题

第一次分析为什么这么慢? 网易云的曲风标签要逐首读取,为了不被限制,理音会放慢速度,1000 首约 25 分钟。读过的标签会缓存,之后换拆法、重新分析都只要几秒。

读取时可以关掉网页吗? 可以。只要启动理音的终端窗口还开着,读取会在后台继续,回到首页就能看到进度。

"没分好"是什么? 网易云没给这首歌标曲风,或者几个曲风一样多、分不出主次。不处理的话它们不会放进新歌单;可以在网页的"没分好的歌"里一首首选好去处。

AI 助手能替我确认吗? 不能。确认码只显示在启动理音的终端里,网页、接口和日志里都没有;MCP 里也没有确认工具。助手只能执行你已经确认过的整理。

怎么撤销? 在网页的「历史」里点"撤销",或者在终端运行 tunetidy undo <整理id或运行id>。

免责声明

  • 本项目是个人开源项目,与网易云音乐及其运营方没有任何关系。
  • 理音通过网易云网页版使用的非公开接口访问你的账号。这些接口随时可能变化或失效,使用它们可能违反平台的服务条款,账号因此受到限制的风险由使用者自行承担。
  • 理音只读写你自己账号里的歌单信息(歌单名、简介、歌曲列表),不下载、不分发任何音频。
  • 软件按"现状"提供,不提供任何担保,详见 LICENSE。

开发

这一节写给想改理音代码的人,只是使用的话不用看。

从源码使用时,命令要通过 uv run 运行(如 uv run tunetidy playlists),或者先用 uv tool install --editable . 把源码装成全局命令。

uv sync
uv run ruff format . && uv run ruff check .
uv run mypy src
uv run pytest                               # 离线测试,不访问网络,钥匙串用测试专用的假实现
uv run pytest -m live                       # 只读的真实接口测试,需要先登录

前端在 web/(React + TypeScript + Vite + Tailwind),构建产物不提交。从源码运行 tunetidy ui 前先构建一次:

cd web && npm ci && npm run build            # 输出到 src/tunetidy/server/static/

改前端时可以用 npm run dev(另开终端运行 uv run tunetidy ui --no-browser,再用它打印的口令打开 http://localhost:5173/#token=...)。代码结构和关键设计见 docs/ARCHITECTURE.md。

Metadata

Release files for tunetidy 1.1.0

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

Source distribution (sdist)

Source distribution for tunetidy 1.1.0
File Size Uploaded Provenance Actions
tunetidy-1.1.0.tar.gz 510.1 kB With provenance Details for tunetidy-1.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 732.9 kB

Release files / tunetidy-1.1.0.tar.gz

Download URL tunetidy-1.1.0.tar.gz
Size 510.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dd1921b1701e8873c8fd83bfccda4d164475b06848480f19c047a582cb2e7df7
BLAKE2b-256 checksum
How to use checksums
ef4b8cfdea7851ba7116dee1fd8e652969d189aca0048db6c108bcecf46397a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / tunetidy-1.1.0-py3-none-any.whl

Download URL tunetidy-1.1.0-py3-none-any.whl
Size 222.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1892eca3231e3f832b387105ffdb6480f31c649de672e21fe03bfe74ac58d1f5
BLAKE2b-256 checksum
How to use checksums
a748969e012cfd9c6ef04bf50393dbcf5c863588eeb4493639b88a79584e54bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for tunetidy 1.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tunetidy-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

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