Giter VIP home page Giter VIP logo

itsharex / go-musicfox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from go-musicfox/go-musicfox

0.0 0.0 0.0 25.2 MB

go-musicfox是用Go写的又一款网易云音乐命令行客户端,支持UnblockNeteaseMusic、各种音质级别、lastfm、MPRIS、MacOS交互响应(睡眠暂停、蓝牙耳机连接断开响应、菜单栏控制等)...

License: MIT License

Shell 1.02% Go 97.40% Makefile 0.50% Rich Text Format 0.11% Smarty 0.29% Nix 0.66%

go-musicfox's Introduction

go-musicfox

go-musicfox 是用 Go 写的又一款网易云音乐命令行客户端,支持各种音质级别、UnblockNeteaseMusic、Last.fm、MPRIS 和 macOS 交互响应(睡眠暂停、蓝牙耳机连接断开响应和菜单栏控制等)等功能特性。

UI 基于 charmbracelet/bubbletea 进行了部分定制

GitHub repo size GitHub Last Tag GitHub last commit GitHub All Releases

GitHub stars GitHub forks

logo

(The icon is based on kitty-icon)


预览

1. 启动

启动界面

2. 主界面

主界面

3. 通知

通知

4. 登录

登录界面

5. 搜索

搜索界面

6. Last.fm 授权

lastfm

7. macOS NowPlaying

NowPlaying

8. UnblockNeteaseMusic

UNM

9. macOS 歌词显示

LyricsX

需要满足以下条件:

  1. go-musicfox >= v3.7.7
  2. 下载和安装 LyricsX 的 go-musicfox 的 fork 版本
  3. 在 LyricsX 设置中,打开使用系统正在播放的应用

安装

macOS

1. 通过 Homebrew 安装

$ brew install anhoder/go-musicfox/go-musicfox

如果你之前安装过 musicfox,需要使用下列命令重新链接:

$ brew unlink musicfox && brew link --overwrite go-musicfox

2. 直接下载

Release 下载 macOS 的可执行文件。

Linux

1. 使用发行版软件包(推荐)

Arch Linux
AUR 安装
$ paru -S go-musicfox # 下载源代码编译安装
$ paru -S go-musicfox-bin # 下载安装预编译好的二进制
archlinuxcn 安装

首先添加 archlinuxcn 仓库到系统

# pacman -S go-musicfox
Gentoo Linux
$ eselect repository enable gentoo-zh
$ emerge --sync
$ emerge -a media-sound/go-musicfox
NixOS
1. flake support 下面是一个在nixos配置中使用它的例子
{
  description = "My configuration";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    go-musicfox.url = "github:go-musicfox/go-musicfox";
  };

  outputs = { nixpkgs, go-musicfox, ... }:
    {
      nixosConfigurations = {
        hostname = nixpkgs.lib.nixosSystem
          {
            system = "x86_64-linux";
            modules = [
              {
                nixpkgs.overlays = [ go-musicfox.overlays.default ];
                environment.systemPackages = with pkgs;[
                  go-musicfox
                ];
              }
            ];
          };
      };
    };
}

临时运行:

$ nix run github:go-musicfox/go-musicfox
2. 配置 configuration.nix 或使用 Home Manager(推荐)
# configuration.nix
environment.systemPackages = [
  pkgs.go-musicfox
];

# home manager
home.packages = [
  pkgs.go-musicfox
];
3. 从 Nixpkgs 安装 安装到本地 profile:
$ nix-env -iA nixos.go-musicfox

临时安装:

$ nix-shell -p go-musicfox
Void Linux

void-packages-zh 安装。

2. 通过 Homebrew 安装

$ brew install anhoder/go-musicfox/go-musicfox

如果你之前安装过 musicfox,需要使用下列命令重新链接:

$ brew unlink musicfox && brew link --overwrite go-musicfox

3. 直接下载

Release 下载 Linux 的可执行文件。

Windows

1. 通过 scoop 安装

scoop bucket add go-musicfox https://github.com/go-musicfox/go-musicfox.git

scoop install go-musicfox

2. 直接下载

Release 下载 Windows 的可执行文件。

手动编译

需要 Go v1.13 及以上版本

$ git clone https://github.com/go-musicfox/go-musicfox

$ go mod download

# Linux 编译前需要安装 flac

$ make # 编译到 bin 目录下
$ make install # 安装到 $GOPATH/bin下

使用

$ musicfox

注意事项

  • 请务必使用等宽字体,或将配置项 doubleColumn 设为 false,否则双列显示排版可能会混乱

  • 如果在使用时出现莫名奇妙的光标移动、切歌或暂停等现象,请将配置项 enableMouseEvent 设置为 false

  • 本应用不对 macOS 原生终端和 Windows 的命令提示符(CMD)做兼容处理(#99

macOS 用户推荐使用 iTerm2Kitty

Linux 用户推荐使用 Kitty

Windows 用户推荐使用 Windows Terminal,使用体验更佳

快捷键

按键 作用 备注
h/H/← (左方向)
l/L/→ (右方向)
k/K/↑ (上方向)
j/J/↓ (下方向)
g 上移到顶部
G 下移到底部
q/Q 退出
Space (空格) 暂停/播放
[ 上一曲
] 下一曲
-/滚轮下 减小音量
=/滚轮上 加大音量
n/N/Enter (回车) 进入选中的菜单
b/B/Escape (退出) 返回上级菜单
w/W 退出并退出登录
p 切换播放方式
P 心动模式(仅在歌单中时有效)
r/R 重新渲染 UI 如果 UI 界面因为某种原因出现错乱,可以使用这个重新渲染
c/C 当前播放列表
v/V 快进 5 s / 10 s
x/X 快退 1 s / 5 s
, 喜欢当前播放歌曲
< 喜欢当前选中歌曲
. 当前播放歌曲移除出喜欢
> 当前选中歌曲移除出喜欢
t 标记当前播放歌曲为不喜欢
T 标记当前选中歌曲为不喜欢
d 下载当前播放歌曲
D 下载当前选中歌曲
/ 搜索当前列表
? 帮助信息
a 播放中歌曲的所属专辑
A 选中歌曲的所属专辑
s 播放中歌曲的所属歌手
S 选中歌曲的所属歌手
o 网页打开播放中歌曲
O 网页打开选中歌曲/专辑...
e 添加为下一曲播放
E 添加到播放列表末尾
;/: 收藏选中歌单
'/" 取消收藏选中歌单

配置文件

配置文件路径为用户配置目录下的 go-musicfox.ini 文件,详细可参见配置示例

用户配置目录路径:

macOS:$HOME/Library/Application Support/go-musicfox

Linux:$XDG_CONFIG_HOME/go-musicfox$HOME/.config/go-musicfox

Windows:%AppData%\go-musicfox

你可以通过设置 MUSICFOX_ROOT 环境变量来自定义用户配置的存储位置

旧版本的 go-musicfox 的默认用户配置目录为 $HOME/.go-musicfox(*nix)或 %USERPROFILE%\.go-musicfox(Windows),升级到新版本时将自动迁移到上述的新路径

相关项目

  1. anhoder/bubbletea:基于 bubbletea 进行部分定制
  2. anhoder/bubbles:基于 bubbles 进行部分定制
  3. anhoder/netease-music:fork 自 NeteaseCloudMusicApiWithGo ,在原项目的基础上去除 API 功能,只保留 service 和 util 作为一个独立的包,方便在其他 Go 项目中调用

感谢

感谢以下项目及其贡献者们(但不限于):

感谢 JetBrains Open Source 为项目提供免费的 IDE 授权

Star History Chart

go-musicfox's People

Contributors

anhoder avatar kylezb avatar anhoderai avatar tenshi65535 avatar aleksanaa avatar ruixi-rebirth avatar sakarie9 avatar whiredplanck avatar muxinxy avatar cloudwindy avatar dependabot[bot] avatar st0nie avatar xiarenfan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.