README.md
435 lines · 20188 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- Multiple Content Providers (Senshi, AniNeko, AllAnime, and Animepahe) with ordered fallback and up to 1080p support
28- Built-in headless browser to bypass Cloudflare/DDoS-Guard protections
29- Stream anime online
30- Track anime locally, on AniList, or on MyAnimeList
31- Browser-based AniList and MyAnimeList login flows
32- Skip anime Intro and Outro
33- Skip Filler and Recap episodes
34- Discord RPC about the anime
35- Rofi support
36- Image preview in rofi
37- Local anime history to continue from where you left off last time
38- Save mpv speed for next episode
39- Configurable through config file
40
41
42## Installing and Setup
43> **Note**: `Curd` requires `mpv`, `rofi`, and `ueberzugpp` for Rofi support and image preview. These are included in the installation instructions below for each distribution.
44
45### Linux
46<details>
47<summary>Arch Linux / Manjaro (AUR-based systems)</summary>
48
49Using Yay:
50
51```bash
52yay -Sy curd
53```
54
55or using Paru:
56
57```bash
58paru -Sy curd
59```
60
61Or, to manually clone and install:
62
63```bash
64git clone https://aur.archlinux.org/curd.git
65cd curd
66makepkg -si
67sudo pacman -S rofi ueberzugpp
68```
69</details>
70
71<details>
72<summary>Debian / Ubuntu (and derivatives)</summary>
73
74```bash
75sudo apt update
76sudo apt install mpv curl rofi ueberzugpp
77
78# For x86_64 systems:
79curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-x86_64
80
81# For ARM64 systems:
82curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-arm64
83
84chmod +x curd
85sudo mv curd /usr/bin/
86curd
87```
88</details>
89
90<details>
91<summary>Fedora Installation</summary>
92
93```bash
94sudo dnf update
95sudo dnf install mpv curl rofi ueberzugpp
96
97# For x86_64 systems:
98curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-x86_64
99
100# For ARM64 systems:
101curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-arm64
102
103chmod +x curd
104sudo mv curd /usr/bin/
105curd
106```
107</details>
108
109<details>
110<summary>openSUSE Installation</summary>
111
112```bash
113sudo zypper refresh
114sudo zypper install mpv curl rofi ueberzugpp
115
116# For x86_64 systems:
117curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-x86_64
118
119# For ARM64 systems:
120curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-arm64
121
122chmod +x curd
123sudo mv curd /usr/bin/
124curd
125```
126</details>
127
128<details>
129<summary>NixOS Installation</summary>
130
1311. Add curd as a flake input, for example:
132```nix
133{
134 inputs = {
135 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
136 curd = {
137 url = "github:Wraient/curd";
138 inputs.nixpkgs.follows = "nixpkgs";
139 };
140 }
141}
142```
1432. Install the package, for example:
144```nix
145{inputs, pkgs, ...}: {
146 environment.systemPackages = [
147 inputs.curd.packages.${pkgs.system}.default
148 ];
149}
150```
151
152</details>
153
154<details>
155<summary>Generic Installation</summary>
156
157Choose the appropriate binary for your system:
158```bash
159# For Linux x86_64:
160curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-x86_64
161
162# For Linux ARM64:
163curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-linux-arm64
164
165chmod +x curd
166sudo mv curd /usr/bin/
167curd
168```
169</details>
170
171<details>
172<summary>Uninstallation</summary>
173
174```bash
175sudo rm /usr/bin/curd
176```
177
178For AUR-based distributions:
179
180```bash
181yay -R curd
182```
183</details>
184
185### MacOS
186
187<details>
188<summary>MacOS Installation</summary>
189
190Install required dependencies
191```bash
192brew install mpv curl
193```
194
195Download the appropriate binary for your system:
196
197- For Apple Silicon (M1/M2) Macs:
198```bash
199curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-macos-arm64
200```
201
202- For Intel Macs:
203```bash
204curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-macos-x86_64
205```
206
207- For Universal Binary (works on both architectures):
208```bash
209curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd-macos-universal
210```
211
212Then complete the installation:
213
214```bash
215chmod +x curd
216sudo mv curd /usr/local/bin/
217curd
218```
219
220</details>
221
222<details>
223<summary>Uninstallation</summary>
224
225```bash
226sudo rm /usr/local/bin/curd
227```
228
229</details>
230
231### Windows
232
233<details>
234<summary>Windows Installation</summary>
235
236Option 1: Using the installer
237- Download and run the [Windows Installer](https://github.com/Wraient/curd/releases/latest/download/curd-windows-installer.exe)
238
239Option 2: Standalone executable
240- Download [curd-windows-x86_64.exe](https://github.com/Wraient/curd/releases/latest/download/curd-windows-x86_64.exe)
241</details>
242
243## Data Storage
244
245<details>
246<summary>Windows</summary>
247Stroage: (Token, Timestamps, debug.log, etc)
248
249```bash
250C:\.local\share\curd
251```
252
253Config :
254
255```bash
256C:\Users\USERNAME\AppData\Roaming\Curd
257```
258
259</details>
260
261<details>
262<summary>Linux/Unix</summary>
263Stroage: (Token, Timestamps, debug.log, etc)
264
265```bash
266$USER/.local/share/curd
267```
268
269Config :
270
271```bash
272$USER/.config/curd
273```
274
275</details>
276
277## Usage
278
279Run `curd` with the following options:
280
281```bash
282curd [options]
283```
284
285### Arguments would always take precedence over configuration
286
287> **Note**:
288> - To use rofi you need rofi and ueberzug installed.
289> - Rofi .rasi files are at default `~/.local/share/curd/`
290> - You can edit them as you like.
291> - If there are no rasi files with specific names, they would be downloaded from this repo.
292
293
294### Options
295
296| Flag | Description | Default |
297|---------------------------|-------------------------------------------------------------------------|---------------|
298| `-c` | Continue the last episode | - |
299| `-change-token` | Change your authentication token | - |
300| `-dub` | Watch the dubbed version of the anime | - |
301| `-sub` | Watch the subbed version of the anime | - |
302| `-softsub` | Prefer soft subtitles when available (AniNeko) | - |
303| `-hardsub` | Prefer hard subtitles when available (AniNeko) | - |
304| `-new` | Add a new anime to your list | - |
305| `-e` | Edit the configuration file | - |
306| `-skip-op` | Automatically skip the opening section of each episode | `true` |
307| `-skip-ed` | Automatically skip the ending section of each episode | `true` |
308| `-skip-filler` | Automatically skip filler episodes | `true` |
309| `-skip-recap` | Automatically skip recap sections | `true` |
310| `-discord-presence` | Enable or disable Discord presence | `true` |
311| `-image-preview` | Show an image preview of the anime | - |
312| `-no-image-preview` | Disable image preview | - |
313| `-next-episode-prompt` | Prompt for the next episode after completing one | - |
314| `-rofi` | Open anime selection in the rofi interface | - |
315| `-no-rofi` | Disable rofi interface | - |
316| `-percentage-to-mark-complete` | Set the percentage watched to mark an episode as complete | `85` |
317| `-player` | Specify the player to use for playback | `"mpv"` |
318| `-save-mpv-speed` | Save the current MPV speed setting for future sessions | `true` |
319| `-score-on-completion` | Prompt to score the episode on completion | `true` |
320| `-storage-path` | Path to the storage directory | `"$HOME/.local/share/curd"` |
321| `-subs-lang` | Set the language for subtitles | `"english"` |
322| `-u` | Update the script | - |
323| `-v` | Show curd version | - |
324
325### Examples
326
327- **Continue the Last Episode**:
328 ```bash
329 curd -c
330 ```
331
332- **Add a New Anime**:
333 ```bash
334 curd -percentage-to-mark-complete=90
335 ```
336
337- **Play with Rofi and Image Preview**:
338 ```bash
339 curd -rofi -image-preview
340 ```
341
342## Configuration
343
344All configurations are stored in a file you can edit with the `-e` option.
345
346```bash
347curd -e
348```
349
350Script is made in a way that you use it for one session of watching.
351
352You can quit it anytime and the resume time would be saved in the history file
353
354more settings can be found at config file.
355config file is located at ```~/.config/curd/curd.conf```
356
357On first start, curd asks which tracking mode you want to use:
358
359- local
360- anilist
361- myanimelist
362- anilist + myanimelist
363
364Local history stays enabled in all modes. `anilist` means local history + AniList sync, `myanimelist` means local history + MyAnimeList sync, and `anilist + myanimelist` updates both platforms. In dual-sync mode, curd compares the latest remote update time for each anime and pushes the newest status/progress/category back to the older tracker so both sides converge automatically. Legacy installs are migrated to `anilist` automatically. If you switch trackers later, curd exposes a **Change Tracker** menu entry and can either merge both lists, replace MyAnimeList with AniList, or replace AniList with MyAnimeList.
365
366MyAnimeList OAuth requires your own MAL application credentials. You can set them in the config file or with environment variables:
367
368```bash
369CURD_MAL_CLIENT_ID=your_client_id
370CURD_MAL_CLIENT_SECRET=your_client_secret
371```
372
373If the browser reaches the localhost callback page but curd does not continue automatically, rerun the command and paste the full callback URL when prompted. Curd now keeps the pending MyAnimeList PKCE state so the login can be completed manually.
374
375| **Option** | **Type** | **Valid Values** | **Description** |
376|---------------------------|------------|-------------------------------------------|---------------------------------------------------------------------------------------------------|
377| `DiscordPresence` | Boolean | `true`, `false` | Enables or disables Discord Rich Presence integration. |
378| `AnimeNameLanguage` | Enum | `english`, `romaji` | Sets the preferred language for anime names. |
379| `MpvArgs` | List | all mpv args eg ["--fullscreen=yes", "--mute=yes"] | Add args to mpv player |
380| `MpvPlaybackStartTimeout` | Integer | `1` to `600` (seconds) | How long to wait for MPV playback to start before trying another provider. Default: `20` |
381| `AddMissingOptions` | Boolean | `true`, `false` | When `true`, on a **version upgrade** only options registered as new for that release are **appended** to `curd.conf` (not every historical default). Set `false` to opt out. Defaults still apply in memory always. |
382| `VimKeys` | Boolean | `true`, `false` | When `true`, selection menus use vim motions: `j`/`k`/`h`/`l` (and arrows) to move, `/` or `?` to search. Default: `false` (type-to-filter immediately). Add `VimKeys=true` to `~/.config/curd/curd.conf` to enable. |
383| `CheckUpdates` | Boolean | `true`, `false` | When `true` (default), checks GitHub for a newer release **while idle** (does not delay startup). If an update is found, the next launch shows notes and options: update now / skip / remind later / turn off. |
384| `MpvEpisodePlaylist` | Boolean | `true`, `false` | When `true` (default), after playback is stable curd fills the MPV playlist with episodes (and dub/sub when available) so you can pick from MPV's playlist UI. Access: `MPV` → right-click the prev/next OSC button (or `Ctrl+P`). Selecting a row loads that stream and keeps tracking in sync. |
385| `AlternateScreen` | Boolean | `true`, `false` | Toggles the use of an alternate screen buffer for cleaner UI. |
386| `RofiSelection` | Boolean | `true`, `false` | Enables or disables anime selection via Rofi. |
387| `PercentageToMarkComplete`| Integer | `0` to `100` | Sets the percentage of an episode watched to consider it as completed. |
388| `StoragePath` | String | Any valid path (Environment variables accepted) | Specifies the directory where Curd stores its data. |
389| `SubOrDub` | Enum | `sub`, `dub` | Sets the preferred format for anime audio. |
390| `SubStyle` | Enum | `ask`, `soft`, `hard` | For AniNeko sub streams: `ask` prompts once when both soft-sub and hard-sub servers exist, then saves your choice here; `soft` uses external `.vtt` subtitles via mpv; `hard` uses burned-in subs. Default: `ask` |
391| `NextEpisodePrompt` | Boolean | `true`, `false` | Prompts the user before automatically playing the next episode. |
392| `SubsLanguage` | String | `english` (redundant rn) | Sets the preferred subtitle language. |
393| `ScoreOnCompletion` | Boolean | `true`, `false` | Automatically prompts the user to rate the anime upon completion. |
394| `SkipOp` | Boolean | `true`, `false` | Automatically skips the opening of episodes when supported. |
395| `SkipEd` | Boolean | `true`, `false` | Automatically skips the ending of episodes when supported. |
396| `SkipRecap` | Boolean | `true`, `false` | Skips recap sections in episodes when supported. |
397| `ImagePreview` | Boolean | `true`, `false` | Enables or disables image previews during anime selection (only for rofi). |
398| `Player` | String | any mpv-compatible binary (e.g. `mpv`, `iina`) | Player binary used for playback. If not found, Curd falls back to `mpv`. |
399| `SaveMpvSpeed` | Boolean | `true`, `false` | Retains the playback speed set in MPV for next episode. |
400| `SkipFiller` | Boolean | `true`, `false` | Skips filler episodes when supported. |
401| `MenuOrder` | String | Comma-separated list | Controls which menu items appear and their order. Available options: `CURRENT`, `ALL`, `UNTRACKED`, `UPDATE`, `REMAP_PROVIDER`, `CONTINUE_LAST`, `PLANNING`, `COMPLETED`, `PAUSED`, `DROPPED`, `REWATCHING`, `TRACKER`, `PROVIDER`. Only listed items will be shown. Default: `CURRENT,ALL,UNTRACKED,UPDATE,REMAP_PROVIDER,CONTINUE_LAST,TRACKER,PROVIDER` |
402| `Provider` | List | `stacked`, `["anipub"]`, `["anineko"]`, `["allanime"]`, `["animepahe"]` | Sets the content-provider fallback list. `stacked` (default) uses the preferred order: senshi → anipub → anineko → allanime → animepahe. A single-provider list uses only that site. AllAnime and Animepahe are disabled by default unless included in `Provider`. Default: `stacked` |
403| `ManualProviderSearch` | Boolean | `true`, `false` | Skip automatic provider matching and always show provider search results for manual selection. Displays a hint with the tracker title, format (TV/Movie/etc.), episode count, and sub/dub mode. Default: `false` |
404| `TrackingLocal` | Boolean | `true` | Legacy compatibility flag. Local playback history is always enabled. |
405| `TrackingRemote` | Enum | `none`, `anilist`, `myanimelist`, `anilist+myanimelist` | Selects which remote tracker curd syncs with. |
406| `TrackingConfigured` | Boolean | `true`, `false` | Internal flag used to remember that the startup tracking prompt has already been completed. |
407| `MyAnimeListClientID` | String | MAL OAuth client ID | Client ID used for MyAnimeList browser login. |
408| `MyAnimeListClientSecret` | String | MAL OAuth client secret | Optional secret used for MyAnimeList browser login and token refresh. |
409| `MyAnimeListImported` | Boolean | `true`, `false` | Tracks whether the one-time AniList-to-MyAnimeList import prompt has already been handled. |
410
411## Todo (fix)
412- Use Powershell for windows token input instead of notepad or cmd
413- Add a better way to do commands in windows (Convinience for users)
414
415## Dependencies
416- mpv - Video player (required fallback)
417- iina - Optional mpv-based player on macOS
418- rofi - Selection menu
419- ueberzug - Display images in rofi
420- chromium - Required for Animepahe (auto-downloaded by default, but Termux users must install manually via `pkg install chromium`)
421
422## API Used
423- [Anilist API](https://anilist.gitbook.io/anilist-apiv2-docs) - Update user data and download user data
424- [MyAnimeList API](https://myanimelist.net/apiconfig/references/api/v2) - MyAnimeList OAuth and tracking sync
425- [AniSkip API](https://api.aniskip.com/api-docs) - Get anime intro and outro timings
426- [AllAnime Content](https://allanime.to/) - Fetch anime url
427- [Senshi Project](https://senshi.to/) - Default provider with Vidcloud HLS streams and MAL-based catalog matching
428- [AniPub](https://anipub.xyz/) - Fast JSON catalog APIs with MegaPlay HLS streams
429- [AniNeko Content](https://anineko.to/) - Alternative provider with soft/hard sub stream selection
430- [Animepahe Content](https://animepahe.pw/) - Alternative provider for 1080p streams
431- [Jikan](https://jikan.moe/) - Get filler episode number
432
433## Credits
434- [ani-cli](https://github.com/pystardust/ani-cli) - Code for fetching anime url
435- [jerry](https://github.com/justchokingaround/jerry) - For the inspiration