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