Mangai ?

A Manga Downloader



Mangai is a fancy TUI app written in go that scrapes, downloads and packs manga into pdfs

⚙️ The most important feature of Mangai is that it supports user defined scrapers that can be added with just a few lines of config file (see limitations)

? Built with Bubble Tea framework

? This app is inspired by awesome ani-cli. Check it out!



Usage example


Config example

Config is located at the OS default config directory.

  • Unix$XDG_CONFIG_HOME/mangai/config.toml if $XDG_CONFIG_HOME exists, else $HOME/.config/mangai/config.toml
  • Darwin (macOS) – $HOME/Library/Application\ Support/mangai/config.toml
  • Windows%AppData%\mangai\config.toml
  • Plan 9$home/lib/mangai/config.toml

Custom config paths not supported (yet)

By default (if no config defined) Mangai uses manganelo as a source

# Which sources to use for searching.
# Since searching is done asynchronously it should not affect perfomance
use = ['manganelo', 'mangapoisk']

# Default download path
# It could be relative or absolute 
# path = '/users/user/manga'
path = '.'

# Fullscreen mode
fullscreen = true

# This is where you define new sources for searching
    # sources.%name of the source%
    # Base url of the source
    base = ''

    # Search endpoint. Put %s where the query should be
    search = ''

    # Selector of entry anchor (<a></a>) on search page
    # Make this and other selectors as specific as possible
    # See
    manga_anchor = '.search-story-item a.item-title'

    # Selector of entry title on search page
    manga_title = '.search-story-item a.item-title'

    # Manga chapters anchors selector
    chapter_anchor = 'li.a-h a.chapter-name'

    # Manga chapters titles selector
    chapter_title = 'li.a-h a.chapter-name'

    # Reader page images selector
    chapter_panels = '.container-chapter-reader img'

    base = ''
    search = ''
    manga_anchor = 'article.card a.px-1'
    manga_title = 'article.card .entry-title'
    chapter_anchor = 'li.chapter-item a'
    chapter_title = 'li.chapter-item span.chapter-title'
    chapter_panels = 'div.chapter-container .chapter-images img'

Installation / Build

Currently, Mangai can be installed only by building it from source. So you will need go installed to proceed further

  1. git clone
  2. cd mangai
  3. make installmake is used to set version string. If you can’t use make (or don’t want to?) feel free to just run go install.

That’s it! If you’re not sure where binary is installed run go list -f '{{.Target}}' in the project directory

To uninstall run make uninstall


Even though most manga sites will work, there exists some limitation to which sites could be added

  • Navigation layout should follow this model
    • Each manga have a separate page
    • Manga page should have a some form of chapters list (not lazy loaded)
    • Each chapter should have a separate page with panels (images)
  • No anti-bot protection ?

Some sites that work well


This is actually my first TUI app and go project, so feel free to point out any issues you find ?


View Github