3 Play videos from YouTube and PeerTube from the
4 command line using your preferred desktop media player.
6 This application is implemented in [Nim language](https://nim-lang.org) using
7 only the standard library.
9 ![nimcoon screenshot with search term 'baby yoda'](screenshot.png)
13 - [x] Search for videos using keywords
14 - [x] Stream videos and music from YouTube
15 - [x] Play direct links from YouTube and PeerTube
16 - [x] Stream video and music from magnet links and hyperlinks to torrent files
19 - [x] Play playlists (MPV only)
20 - [ ] Download playlists
21 - [x] Stream video from torrent file URLs
22 - [x] BitTorrent is preferred for PeerTube video links
23 - [ ] Search PeerTube (3.0 or later)
24 - [ ] Autoplay next video/audio
25 - [ ] Configuration options
29 Nim Coon depends on the following:
31 - mpv (recommended) or vlc
32 - peerflix and webtorrent (for magnet links)
34 Install MPV or VLC using your distribution's package manager.
38 pip3 install --user youtube-dl
41 Install PeerFlix and WebTorrent
43 npm install --global peerflix webtorrent
46 ### Installing using Nimble
48 NimCoon can be installed from Nimble repositories:
51 nimble install nimcoon
54 You can also install from source by running the following command:
62 Download the latest build from GitlabCI (amd64 GNU/Linux only).
65 wget https://gitlab.com/njoseph/nimcoon/-/jobs/artifacts/master/download?job=compile -O artifacts.zip
69 Copy the binary to somewhere on your path like /usr/local/bin
76 # If your search query has multiple words, use quotes
79 # Play audio of the first search result
80 nimcoon -m -l "counting stars"
82 # Download audio of the first search result
83 nimcoon -mld "counting stars"
85 # Play direct video link
86 nimcoon https://www.youtube.com/watch?v=QOEMv0S8AcA
88 # Add -d to download or -m to select only audio or both
89 nimcoon -md https://www.youtube.com/watch?v=hT_nvWreIhg
92 After the search results are displayed, you can enter a number to play one
93 result, "all" to play all the results or "q" to quit the program.
95 If a number is entered, after the selected search result is played, the results
96 are redisplayed, so that you can play the other results without having to search
99 ### Command line arguments
101 | **Arguments** | **Explanation** |
102 |-------------------|--------------------------------------------|
103 | -m, --music | Play Music only, no video |
104 | -l, --lucky | Try your luck with the first search result |
105 | -f, --full-screen | Play video in full screen |
106 | -d, --download | Download video or music |
108 Feel free to use these options in any combination. NimCoon will show a helpful
109 error message if you pick incompatible options.
113 One-liner for compiling and running
116 nim c -d:ssl -r src/nimcoon.nim 'nim lang'
121 To avoid storing your nimcoon searches in `zsh` history, run this command
124 setopt histignorespace
127 Then, add a space before typing nimcoon in the shell, like " nimcoon"
130 nimcoon "this is private"
133 The same can be achieved in `bash` by setting an environment variable
135 export HISTCONTROL=ignoreboth