# Access package documentation in REPL

**URL:** <https://discourse.julialang.org/t/access-package-documentation-in-repl/51262>\
**Category:** General Usage\
**Tags:** question\
**Created:** [December 4, 2020, 4:44pm UTC](https://discourse.julialang.org/t/access-package-documentation-in-repl/51262 "2020-12-04T16:44:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![devel-chm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devel-chm/32/3572_2.png) [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Post date:** [December 4, 2020, 4:44pm UTC](https://discourse.julialang.org/t/access-package-documentation-in-repl/51262/1 "2020-12-04T16:44:26Z")

</div>

Is there some way to view the package documentation from the REPL? If I use the help mode I get the following for an example:

> julia\> using TimeSeries  
> [Info: Precompiling TimeSeries [9e3dc215-6440-5c97-bce1-76c03772f85e]
> 
> help?\> TimeSeries  
> search: TimeSeries AbstractTimeSeries
> 
> No documentation found.
> 
> No docstring found for module TimeSeries.

It seems that the packages/ folder in the .julia/ folder includes the source for the documentation for all packages. Is there a way to generate a locally viewable copy of the documentation?

Another thing that would be nice is the ability to view and search all the packages added to your .julia. Of specific utility would be showing the package corresponding to various methods so that you could select the package docs rather than getting the few lines of description of a method that give little context to what, where, or how it is to be used.

I’m still new to Julia so it is possible I’ve missed how to do this. It would be a nice feature to have and would improve the discoverability of Julia functionality.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 6, 2020, 10:22am UTC](https://discourse.julialang.org/t/access-package-documentation-in-repl/51262/2 "2020-12-06T10:22:44Z")

</div>

> [@devel-chm](#):
>
> Is there some way to view the package documentation from the REPL?

You can access [docstrings](https://docs.julialang.org/en/v1/manual/documentation/) with `?` — while packages are encouraged to provide one for modules, they may not have got around to it.

> [@devel-chm](#):
>
> Is there a way to generate a locally viewable copy of the documentation?

You can `pkg> dev` the package (this is needed as package directories may be read only), and run the `make.jl` in the docs directory. See [the docs](https://juliadocs.github.io/Documenter.jl/dev/man/guide/#Building-an-Empty-Document).

> [@devel-chm](#):
>
> Another thing that would be nice is the ability to view and search all the packages added to your .julia.

This would be nice, but would also require an indexed database to be built and updated locally. I recommend grep-like a tool like

> **[GitHub - BurntSushi/ripgrep: ripgrep recursively searches directories for a...](https://github.com/BurntSushi/ripgrep)**
>
> ripgrep recursively searches directories for a regex pattern while respecting your gitignore - GitHub - BurntSushi/ripgrep: ripgrep recursively searches directories for a regex pattern while respec...

or just

[https://juliahub.com/ui/index.html](https://juliahub.com/ui/index.html)

---

<div class="post-metadata">

**Author:** ![devel-chm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devel-chm/32/3572_2.png) [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Post date:** [December 6, 2020, 10:19pm UTC](https://discourse.julialang.org/t/access-package-documentation-in-repl/51262/3 "2020-12-06T22:19:50Z")

</div>

> You can access [docstrings](https://docs.julialang.org/en/v1/manual/documentation/) with `?` — while packages are encouraged to provide one for modules, they may not have got around to it.

How does on document a module with docstrings? I found documentation for functions, methods, types,… but nothing for modules.

I’ve been using juliahub to find the online documentation for packages but options for smarter/more-global package documentation in the REPL is limited by the lack of any such documentation. Even something as simple as a minimal module/package documentation with just the link to the online documentation would be a huge improvement in discoverability and accessibility of documentation.

Thanks for your reply and tips about manual build of a local copy of documentation.

---

<div class="post-metadata">

**Author:** ![ianshmean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ianshmean/32/216042_2.png) [@ianshmean](https://discourse.julialang.org/u/ianshmean)\
**Post date:** [December 7, 2020, 12:04am UTC](https://discourse.julialang.org/t/access-package-documentation-in-repl/51262/4 "2020-12-07T00:04:40Z")

</div>

Docstrings can be for modules too. It’s actually a really useful feature that more packages should have.

Thanks to @tim.holy, VideoIO now has one with a few pointers.

[https://github.com/JuliaIO/VideoIO.jl/blob/fadad30fb24bd18bf78d22c3ce578af5806f1c96/src/VideoIO.jl#L162](https://github.com/JuliaIO/VideoIO.jl/blob/fadad30fb24bd18bf78d22c3ce578af5806f1c96/src/VideoIO.jl#L162)

i.e. `? VideoIO`

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [December 7, 2020, 12:14am UTC](https://discourse.julialang.org/t/access-package-documentation-in-repl/51262/5 "2020-12-07T00:14:58Z")

</div>

100% agree. That looks like a very good example as well.

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [December 7, 2020, 1:05am UTC](https://discourse.julialang.org/t/access-package-documentation-in-repl/51262/6 "2020-12-07T01:05:31Z")

</div>

Every now and again we discuss having default docstrings for the main module of packages such that if they do not have explict docstrings thern the README.md is shown.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 7, 2020, 8:09am UTC](https://discourse.julialang.org/t/access-package-documentation-in-repl/51262/7 "2020-12-07T08:09:47Z")

</div>

I saw this trick for including the REAMDE as a docstring in @tkf’s packages:

> [@Plea to package developers regarding documentation!](https://discourse.julialang.org/t/plea-to-package-developers-regarding-documentation/37473/6):
>
> I usually put a badge like this [[GitHub commits since tagged version]](https://github.com/tkf/BangBang.jl) in README with [![GitHub commits since tagged version](https://img.shields.io/github/commits-since/USER/PACKAGE.jl/vX.Y.Z.svg?style=social&logo=github)](https://github.com/USER/PACKAGE.jl) and then use it as the docstring of the module by this one-linear @doc read(joinpath(dirname(@\_\_DIR\_\_), "README.md"), String) PACKAGE so that the badge is included in the documentation (e.g., [https://tkf.github.io/BangBang.jl/dev/#BangBa…](https://tkf.github.io/BangBang.jl/dev/#BangBang.BangBang)

---

<div class="post-metadata">

**Author:** ![ianshmean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ianshmean/32/216042_2.png) [@ianshmean](https://discourse.julialang.org/u/ianshmean)\
**Post date:** [January 5, 2021, 1:04am UTC](https://discourse.julialang.org/t/access-package-documentation-in-repl/51262/8 "2021-01-05T01:04:38Z")

</div>

> [@oxinabox](#):
>
> Every now and again we discuss having default docstrings for the main module of packages such that if they do not have explict docstrings thern the README.md is shown.

I PR’ed the basic idea [https://github.com/JuliaLang/julia/pull/39093](https://github.com/JuliaLang/julia/pull/39093)
