# Ex\_doc CLI use problem

**URL:** <https://forum.elixirforum.com/t/ex-doc-cli-use-problem/1787>\
**Category:** Discussions\
**Created:** [September 26, 2016, 5:49pm UTC](https://forum.elixirforum.com/t/ex-doc-cli-use-problem/1787 "2016-09-26T17:49:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anli](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/47e85d/32.png) [@anli](https://forum.elixirforum.com/u/anli)\
**Post date:** [September 26, 2016, 5:49pm UTC](https://forum.elixirforum.com/t/ex-doc-cli-use-problem/1787/1 "2016-09-26T17:49:16Z")

</div>

Hi! I try to follow ex\_doc README - the part of CLI using. So I have cloned ex\_doc and ecto. After compiling of both apps I try to generate a doc:

```
$ ../ex_doc/bin/ex_doc "Ecto" "master" _build/shared/lib/ecto/ebin/
** (FunctionClauseError) no function clause matching in Keyword.keys/1
    (elixir) lib/keyword.ex:373: Keyword.keys(nil)
    lib/ex_doc/retriever.ex:398: anonymous fn/2 in ExDoc.Retriever.get_impls/1
    (elixir) lib/enum.ex:1623: Enum."-reduce/3-lists^foldl/2-0-"/3
    lib/ex_doc/retriever.ex:149: ExDoc.Retriever.generate_node/3
    (elixir) lib/enum.ex:1184: Enum."-map/2-lists^map/1-0-"/2
    (elixir) lib/enum.ex:1184: Enum."-map/2-lists^map/1-0-"/2
    lib/ex_doc/retriever.ex:101: ExDoc.Retriever.docs_from_modules/2
    lib/ex_doc.ex:68: ExDoc.generate_docs/3

```

Where to go further to get thing done?

---

<div class="post-metadata">

**Author:** ![josevalim](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/32/1787_2.png) [@josevalim](https://forum.elixirforum.com/u/josevalim)\
**Post date:** [September 26, 2016, 7:06pm UTC](https://forum.elixirforum.com/t/ex-doc-cli-use-problem/1787/2 "2016-09-26T19:06:16Z")

</div>

Try running `MIX_ENV=docs mix docs` for generating docs inside the Ecto project. I will investigate why your particular invocation does not work.

---

<div class="post-metadata">

**Author:** ![anli](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/47e85d/32.png) [@anli](https://forum.elixirforum.com/u/anli)\
**Post date:** [September 26, 2016, 7:21pm UTC](https://forum.elixirforum.com/t/ex-doc-cli-use-problem/1787/3 "2016-09-26T19:21:55Z")

</div>

The commands ends up without any problems:

```
$ MIX_ENV=docs mix docs
==> earmark
Compiling 1 file (.erl)
Compiling 16 files (.ex)
warning: variable pending_lnb is unused
  lib/earmark/helpers/lookahead_helpers.ex:34

warning: unused import Earmark.Helpers.StringHelpers
  lib/earmark/helpers/lookahead_helpers.ex:7

Generated earmark app
==> ex_doc
Compiling 12 files (.ex)
Generated ex_doc app
==> inch_ex
Compiling 15 files (.ex)
Generated inch_ex app
==> ecto
Compiling 67 files (.ex)
Generated ecto app
Docs successfully generated.
View them at "doc/index.html".

```

Probably I must clarify my initial intention. I have tried to use CLI with the aim to check EPUB formatter.

---

<div class="post-metadata">

**Author:** ![anli](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/47e85d/32.png) [@anli](https://forum.elixirforum.com/u/anli)\
**Post date:** [September 27, 2016, 10:58pm UTC](https://forum.elixirforum.com/t/ex-doc-cli-use-problem/1787/4 "2016-09-27T22:58:23Z")

</div>

I guess I must inform the current ex\_doc version (master HEAD) does work for me - have generated docs (EPUB also) for Ecto and Plug from CLI.
