[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109321":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":13,"lastSyncTime":29,"discoverSource":30},109321,"mygo-music","egoist\u002Fmygo-music","egoist","A native music player you extend with plugins",null,"Go",1534,256,2,110,0,12,119,862,50,105.21,"GNU Affero General Public License v3.0",false,"main",[],"2026-11-14 11:18:04","2026-11-23 16:10:56","# MyGo Music\n\nA native desktop music player written in Go with [MyGo](https:\u002F\u002Fgithub.com\u002Fegoist\u002Fmygo), no WebView. It plays your local files out of the box, and everything else comes from plugins.\n\n## Features\n\n- Local files (MP3, FLAC, Ogg Vorbis, WAV, and ALAC, FLAC or AAC in .m4a and .aac) with tags, covers and `.lrc` lyrics\n- Playlists, liked songs, search, albums and artists\n- Now Playing with lyric stage styles, cover wall, queue, shuffle and repeat\n- Notch player on macOS, tray, media keys\n- Audio cache, fades on pause and seek, loudness normalization\n- Session restore\n- Podcast captions, written down on the device as episodes play\n- English and Simplified Chinese\n- Plugins can add accounts, catalogs, podcasts, stations, comments and pages of their own\n\n## Build\n\n```bash\ngo tool mygo dev     # run in development\ngo tool mygo build   # package into build\u002F\ngo test .\u002Finternal\u002F...\n```\n\n## Podcast captions\n\nEpisodes are written down on the device as they play, with [sherpa-onnx](https:\u002F\u002Fgithub.com\u002Fk2-fsa\u002Fsherpa-onnx) and Qwen3-ASR, which the app downloads when the listener asks for them. The libraries come from this repository's `sherpa-onnx-\u003Cversion>` prerelease, which only changes with that version:\n\n```bash\ngo run .\u002Fscripts\u002Fsherpa -sign \"Developer ID Application: …\"\ngh release create sherpa-onnx-2.0.1 --prerelease --latest=false build\u002Fsherpa\u002F*\n```\n\n## Plugins\n\nA plugin is a folder in the app's `plugins` directory (Settings > Plugins > + > Show Plugins Folder) with a `plugin.json` and one JavaScript or TypeScript file. Install one with the + in Settings > Plugins from GitHub, by its repository or its address, or from its folder or a zip of it on this computer, or drop the folder in by hand. Remove one from its ⋯ menu there. There's nothing to build, and the same plugin runs on every platform. [`examples\u002Fdemo-plugin`](examples\u002Fdemo-plugin) does everything a plugin can with made-up data: copy it to start.\n\n```json\n{\n  \"id\": \"example\",\n  \"name\": \"Example\",\n  \"version\": \"1.0.0\",\n  \"minAppVersion\": \"0.1.8\",\n  \"main\": \"index.js\",\n  \"playback\": \"stream\",\n  \"permissions\": { \"network\": [\"api.example.com\"] },\n  \"settings\": [{ \"key\": \"apiKey\", \"label\": \"API Key\", \"help\": \"From your account page\", \"link\": \"https:\u002F\u002Fexample.com\u002Fkeys\" }],\n  \"navigation\": [\n    { \"builtin\": \"home\" },\n    { \"title\": \"Charts\", \"page\": \"charts\", \"icon\": \"chart\" },\n    { \"title\": \"Stations\", \"builtin\": \"stations\" }\n  ]\n}\n```\n\n```js\nexport async function search({ query, kind, offset }) {\n  const res = await fetch(`https:\u002F\u002Fapi.example.com\u002Fsearch?q=${encodeURIComponent(query)}&type=${kind}&offset=${offset}`, {\n    headers: { authorization: `Bearer ${host.setting(\"apiKey\")}` },\n  });\n  return { tracks: (await res.json()).items.map(toTrack), more: false };\n}\n\nexport function stream({ id, quality }) {\n  return { url: `https:\u002F\u002Fapi.example.com\u002Faudio\u002F${id}.mp3`, type: \"mp3\" };\n}\n```\n\nExport a function for each thing the plugin does. Each takes one object of parameters and returns a value or a promise. What it doesn't export, the app leaves out of its pages.\n\n| Export | Parameters | Returns |\n| --- | --- | --- |\n| `signIn`, `signOut`, `account` | | `{id, name, imageUrl, page}`; `account` returns `null` when signed out. `page` is a `browse` page of the listener's own, which the account menu opens as My Page |\n| `setSetting` | `{key, value}` | |\n| `home` | | `Browse` |\n| `browse` | `{page}` | `Browse` |\n| `search` | `{query, kind, offset}`, where `kind` is `tracks`, `albums`, `artists`, `playlists` or `shows` | `{tracks or albums or ..., more}` |\n| `suggest` | `{query}` | `[string]` |\n| `recent` | | `[Track]` |\n| `played` | `{id}` | |\n| `liked` | `{offset}` | `{tracks, more}` |\n| `isLiked` | `{ids}` | `{id: bool}` |\n| `like`, `likeEpisode` | `{id, on}` | `like` likes a song, and `likeEpisode` an episode: without it, episodes show no heart |\n| `album` | `{id}` | `{album, tracks}` |\n| `artist` | `{id}` | `{artist, tracks, albums}` |\n| `saveAlbum`, `followArtist`, `savePlaylist`, `subscribeShow` | `{id, on}` | |\n| `savedAlbums` | `{offset}` | `{albums, more}` |\n| `playlists` | | `[Playlist]` |\n| `playlist` | `{id}` | `Playlist` with `tracks` |\n| `createPlaylist` | `{name}` | `Playlist` |\n| `renamePlaylist` | `{id, name}` | |\n| `deletePlaylist` | `{id}` | |\n| `addToPlaylist`, `removeFromPlaylist` | `{id, trackIds}` | |\n| `movePlaylistTrack` | `{id, from, to}` | |\n| `shows` | | `[Show]` |\n| `show` | `{id, offset}` | `{show, episodes, more}` |\n| `stations` | | `[Station]` |\n| `stationNext` | `{id}` | `[Track]` |\n| `comments` | `{trackId, offset}` | `{comments, total, more}` |\n| `likeComment` | `{trackId, commentId, on}` | |\n| `postComment` | `{trackId, text}` | `Comment` |\n| `lyrics` | `{id}` | `{lrc, translation}`, or `{lines}` with timed `words` |\n| `stream` | `{id, quality}` | `{url, type, headers, size, gain, peak}`, where `type` is `mp3`, `flac`, `ogg`, `wav`, `m4a` (ALAC, FLAC or AAC-LC, whole or in fragments as a DASH stream serves it) or `aac` (AAC-LC in ADTS) |\n| `remotePlay` | `{ids, start, position}` | |\n| `remotePause`, `remoteResume` | | |\n| `remoteSeek` | `{position}` | |\n| `remoteVolume` | `{percent}` | |\n| `remoteState` | | `{playing, trackId, position, duration, volume, device}` or `null` |\n| `remoteDevices` | | `[{id, name, active}]` |\n| `remoteUse` | `{deviceId}` | |\n\nThe shapes are in [`internal\u002Fmusic\u002Fmusic.go`](internal\u002Fmusic\u002Fmusic.go) by their JSON names. Times are in milliseconds. A `Browse` is `{title, subtitle, imageUrl, description, sections}`: with an `imageUrl`, such as a listener's avatar, it's headed round, as an artist's page is, and `description` goes under the title a line to each line. A section can hold `tracks`, `albums`, `artists`, `playlists`, `shows`, `stations`, `links` (`{title, subtitle, imageUrl, page}`), a `morePage`, and `empty`, what it says while it holds nothing. A source's first section of `tracks` leads its Home as a card of the day's songs, which opens a page of all of them, headed by the section's `pageTitle` if it has one, else its `title`, and its `subtitle` after the count of songs. A show's `publisherPage` is a `browse` page of who publishes it, which their name on the show's page opens.\n\nAn `imageUrl` can say where its size goes, with `{size}`, for an image server that makes pictures the size asked: `https:\u002F\u002Fimg.example.com\u002Fcover.jpg?param={size}y{size}` or `https:\u002F\u002Fimg.example.com\u002F{size}\u002Fcover.jpg`. The app fills in how many pixels across it shows the picture at, 40 in a row and 600 in Now Playing, or 600 where nothing asks for a size. `%7Bsize%7D`, as JavaScript's `URL` writes it in a query, counts too. An app older than 0.1.20 fetches `{size}` as it is, so a plugin that gives it wants a `minAppVersion` of 0.1.20. Without it, give pictures at about 800 pixels if the service can, rather than as large as they were made: the app fetches and decodes the whole of each, a few megabytes for one thousands of pixels across, to show it in a row.\n\nOf the `playlists`, those with `mine` are the listener's own, listed under My Playlists, and the rest are ones they saved. One that is `mine` and also `fixed`, such as the songs they liked, is kept by the source itself: the app doesn't offer to rename it, delete it, add songs to it, take them out or move them.\n\n`navigation` is the plugin's sidebar, in its order. An entry opens a `browse` page of its own by `page`, or one of the app's by `builtin`: `home`, `liked`, `savedAlbums`, `stations` or `shows`, which can be given a `title`. Without `navigation`, the sidebar has an entry for each of the app's pages the plugin can do. Up to four stations show as a switch over one card, and more as a grid.\n\n`minAppVersion` is the oldest version of MyGo Music the plugin works with. An older one won't install it, and says to update first. Versions before 0.1.8 don't read it.\n\n### Translating a plugin\n\nPut the translations in `locales\u002F\u003Clanguage>.json` next to `plugin.json`: `locales\u002Fzh-CN.json` for Simplified Chinese, the language the app speaks besides English. Each one maps the English text to the translation:\n\n```json\n{ \"Example\": \"示例\", \"API Key\": \"API 密钥\", \"From your account page\": \"在你的账号页面获取\", \"Charts\": \"排行榜\" }\n```\n\nThe app translates the plugin's `name`, its settings' `label` and `help` and its `navigation` titles with them. For what the plugin says itself, such as a page's titles or an error's message, `host.t(text)` answers the translation, or `text` when there's none, and `host.language()` the listener's language, `en` or `zh-CN`. Both follow the listener as they change it, and the page they're on loads again.\n\nWith `\"playback\": \"stream\"`, the app plays what `stream` answers. With `\"playback\": \"remote\"`, the plugin makes the sound itself, or has another program do so, and the app calls the `remote` functions and polls `remoteState`.\n\nThrow an error with a `code` to say what's wrong: `signIn` prompts the listener to sign in, `setup` sends them to the plugin's settings, `unavailable` means this can't be played, and `unsupported` means the plugin doesn't do this. Any other error shows its message.\n\n### Publishing a plugin\n\nPut it in a public GitHub repository, with `plugin.json` at the top. The app takes the latest release: a `.zip` asset named for the platform, such as `plugin-darwin-arm64.zip`, or one named for none, or else the source. Without a release it takes the latest commit of the default branch. A new tag or commit is a new version, which shows as an update in the settings. An update asking for more permissions asks the listener again.\n\nAdd the topic `mygo-music-plugin` to the repository to have it listed on the [plugins page](https:\u002F\u002Fmygo-music.egoist.dev\u002Fplugins).\n\nLink to `mygo-music:\u002F\u002Finstall-plugin?repo=owner\u002Frepo` for an install button: it opens the app, which downloads the plugin and asks the listener before installing it. The development app (`mygo dev`) answers `mygo-music-dev:\u002F\u002F` instead.\n\n### What a plugin can reach\n\nA plugin has the JavaScript standard library, timers, `fetch` and its relatives, `URL`, `console` and `host`:\n\n| | |\n| --- | --- |\n| `host.platform`, `host.arch` | such as `darwin`, `arm64` |\n| `host.dir`, `host.dataDir` | the plugin's folder, and one for its data |\n| `host.storage.get(key)`, `.set(key, value)`, `.remove(key)` | JSON values that outlive the app |\n| `host.setting(key)` | what the listener filled in |\n| `host.t(text)`, `host.language()` | the text in the listener's language, from the plugin's `locales`, and that language: `en` or `zh-CN` |\n| `host.removeDataDir(name)` | removes a folder inside `host.dataDir` |\n| `host.crypto.md5(text)` | its hash, in hex |\n| `host.crypto.aesEcbEncrypt(key, text)` | AES-ECB with PKCS#7 padding, in hex, for services whose requests are made that way |\n| `host.openURL(url)` | opens a web page in the listener's browser |\n| `host.signInPrompt({qr, text})` | what the sign-in window shows while `signIn` goes on: a QR code to scan, and what to do |\n| `host.waitForRedirect({port, path, timeout, page})` | the end of a browser sign-in: listens on `127.0.0.1` and answers the query it's redirected back with. Needs the network permission |\n| `host.webSignIn({url, cookiesOf, until, userAgent})` | a sign-in on the service's own page, for one that has no other way in: the app shows `url` in a window of its own, apart from every other page and forgotten after, and once the cookies named in `until` are all there, closes it and answers `{cookie}`, the Cookie header a request to `cookiesOf` would send. `cookiesOf` has to be a host the network permission reaches. `userAgent` is what the page is told it's shown in |\n| `host.spawn(command, args)` | starts a program, by a path from the plugin's folder or absolute, or a name on `PATH`. Needs the process permission to name it. Returns `{pid, write(text), closeStdin(), readLine(), wait(), kill(), errorOutput()}` |\n\nEverything else takes a permission in `plugin.json`:\n\n- `\"network\": [\"api.example.com\", \"*.example.com\"]` lists the hosts `fetch` can reach, or `[\"*\"]` for any. Without it, `fetch` reaches nothing.\n- `\"requestHeaders\"` are headers the app sends with what it fetches itself for the plugin, its pictures (`image`) and its songs' audio (`audio`), for a service that keeps those behind its session as well as its API:\n\n  ```json\n  \"requestHeaders\": [\n    { \"hosts\": [\"{setting:server}\"], \"kinds\": [\"image\", \"audio\"], \"headers\": { \"cookie\": \"music-token={storage:token}\" } },\n    { \"hosts\": [\"img.example.com\"], \"kinds\": [\"image\"], \"headers\": { \"referer\": \"https:\u002F\u002Fexample.com\u002F\" } }\n  ]\n  ```\n\n  `hosts` are hosts or `*.domain`, which the network permission has to reach, or `{setting:key}`, the host of the server a setting names, such as `https:\u002F\u002Fnas.local:5666`, while the network permission reaches it. `*` isn't one. Without `kinds`, they go with both. In `headers`, `{setting:key}` is what the listener filled in and `{storage:key}` what the plugin keeps with `host.storage`, as each is when the request goes out: a token the plugin stores anew goes with the next one, and none is kept in a URL. A header whose value isn't there yet, as before signing in, is left out. The headers a `stream` answers come first. Neither goes on to another host a request is redirected to.\n- `\"process\": [\"bin\u002Fhelper-*\", \"ffmpeg\"]` lists the programs `host.spawn` can start, for what JavaScript can't do: a path from the plugin's folder or absolute, or a name looked up on `PATH`. A path only matches a path and a name only a name, and `*` matches within one folder, as in a glob. `[\"*\"]`, or `true`, asks for any program, which the listener is warned about. The listener has to allow it in Settings first, as a program can do anything they can. Programs end when the plugin does, and once allowed, `fetch` can reach this machine too, to talk to them. Ship one binary per platform and pick it with `host.platform` and `host.arch`.\n\n## Credits\n\n- [folia-major](https:\u002F\u002Fgithub.com\u002Fchthollyphile\u002Ffolia-major): the lyric stage animations\n\n## License\n\nAGPL-3.0. See [LICENSE](LICENSE).\n","MyGo Music 是一款基于 Go 语言开发的轻量级原生桌面音乐播放器，不依赖 WebView，通过插件机制扩展功能。核心支持本地音频文件（MP3、FLAC、AAC 等）播放，含标签、专辑封面、LRC 歌词、播放列表、智能队列、音量归一化与会话恢复；独有播客语音转写功能，集成 sherpa-onnx 和 Qwen3-ASR 在设备端实时生成字幕。插件系统采用 JS\u002FTS 编写，支持跨平台运行，可动态添加账号、曲库、播客、电台及自定义页面。适用于注重隐私、偏好本地化处理、需高度可定制化音乐体验的桌面用户，尤其适合开发者或技术型音乐爱好者构建专属音频工作流。","2026-11-24 04:36:29","CREATED_QUERY"]