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
19 - [x] Play playlists (MPV only)
20 - [ ] Download playlists
21 - [ ] Autoplay next video/audio
22 - [ ] Configuration options
26 Nim Coon depends on the following:
28 - mpv (recommended) or vlc
29 - peerflix (for magnet links)
31 Install VLC or MPV using your distribution's package manager.
35 pip3 install --user youtube-dl
40 npm install --global peerflix
43 ### Installing using Nimble
45 NimCoon can be installed from Nimble repositories:
48 nimble install nimcoon
51 You can also install from source by running the following command:
59 Download the latest build from GitlabCI (amd64 GNU/Linux only).
62 wget https://gitlab.com/njoseph/nimcoon/-/jobs/artifacts/master/download?job=compile -O artifacts.zip
66 Copy the binary to somewhere on your path like /usr/local/bin
73 # If your search query has multiple words, use quotes
76 # Play audio of the first search result
77 nimcoon -m -l "counting stars"
79 # Download audio of the first search result
80 nimcoon -mld "counting stars"
82 # Play direct video link
83 nimcoon https://www.youtube.com/watch?v=QOEMv0S8AcA
85 # Add -d to download or -m to select only audio or both
86 nimcoon -md https://www.youtube.com/watch?v=hT_nvWreIhg
89 After the search results are displayed, you can enter a number to play one
90 result, "all" to play all the results or "q" to quit the program.
92 If a number is entered, after the selected search result is played, the results
93 are redisplayed, so that you can play the other results without having to search
96 ### Command line arguments
98 | **Arguments** | **Explanation** |
99 |-------------------|--------------------------------------------|
100 | -m, --music | Play Music only, no video |
101 | -l, --lucky | Try your luck with the first search result |
102 | -f, --full-screen | Play video in full screen |
103 | -d, --download | Download video or music |
105 Feel free to use these options in any combination. NimCoon will show a helpful
106 error message if you pick incompatible options.
110 One-liner for compiling and running
113 nim c -d:ssl -r src/nimcoon.nim 'nim lang'
118 To avoid storing your nimcoon searches in `zsh` history, run this command
121 setopt histignorespace
124 Then, add a space before typing nimcoon in the shell, like " nimcoon"
127 nimcoon "this is private"
130 The same can be achieved in `bash` by setting an environment variable
132 export HISTCONTROL=ignoreboth