haskell-docs-cli: Search Hoogle and navigate Hackage from the command line.

[ bsd3, development, haskell, library, program ] [ Propose Tags ]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS]
Change log ChangeLog.md
Dependencies aeson, ansi-wl-pprint, async, base (>=4.7 && <5), bytestring, containers, directory, exceptions, extra, filepath, hashable, haskeline, haskell-docs-cli, hoogle, html-conduit, http-client, http-client-tls, http-types, mtl, network-uri, optparse-applicative, process, temporary, terminal-size, text, time, transformers, xml-conduit [details]
License BSD-3-Clause
Copyright 2022 Marcelo Lazaroni
Author Marcelo Lazaroni
Maintainer Marcelo Lazaroni
Category Haskell, Development
Home page https://github.com/lazamar/haskell-docs-cli#readme
Bug tracker https://github.com/lazamar/haskell-docs-cli/issues
Source repo head: git clone https://github.com/lazamar/haskell-docs-cli
Uploaded by lazamar at 2022-11-20T20:09:28Z
Executables hdc
Downloads 105 total (6 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-11-20 [all 1 reports]

Readme for haskell-docs-cli-

[back to package description]


This package allows you to perform Hoogle searches and to navigate Hackage documentation from the command line.

Staying in the command line avoids switching to and from the browser, makes it easier to seach a documentation page, jumping through its content, and to view the source code of libraries.

Read more about the rationale here.


Download the project and run stack install.

It will make the hdc executable available in your path.

git clone https://github.com/lazamar/haskell-docs-cli.git
cd haskell-docs-cli
stack install


Demo of all commands


Search using Hoogle

Just like in Hoogle, just type a function name or signature to search for matching entries in all of Hackage.

You can select an option by typing its number or by searching for its name with /.

Press Enter to view the contents of the current context (search, module or package) again. If in a search context, pressing Enter you will see the results again. The current context is displayed in the line above the prompt.

Search Hoogle

View documentation

Use :mdocumentation (or md for short) to view documentation about a module. It will show you the documentation for the first module to match a Hoogle search for the term you type. As this is a Hoogle search, you can use +<package name> to specify the package if you want, like in Hoogle itself.

Use :pdocumentation (or pd for short) to view documentation about a package.

View Documentation

View interfaces

Use :minterface (or :mi) to view all functions, types, aliases and classes exported by a module.

Use pinterface (or :pi) to view the modules contained in a package.

You can navigate further into the options by selecting them by number, or by name with /.

View Interfaces

You can view the source code of a search result with :src <selector> where the selector is either the result number or a filter term prefixed by /.

If you type :src and a search term, haskell-doc-cli will load the source of the first Hoogle result that is not a module or package.

Navigate the Source


Contributions are very welcome. Here are some things that would be nice to have:

  • Fix more edge cases
  • Windows compatibility