MyNixOS website logo
Description

Search Hoogle and navigate Hackage from the command line.

Please see the README on GitHub at https://github.com/lazamar/haskell-docs-cli#readme

haskell-docs-cli

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.

Installation

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

Functionalities

Demo of all commands

asciicast

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.

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 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 /.

Navigate the source code

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.

Contributing

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

  • Fix more edge cases
  • Windows compatibility.
Metadata

Version

1.0.0.0

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows