oni

command module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

README ยถ

ONI - Anime Streaming Client

A modern rewrite of jerry in Go with a beautiful TUI powered by Bubble Tea.

Features

  • ๐ŸŽจ Beautiful Terminal UI - Interactive menus powered by Bubble Tea and Lipgloss
  • ๐Ÿ“‘ Tab-Based Interface - Navigate between anime categories with arrow keys
  • ๐Ÿš€ Instant Loading - Cached lists load instantly on subsequent visits
  • ๐Ÿ“œ Smart Scrolling - Clean 5-item view with automatic scroll indicators
  • ๐Ÿ”„ Async Refresh - Background updates without blocking UI
  • ๐Ÿ“บ Multiple Providers - Support for allanime, aniwatch, yugen, hdrezka, and aniworld
  • ๐Ÿ”„ AniList Integration - Sync your watch progress, scores, and status
  • ๐ŸŽฎ Discord Presence - Show what you're watching on Discord
  • ๐ŸŽฌ Multiple Players - Support for mpv, vlc, and iina
  • ๐Ÿ“ Watch History - Resume from where you left off
  • โš™๏ธ Easy Configuration - INI-based config at ~/.oni/config.ini

Installation

Prerequisites
  • Go 1.21 or higher
  • A video player (mpv, vlc, or iina)
  • AniList account (optional, for progress tracking)
Build from Source
git clone https://github.com/pranshuj73/oni
cd oni
go build -o oni
sudo mv oni /usr/local/bin/

Usage

Interactive Mode

Simply run oni to start the interactive TUI:

oni
Command Line Options
oni [options] [query]

Options:
  -c             Continue watching from list
  -e             Edit configuration
  -d             Enable Discord presence
  -h             Show help
  -q <quality>   Video quality (e.g., 1080, 720)
  -v             Show version
  -w <provider>  Provider (allanime, aniwatch, yugen, hdrezka, aniworld)
  --sub-or-dub   Audio type (sub, dub)
Examples
# Start interactive menu
oni

# Continue watching from your list
oni -c

# Search and watch anime in 720p
oni -q 720 one piece

# Use a specific provider
oni -w aniwatch demon slayer

# Enable Discord presence
oni -d naruto

Configuration

Configuration is stored at ~/.oni/config.ini. You can edit it directly or use the built-in editor:

oni -e
Default Configuration
[player]
player = mpv
player_arguments = 

[provider]
provider = allanime
download_dir = 
quality = 1080

[anilist]
no_anilist = false
score_on_completion = false

[ui]
use_external_menu = false
image_preview = false
json_output = false

[playback]
sub_or_dub = sub
subs_language = english

[discord]
discord_presence = false

[advanced]
show_adult_content = false

AniList Setup

  1. Run oni for the first time
  2. You'll be prompted to visit: https://anilist.co/api/v2/oauth/authorize?client_id=9857&response_type=token
  3. Copy the access token and paste it into the terminal
  4. Your token will be saved at ~/.local/share/jerry/anilist_token.txt

Project Structure

oni/
โ”œโ”€โ”€ main.go                  # Entry point and app orchestration
โ”œโ”€โ”€ config/                  # Configuration management
โ”‚   โ”œโ”€โ”€ config.go           # INI file handling
โ”‚   โ””โ”€โ”€ types.go            # Config structures
โ”œโ”€โ”€ anilist/                # AniList API integration
โ”‚   โ”œโ”€โ”€ client.go           # GraphQL client
โ”‚   โ”œโ”€โ”€ auth.go             # Token management
โ”‚   โ”œโ”€โ”€ queries.go          # GraphQL queries
โ”‚   โ””โ”€โ”€ types.go            # Response types
โ”œโ”€โ”€ providers/              # Anime providers
โ”‚   โ”œโ”€โ”€ provider.go         # Provider interface
โ”‚   โ”œโ”€โ”€ allanime.go         # AllAnime scraper
โ”‚   โ”œโ”€โ”€ aniwatch.go         # Aniwatch scraper
โ”‚   โ”œโ”€โ”€ yugen.go            # Yugen scraper
โ”‚   โ”œโ”€โ”€ hdrezka.go          # HDRezka scraper
โ”‚   โ””โ”€โ”€ aniworld.go         # Aniworld scraper
โ”œโ”€โ”€ player/                 # Video player integration
โ”‚   โ”œโ”€โ”€ player.go           # Player interface
โ”‚   โ”œโ”€โ”€ mpv.go              # MPV implementation
โ”‚   โ”œโ”€โ”€ vlc.go              # VLC implementation
โ”‚   โ””โ”€โ”€ history.go          # Watch history tracking
โ”œโ”€โ”€ discord/                # Discord Rich Presence
โ”‚   โ””โ”€โ”€ presence.go         # Presence management
โ””โ”€โ”€ ui/                     # Bubble Tea UI components
    โ”œโ”€โ”€ main_menu.go        # Main menu
    โ”œโ”€โ”€ anime_search.go     # Search interface
    โ”œโ”€โ”€ anime_list.go       # List viewer
    โ”œโ”€โ”€ episode_select.go   # Episode selector
    โ”œโ”€โ”€ update_progress.go  # Progress updater
    โ”œโ”€โ”€ config_editor.go    # Config editor
    โ””โ”€โ”€ styles.go           # UI styling

Providers

AllAnime (Default)
  • Fast and reliable
  • Good quality streams
  • Extensive library
Aniwatch
  • High-quality streams
  • Multiple subtitle options
  • Good for popular anime
Yugen
  • Alternative source
  • Decent quality
  • Good uptime
HDRezka
  • Russian-focused provider
  • Multiple quality options
  • Full decryption support implemented
Aniworld
  • German provider
  • Good selection
  • M3U8 streams

Data Storage

  • Config: ~/.oni/config.ini
  • AniList Token: ~/.local/share/jerry/anilist_token.txt
  • User ID: ~/.local/share/jerry/anilist_user_id.txt
  • Watch History: ~/.local/share/jerry/jerry_history.txt

Keyboard Navigation

Main Menu
  • โ†‘/โ†“ or j/k - Navigate
  • Enter - Select
  • q - Quit
Anime List (Tab-Based)
  • โ†/โ†’ or h/l - Switch between tabs (categories)
  • โ†‘/โ†“ or j/k - Navigate within list (auto-scrolls)
  • Enter - Select anime
  • r - Manually refresh list
  • Esc - Return to main menu

Performance Note: Lists show max 5 items with scroll indicators. First load caches results - subsequent visits are instant!

Search/List
  • โ†‘/โ†“ or j/k - Navigate
  • Enter - Select
  • Backspace - Go back
  • Esc - Return to main menu
Config Editor
  • โ†‘/โ†“ or j/k - Navigate
  • Enter - Edit value
  • s - Save configuration
  • Esc - Return to main menu

Pending Tasks

  • Download Anime Menu - Create a download menu that allows searching for anime to download
  • Download Functionality - Implement download functionality for single episodes and episode ranges

Limitations

  • Image preview in TUI is not yet implemented
  • Resume from history shows a simple list (could be improved with better UI)

Credits

License

This project maintains compatibility with the original jerry license.

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

Disclaimer

This tool is for educational purposes only. Please support official anime streaming services.

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL