README.md
341 lines · 13479 bytes
1# Curd
2
3A cli application to stream anime with [Anilist](https://anilist.co/) integration and Discord RPC written in golang.
4Works on Windows and Linux
5
6## Join the discord server
7
8https://discord.gg/cNaNVEE3B6
9
10## Demo Video
11Normal mode:
12
13
14https://github.com/user-attachments/assets/376e7580-b1af-40ee-82c3-154191f75b79
15
16Rofi with Image preview
17
18
19https://github.com/user-attachments/assets/cbf799bc-9fdd-4402-ab61-b4e31f1e264d
20
21
22## Features
23- Stream anime online
24- Update anime in Anilist after completion
25- Skip anime Intro and Outro
26- Skip Filler and Recap episodes
27- Discord RPC about the anime
28- Rofi support
29- Image preview in rofi
30- Local anime history to continue from where you left off last time
31- Save mpv speed for next episode
32- Configurable through config file
33
34
35## Installing and Setup
36> **Note**: `Curd` requires `mpv`, `rofi`, and `ueberzugpp` for Rofi support and image preview. These are included in the installation instructions below for each distribution.
37
38### Linux
39<details>
40<summary>Arch Linux / Manjaro (AUR-based systems)</summary>
41
42Using Yay:
43
44```bash
45yay -Sy curd
46```
47
48or using Paru:
49
50```bash
51paru -Sy curd
52```
53
54Or, to manually clone and install:
55
56```bash
57git clone https://aur.archlinux.org/curd.git
58cd curd
59makepkg -si
60sudo pacman -S rofi ueberzugpp
61```
62</details>
63
64<details>
65<summary>Debian / Ubuntu (and derivatives)</summary>
66
67```bash
68sudo apt update
69sudo apt install mpv curl rofi ueberzugpp
70
71# For x86_64 systems:
72curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-x86_64
73
74# For ARM64 systems:
75curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-arm64
76
77chmod +x curd
78sudo mv curd /usr/bin/
79curd
80```
81</details>
82
83<details>
84<summary>Fedora Installation</summary>
85
86```bash
87sudo dnf update
88sudo dnf install mpv curl rofi ueberzugpp
89
90# For x86_64 systems:
91curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-x86_64
92
93# For ARM64 systems:
94curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-arm64
95
96chmod +x curd
97sudo mv curd /usr/bin/
98curd
99```
100</details>
101
102<details>
103<summary>openSUSE Installation</summary>
104
105```bash
106sudo zypper refresh
107sudo zypper install mpv curl rofi ueberzugpp
108
109# For x86_64 systems:
110curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-x86_64
111
112# For ARM64 systems:
113curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-arm64
114
115chmod +x curd
116sudo mv curd /usr/bin/
117curd
118```
119</details>
120
121<details>
122<summary>NixOS Installation</summary>
123
1241. Add curd as a flake input, for example:
125```nix
126{
127 inputs = {
128 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
129 curd = {
130 url = "github:Wraient/curd";
131 inputs.nixpkgs.follows = "nixpkgs";
132 };
133 }
134}
135```
1362. Install the package, for example:
137```nix
138{inputs, pkgs, ...}: {
139 environment.systemPackages = [
140 inputs.curd.packages.${pkgs.system}.default
141 ];
142}
143```
144
145</details>
146
147<details>
148<summary>macOS Installation</summary>
149
150Install required dependencies
151```bash
152brew install mpv curl
153```
154
155Download the appropriate binary for your system:
156
157- For Apple Silicon (M1/M2) Macs:
158```bash
159curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-macos-arm64
160```
161
162- For Intel Macs:
163```bash
164curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-macos-x86_64
165```
166
167- For Universal Binary (works on both architectures):
168```bash
169curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-macos-universal
170```
171
172Then complete the installation:
173
174```bash
175chmod +x curd
176sudo mv curd /usr/local/bin/
177curd
178```
179
180</details>
181
182<details>
183<summary>Windows Installation</summary>
184
185Option 1: Using the installer
186- Download and run the [Windows Installer](https://github.com/Wraient/curd/releases/latest/download/curd-windows-installer.exe)
187
188Option 2: Standalone executable
189- Download [curd-windows-x86_64.exe](https://github.com/Wraient/curd/releases/latest/download/curd-windows-x86_64.exe)
190</details>
191
192<details>
193<summary>Generic Installation</summary>
194
195Choose the appropriate binary for your system:
196```bash
197# For Linux x86_64:
198curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-x86_64
199
200# For Linux ARM64:
201curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-arm64
202
203# For macOS Universal:
204curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-macos-universal
205
206chmod +x curd
207sudo mv curd /usr/bin/
208curd
209```
210</details>
211
212<details>
213<summary>Uninstallation</summary>
214
215```bash
216sudo rm /usr/bin/curd
217```
218
219For AUR-based distributions:
220
221```bash
222yay -R curd
223```
224</details>
225
226### [Windows Installer](https://github.com/Wraient/curd/releases/latest/download/curd-windows-installer.exe)
227
228## Usage
229
230Run `curd` with the following options:
231
232```bash
233curd [options]
234```
235
236### Arguments would always take precedence over configuration
237
238> **Note**:
239> - To use rofi you need rofi and ueberzug installed.
240> - Rofi .rasi files are at default `~/.local/share/curd/`
241> - You can edit them as you like.
242> - If there are no rasi files with specific names, they would be downloaded from this repo.
243
244
245### Options
246
247| Flag | Description | Default |
248|---------------------------|-------------------------------------------------------------------------|---------------|
249| `-c` | Continue the last episode | - |
250| `-change-token` | Change your authentication token | - |
251| `-dub` | Watch the dubbed version of the anime | - |
252| `-sub` | Watch the subbed version of the anime | - |
253| `-new` | Add a new anime to your list | - |
254| `-e` | Edit the configuration file | - |
255| `-skip-op` | Automatically skip the opening section of each episode | `true` |
256| `-skip-ed` | Automatically skip the ending section of each episode | `true` |
257| `-skip-filler` | Automatically skip filler episodes | `true` |
258| `-skip-recap` | Automatically skip recap sections | `true` |
259| `-discord-presence` | Enable or disable Discord presence | `true` |
260| `-image-preview` | Show an image preview of the anime | - |
261| `-no-image-preview` | Disable image preview | - |
262| `-next-episode-prompt` | Prompt for the next episode after completing one | - |
263| `-rofi` | Open anime selection in the rofi interface | - |
264| `-no-rofi` | Disable rofi interface | - |
265| `-percentage-to-mark-complete` | Set the percentage watched to mark an episode as complete | `85` |
266| `-player` | Specify the player to use for playback | `"mpv"` |
267| `-save-mpv-speed` | Save the current MPV speed setting for future sessions | `true` |
268| `-score-on-completion` | Prompt to score the episode on completion | `true` |
269| `-storage-path` | Path to the storage directory | `"$HOME/.local/share/curd"` |
270| `-subs-lang` | Set the language for subtitles | `"english"` |
271| `-u` | Update the script | - |
272| `-v` | Show curd version | - |
273
274### Examples
275
276- **Continue the Last Episode**:
277 ```bash
278 curd -c
279 ```
280
281- **Add a New Anime**:
282 ```bash
283 curd -percentage-to-mark-complete=90
284 ```
285
286- **Play with Rofi and Image Preview**:
287 ```bash
288 curd -rofi -image-preview
289 ```
290
291## Configuration
292
293All configurations are stored in a file you can edit with the `-e` option.
294
295```bash
296curd -e
297```
298
299Script is made in a way that you use it for one session of watching.
300
301You can quit it anytime and the resume time would be saved in the history file
302
303more settings can be found at config file.
304config file is located at ```~/.config/curd/curd.conf```
305
306| **Option** | **Type** | **Valid Values** | **Description** |
307|---------------------------|------------|-------------------------------------------|---------------------------------------------------------------------------------------------------|
308| `DiscordPresence` | Boolean | `true`, `false` | Enables or disables Discord Rich Presence integration. |
309| `AnimeNameLanguage` | Enum | `english`, `romaji` | Sets the preferred language for anime names. |
310| `MpvArgs` | List | all mpv args eg ["--fullscreen=yes", "--mute=yes"] | Add args to mpv player |
311| `AddMissingOptions` | Boolean | `true`, `false` | Automatically adds missing configuration options with default values to the config file. |
312| `AlternateScreen` | Boolean | `true`, `false` | Toggles the use of an alternate screen buffer for cleaner UI. |
313| `RofiSelection` | Boolean | `true`, `false` | Enables or disables anime selection via Rofi. |
314| `PercentageToMarkComplete`| Integer | `0` to `100` | Sets the percentage of an episode watched to consider it as completed. |
315| `StoragePath` | String | Any valid path (Environment variables accepted) | Specifies the directory where Curd stores its data. |
316| `SubOrDub` | Enum | `sub`, `dub` | Sets the preferred format for anime audio. |
317| `NextEpisodePrompt` | Boolean | `true`, `false` | Prompts the user before automatically playing the next episode. |
318| `SubsLanguage` | String | `english` (redundant rn) | Sets the preferred subtitle language. |
319| `ScoreOnCompletion` | Boolean | `true`, `false` | Automatically prompts the user to rate the anime upon completion. |
320| `SkipOp` | Boolean | `true`, `false` | Automatically skips the opening of episodes when supported. |
321| `SkipEd` | Boolean | `true`, `false` | Automatically skips the ending of episodes when supported. |
322| `SkipRecap` | Boolean | `true`, `false` | Skips recap sections in episodes when supported. |
323| `ImagePreview` | Boolean | `true`, `false` | Enables or disables image previews during anime selection (only for rofi). |
324| `Player` | String | `mpv` (redundant rn) | Specifies the media player used for streaming or playing anime. |
325| `SaveMpvSpeed` | Boolean | `true`, `false` | Retains the playback speed set in MPV for next episode. |
326| `SkipFiller` | Boolean | `true`, `false` | Skips filler episodes when supported. |
327
328## Dependencies
329- mpv - Video player (vlc support might be added later)
330- rofi - Selection menu
331- ueberzug - Display images in rofi
332
333## API Used
334- [Anilist API](https://anilist.gitbook.io/anilist-apiv2-docs) - Update user data and download user data
335- [AniSkip API](https://api.aniskip.com/api-docs) - Get anime intro and outro timings
336- [AllAnime Content](https://allanime.to/) - Fetch anime url
337- [Jikan](https://jikan.moe/) - Get filler episode number
338
339## Credits
340- [ani-cli](https://github.com/pystardust/ani-cli) - Code for fetching anime url
341- [jerry](https://github.com/justchokingaround/jerry) - For the inspiration