# Recommendations to create a CLI tool

**URL:** https://discuss.ocaml.org/t/recommendations-to-create-a-cli-tool/9928
**Category:** Learning
**Created:** [May 28, 2022, 5:05pm UTC](https://discuss.ocaml.org/t/recommendations-to-create-a-cli-tool/9928 "2022-05-28T17:05:13Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![user1](https://avatars.discourse-cdn.com/v4/letter/u/5daacb/32.png) [@user1](https://discuss.ocaml.org/u/user1)
#### Post date: [May 28, 2022, 8:45pm UTC](https://discuss.ocaml.org/t/recommendations-to-create-a-cli-tool/9928/7 "2022-05-28T20:45:38Z")

</div>

I asked a similar question recently at [Parsing one's own command line](https://discuss.ocaml.org/t/parsing-ones-own-command-line/9756) (at least for one of the bricks you envision). Some answers there may help. Actually, Cmdliner can parse not only the command line, but any `string array`: see the documentation for the argument `argv` in

```auto
val eval : ?help:Stdlib.Format.formatter -> ?err:Stdlib.Format.formatter ->
 ?catch:bool -> ?env:(string -> string option) -> ?argv:string array ->
 ?term_err:Exit.code -> unit t -> Exit.code

```

I’d recommend to read some code of similar projects, and I’d like to do so myself, but I haven’t found many. I looked at the way the interface of `utop` was coded, to get some inspiration.

---

_[View the full topic](https://discuss.ocaml.org/t/recommendations-to-create-a-cli-tool/9928)._
