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