{"id":26022177,"url":"https://github.com/qwfy/doc-browser","last_synced_at":"2026-04-04T22:54:42.881Z","repository":{"id":38375114,"uuid":"122630933","full_name":"qwfy/doc-browser","owner":"qwfy","description":"A documentation browser with support for DevDocs, Dash and Hoogle, written in Haskell and QML","archived":false,"fork":false,"pushed_at":"2021-10-09T05:11:16.000Z","size":7098,"stargazers_count":129,"open_issues_count":3,"forks_count":10,"subscribers_count":10,"default_branch":"master","last_synced_at":"2023-11-07T18:59:18.153Z","etag":null,"topics":["api-documentation","dash","devdocs","developer-tools","documentation-tool","hoogle"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qwfy.png","metadata":{"files":{"readme":"README.asciidoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-23T14:22:53.000Z","updated_at":"2023-09-25T02:04:09.000Z","dependencies_parsed_at":"2022-08-25T02:11:02.781Z","dependency_job_id":null,"html_url":"https://github.com/qwfy/doc-browser","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwfy%2Fdoc-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwfy%2Fdoc-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwfy%2Fdoc-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwfy%2Fdoc-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qwfy","download_url":"https://codeload.github.com/qwfy/doc-browser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242187653,"owners_count":20086217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-documentation","dash","devdocs","developer-tools","documentation-tool","hoogle"],"created_at":"2025-03-06T09:54:35.994Z","updated_at":"2026-04-04T22:54:42.833Z","avatar_url":"https://github.com/qwfy.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"readme":":toc: macro\n:experimental:\n\nDoc Browser is an API documentation browser with support for DevDocs, Dash and Hoogle, written in Haskell and QML.\n\nThe GUI looks like this:\n\nimage:asset/interface-annotated.png[Main Interface]\n\nlink:asset/interface-hoogle.png[This one] is the interface for Hoogle.\n\nlink:asset/interface-torch.png[This one] is the interface for PyTorch.\n\ntoc::[]\n\n== Features\n\n* Native desktop application\n* Works offline\n* link:#speed[Near real-time] fuzzy search\n* Easy-to-type shortcuts\n* DevDocs support\n* Dash support (incomplete)\n* Hoogle integration\n* Customizable\n* link:#http-interface[HTTP interfaces]\n* link:https://github.com/qwfy/doc-browser-nvim[Neovim integration]. Editor integration is just a HTTP request away\n\n== Current Status\n\n* The main GUI is suitable for daily use\n* Docset management is usable, but needs polishing\n* Packaging for OSes other than Arch Linux need to be added\n* I use this application every day and happy with it\n\n== Contributions Are Welcome\n\nSeveral other features are planned but I haven't got the time to implement or improve them, including: (in no particular order)\n\n1. Packaging for various Linux distributions\n2. Add \"Back\" and \"Forward\" navigation button to the GUI (preferably to the tab bar), like the ones in the web browsers\n3. Better support for Dash docsets (the current support is incomplete and hacky)\n4. Better support for Haskell docs (eg. support for individual package)\n5. Add a GUI to manage the docsets (including the ability to auto update the installed docsets)\n6. Integration with diigo, or send the selection to a note service, like cherrytree or Evernote\n\nIf you wish to contribute to feature 3, 4 and 5, please do contact me via Github issue before doing it.\n\n== Installation\n\n=== Arch Linux\n\nThere is a https://aur.archlinux.org/packages/doc-browser-git/[PKGBUILD]\navailable on AUR.\n\n=== Other Linux Distros\n\nYou can build this application from source, which isn't a pleasant\nexperience. Packaging for popular OSes/package managers are welcome.\n\nFollow these steps to install from source:\n\n1.  This application uses http://qt-project.org/[Qt 5], make sure you\nhave it installed. You also need https://wiki.qt.io/QtWebEngine[QtWebEngine],\ninstall it if it doesn't come with your Qt installation.\n2.  Install the Haskell tool\nhttps://docs.haskellstack.org/en/stable/install_and_upgrade/[stack].\n3.  The build process depends on several executables: `c2hs`, `alex`\nand `happy`, you can either install it using your package manager,\nor use the instruction given below.\n4.  Install other dependencies mentioned in the `depends` section in\nhttps://github.com/qwfy/doc-browser/blob/master/aur/PKGBUILD[this file],\nthe package name for your package manager may be different with the provided one.\nYou can either install them now, or later in a trial-and-error manner.\nYou don't need to install `mathjax` if you don't intend to use Hoogle.\n\nFinally, run these commands in the shell to build and install the\napplication:\n\n[source,bash]\n----\ngit clone 'https://github.com/qwfy/doc-browser.git'\ncd doc-browser\n\n# optionally, install these executables if not already installed:\n# stack install c2hs\n# stack install alex\n# stack install happy\n\n# build and install this application, this will take a while\n# if this step fails, then you probably missed some dependencies,\n# your can examine the error message to see which dependencies are missing\nstack install\n\necho \"binary installed to $(stack path --local-bin)\"\n----\n\nIf you have trouble building this application, you can:\n\n* Is it a dependency problem?\n* Does http://www.gekkou.co.uk/software/hsqml/[this page] help?\nEspecially the _Requirements_ and _Installation_ section.\n* Open an issue.\n\nOptionally, install the executable `xsel` or `xclip` for the kbd:[Y] shortcut\n(copy the selected match to clipboard) to work.\n\nOptionally, install the executable `xdg-open` (provided by package\n`xdg-utils` on Arch Linux) for the kbd:[Ctrl+/] shortcut (send query to\nGoogle) to work.\n\nOptionally, generate a completion script for your shell with:\n\n[source,bash]\n----\n# completion will be available in a new shell\ndoc-browser --bash-completion-script `which doc-browser` \u003e /etc/bash_completion.d/doc-browser.bash\n\n# or source them manually:\nsource \u003c(doc-browser --bash-completion-script `which doc-browser`)\n\n# for Zsh and Fish, there is:\n# --zsh-completion-script\n# --fish-completion-script\n----\n\n=== Install DevDocs' Docset\n\nTo install DevDocs' docset, invoke:\n\n[source,bash]\n----\ndoc-browser --install-devdocs DOC COLLECTION==VERSION ..\n\n# e.g.\n#   doc-browser --install-devdocs python Python==2.7.13\n# will install both the latest version of Python 3.x and Python 2.7.13\n\n# use\n#   doc-browser --list-remote-devdocs\n# to query available docsets and versions\n----\n\nThis will download docsets from devdocs.io, and install them to\n`XDG_CONFIG/doc-browser/DevDocs`.\n\n=== Install Dash's Docset\n\nTo install Dash's docset, invoke:\n\n[source,bash]\n----\ndoc-browser --install-dash COLLECTION ..\n\n# e.g.\n#   doc-browser --install-dash Erlang\n# will install the Erlang docset\n\n# use\n#   doc-browser --list-remote-dash\n# to query available docsets\n\n# This will download docsets from kapeli.com, and install them to `XDG_CONFIG/doc-browser/Dash`.\n\n# to install from a locally built archive,\n# or those in https://github.com/Kapeli/Dash-User-Contributions,\n# use:\n\ndoc-browser --install-dash COLLECTION --local-archive ABSOLUTE_PATH_TO_DOCSET_TGZ --version VERSION\n\n# e.g.\n#   doc-browser --install-dash PyTorch --local-archive $(pwd)/PyTorch.tgz --version 1.4.0\n# will install the docset for PyTorch, version 1.4.0\n# where PyTorch.tgz is generated according to:\n# https://github.com/Kapeli/Dash-User-Contributions\n----\n\n\n=== Enable Hoogle Support\n\nTo support Hoogle, this application creates a Hoogle database from a\ndocumentation archive, which can be done by these steps:\n\n1.  Find out which documentation archive you want to use. The Hoogle\nsupport is tested on archives provided by\nhttps://www.stackage.org[Stackage], like\nhttps://s3.amazonaws.com/haddock.stackage.org/lts-10.8/bundle.tar.xz[this\none], which can be found at: https://www.stackage.org/lts-10.8. You can\nuse other archives as well, as long as the unpacked archive can be read\nby `hoogle generate --local=dir_to_unpacked_archive`, but this is\nuntested. **NOTE** that stackage no longer provides download links for these\nkinds of archives, (see https://github.com/commercialhaskell/stackage/issues/4098),\nso you have to generate the archive yourself.\n2.  Invoke the following installation command, this will unpack the\narchive to `XDG_CONFIG/doc-browser/Hoogle/COLLECTION`, and creates a Hoogle\ndatabase `XDG_CONFIG/doc-browser/Hoogle/COLLECTION.hoo` for it, (doc-browser's\nHoogle doesn't interfere with your system Hoogle in any way):\n\n[source,bash]\n----\ndoc-browser --install-hoogle URL COLLECTION\n# e.g. doc-browser --install-hoogle 'https://s3.amazonaws.com/haddock.stackage.org/lts-10.8/bundle.tar.xz' lts-10.8\n#\n# URL is where to read the archive.\n# It can also be a local file,\n# which I suggest you to use if you have a bad network connection,\n# since the download function included in this program is pretty savage at this stage.\n#\n# See `doc-browser --help` for more\n#\n# Don't panic if you see a lot of lines that look like this\n# at the begining and the ending of the generation\n# (for the above lts-10.8, there are 43 of these):\n#\n# temporarily relocate x to x.__co.aixon.docbrowser-tempfile__, for x in:\n# /home/user/.config/doc-browser/Hoogle/lts-10.8/prologue.txt\n# ...\n# move x.__co.aixon.docbrowser-tempfile__ back to x, for x in:\n# /home/user/.config/doc-browser/Hoogle/lts-10.8/prologue.txt\n# ...\n#\n# These are necessary to work around a Hoogle issue.\n----\n\n3.  Prefix or suffix a search with \"/hh\" to query Hoogle, like this:\n`/hh[a]-\u003eInt-\u003e[a]`. Multiple databases are also supported, you need to\nadd a command to specify which database you want to access to, see the\nlink:#configuration[Configuration] section for instructions.\n\n=== Start the Application\n\nIf you installed the application from AUR, you can either start it with\nthe shipped .desktop file, or with:\n\n[source,bash]\n----\ndoc-browser\n----\n\nIf you installed from source, start it with:\n\n[source,bash]\n----\ndoc-browser\n\n# if you see any errors, it's probably due to the missing of dependencies\n----\n\nYou can also start it with `doc-browser.desktop`, found in the root\nof this repository. Icon is available if you copy `icon.svg` to a location\nsuch as `/usr/share/icons/doc-browser.svg`.\n\n== Offline Support\n\nThe documentation files themselves are downloaded to your disk when\n`doc-browser --install-devdocs`, `doc-browser --install-dash`\nor `doc-browser --install-hoogle` is invoked, however, to display\nthe documentation, some additional Cascading Style Sh*t or\nJavaScript files are needed, some of these are not packaged with\nthe documentation files.\n\n=== DevDocs\nTo make DevDocs' docsets work fully offline:\n\n* Start the application after `doc-browser --install-devdocs`\n* Search for anything, and open any match\n* When the tab is opened and the documentation is correctly displayed,\nall necessary files are cached, DevDocs' docsets work offline now\n\n=== Dash\nDash's docset works offline out of the box.\n\n=== Hoogle\nIf a MathJax distribution is found at `/usr/share/mathjax` (configurable),\nthen the Hoogle documentations will work offline.\n(If you installed from AUR, you already have it.)\n\n== GUI\n\n* When the application starts, you will see a blank screen, you can\nstart typing to search.\n* Prefix or suffix a search string with \"/py\", (e.g. \"/pyabspath\",\n\"abspath/py\"), will limit the search to the Python docset provided by\nDevDocs, more commands are available, see below.\n* Number of tabs will peak at 10, open one more tab will close the\nleft-most one.\n* Various keyboard shortcuts are available, see below.\n\n=== Commands\n\nThese commands are provided by default, you can customize them by following\nthe instructions in the link:#configuration[Configuration] section.\n\n[cols=\",\",options=\"header\",]\n|===\n| Command | Effect\n| py      | Limit search to DevDocs' Python 3.x\n| p2      | Limit search to DevDocs' Python 2.x\n| tf      | Limit search to DevDocs' TensorFlow\n| np      | Limit search to DevDocs' NumPy\n| pd      | Limit search to DevDocs' pandas\n| mp      | Limit search to DevDocs' Matplotlib\n| go      | Limit search to DevDocs' Go\n| hs      | Limit search to DevDocs' Haskell\n| pg      | Limit search to DevDocs' PostgreSQL\n| sl      | Limit search to DevDocs' SQLite\n| th      | Limit search to Dash's PyTorch\n| rs      | Limit search to Dash's Rust\n| er      | Limit search to Dash's Erlang\n| sp      | Limit search to Dash's SciPy\n| hh      | Perform search with Hoogle\n|===\n\n=== Shortcuts\n\n[cols=\"3\",options=\"header\",]\n|===\n| Key                                                                    | Effect                                                       | Comment\n| kbd:[/]                                                                | focus the search box                                         |\n| kbd:[Ctrl+I]                                                           | focus and clear the search box, but keep the command, if any | e.g. before: \"/pyfoo\"; after: \"/py\"\n| kbd:[Enter] or kbd:[Down]                                              | accept query and select the first match                      | when in the search box\n| kbd:[A]kbd:[S]kbd:[D]kbd:[F]kbd:[W]kbd:[E]kbd:[R]kbd:[T]kbd:[C]        | open match 1-9                                               |\n| kbd:[G+A]kbd:[S]kbd:[D]kbd:[F]kbd:[W]kbd:[E]kbd:[R]kbd:[T]kbd:[C]      | open match 10-18                                             |\n| kbd:[V+A]kbd:[S]kbd:[D]kbd:[F]kbd:[W]kbd:[E]kbd:[R]kbd:[T]kbd:[C]      | open match 19-27                                             |\n| kbd:[J]                                                                | select the next match                                        |\n| kbd:[K]                                                                | select the previous match                                    |\n| kbd:[Enter]                                                            | open the selected match                                      | when the selected item has focus\n| kbd:[Tab] or kbd:[Down]                                                | select the next match                                        | when the selected item has focus\n| kbd:[Shift+Tab] or kbd:[Up]                                            | select the previous match                                    | when the selected item has focus\n| kbd:[1]kbd:[2]kbd:[3]kbd:[4]kbd:[5]kbd:[6]kbd:[7]kbd:[8]kbd:[9]kbd:[0] | go to the corresponding tab                                  |\n| kbd:[Alt+L]                                                            | go to the next tab                                           |\n| kbd:[Alt+H]                                                            | go to the previous tab                                       |\n| kbd:[Ctrl+W]                                                           | close the current tab                                        |\n| kbd:[Y]                                                                | copy the selected match to clipboard                         | need executable `xsel` or `xclip`\n| kbd:[M]                                                                | copy the module of the selected match to clipboard           | only for Hoogle. need executable `xsel` or `xclip`\n| kbd:[P]                                                                | copy the package of the selected match to clipboard          | only for Hoogle. need executable `xsel` or `xclip`\n| kbd:[Ctrl+/]                                                           | send query to Google                                         | e.g. kbd:[Ctrl+/] on \"/pyfoo\" will search Google for \"Python foo\"; need executable `xdg-open`\n| kbd:[Ctrl+F]                                                           | open or focus page search                                           |\n| kbd:[Alt+N]                                                            | find next in page search                                     |\n| kbd:[Alt+P]                                                            | find previous in page search                                 |\n| kbd:[Esc]                                                              | close page search                                            | when in search box\n|===\n\nDepending on your platform, kbd:[Ctrl+U] can be used to clear the input box, just like in readline.\n\n== Configuration\n\nCreate the file `XDG_CONFIG/doc-browser/config.yaml` and edit it.\n\nThe file is in YAML format, configurable keys and documentations can be\nfound at:\n\n* `doc-browser --print-default-config`\n* or `config.yaml` in the root of the source repository\n\n== HTTP Interface\n\nYou can interact with this application using HTTP requests.\n\nAPI documentation can be found at:\n\n* https://qwfy.github.io/doc-browser/http-interface.html\n* or, `doc-browser --print-api`\n\n== Speed\n\nAs can be seen from the below (slighly outdated) benchmark, it takes less than 50ms to search through 39,499 entries.\n\nimage:prof/compare of speed of several implementations - no edit distance.png[Prof]\n\n\n== Credits and License\n\nThis application is written by incomplete@aixon.co, and licensed under MPL-2.0.\n\nYou can use the `icon.svg` in the root of this repository as the icon of this application.\nPermission is needed if you plan to use it for other purposes.\n\nMany thanks to https://github.com/Thibaut[Thibaut Courouble] and\nhttps://github.com/Thibaut/devdocs/graphs/contributors[other\ncontributors] of https://github.com/Thibaut/devdocs[DevDocs], without\ntheir work, this application wouldn't be possible:\n\n* This application ships with icons collected by DevDocs.\n* This application uses docsets, along with the corresponding style\nsheets, produced by DevDocs.\n\nMany thanks to https://github.com/ndmitchell[Neil Mitchell] for the\ngreat https://github.com/ndmitchell/hoogle[Hoogle]. The Hoogle support\nreceives https://github.com/qwfy/doc-browser/issues/2[helps] from him.\nThis application also ships with a little code from the Hoogle project,\nthe modified code is licensed under the BSD license.\n\nMany thanks to https://github.com/Kapeli/Dash-iOS[Bogdan Popescu]\nfor allowing me to use Dash's docset. This application also ships with icons\nfrom the Dash-iOS project. If you are using Mac, please consider\nhttps://kapeli.com/dash[Dash].\n\n\n== Known Problems and Solutions\n\nProblem: On KDE, kbd:[Ctrl+/] is taking too long to open the browser.\n\nSolution: This application uses `xdg-open` to open the browser. Try\nhttps://bugs.kde.org/show_bug.cgi?id=364662#c3[this workaround].\n\nProblem: The font in the documentation is too big or too small.\n\nSolution: Tweak the configuration `WebEngineZoomFactor`, see the\nlink:#configuration[Configuration] section for instruction.\n\nProblem: HTTP summon interface doesn't bring the window to front\n\nSolution: Try the section _Additional settings for Linux_ described in\nhttps://kb.froglogic.com/display/KB/Problem+-+Bringing+window+to+foreground+%28Qt%29[here].\n\nProblem: (China users only) Installation of docsets hangs/open documentation shows blank screen.\n\nSolution: devdocs.io or cloudflare.com is blocked by GFW, please use a VPN.\n\nProblem: Install/uninstall some Dash docsets reports error.\n\nSolution: If a docset has `/` in its name or version, (many Dash docsets do), the installation or uninstallation may not work. This problem is known from the begining, it's just that I haven't got time to fix it properly (without introducing un-upgradable changes). Solution: wait for me to fix it :(\n\n== FAQ\nQ: Why does this application display at most 27 matches?\n\nA: If your desired match is not in the top 27 matches, then there is\nprobably something wrong with the search algorithm.\n\nQ: Why does this application display at most 10 tabs?\n\nA: If too many tabs are displayed, the tab title would be hard to see on\nmany monitors. Instead of wanting more tabs, try open another instance\nof this application. The number of maximum tabs will be configurable in\nfuture versions, so you can benefit from a large monitor.\n\n== Tips\n- Typically, you can omit characters such as '_' (those require you holding kbd:[Shift] to type)\n  from your query string, your pinky might thank you for that.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwfy%2Fdoc-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqwfy%2Fdoc-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwfy%2Fdoc-browser/lists"}