ligo/src/node_main.ml
Vincent Bernardoff 6d41b3d38c Shell: Improve the CLI of tezos-node
* Use subcommands:
  * `tezos_node run`
  * `tezos_node config`
  * `tezos_node identity`
* Regroup all on-disk data in `--data-dir`
* Split `Node_main` in multiple files.
* Add DNS resolution for `--net-addr` and `--rpc-addr`
* Hardcode `bootstrap.tezos.com` as bootstrap peer(s)
* Add `--no-bootstrap-peers`
* Rename `--expected-connections` -> `--connections`
2017-02-15 15:26:17 +01:00

44 lines
1.4 KiB
OCaml

(**************************************************************************)
(* *)
(* Copyright (c) 2014 - 2016. *)
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
let term =
let open Cmdliner.Term in
ret (const (`Help (`Pager, None)))
let description = [
`S "DESCRIPTION" ;
`P "Entry point for initializing, configuring and running a Tezos node." ;
`P Node_identity_command.Manpage.command_description ;
`P Node_run_command.Manpage.command_description ;
`P Node_config_command.Manpage.command_description ;
]
let man =
description @
Node_run_command.Manpage.examples
let info =
Cmdliner.Term.info
~doc:"The Tezos node"
~man
"tezos-node"
let commands = [
Node_run_command.cmd ;
Node_config_command.cmd ;
Node_identity_command.cmd ;
]
let () =
match Cmdliner.Term.eval_choice (term, info) commands with
| `Error _ -> exit 1
| `Help -> exit 0
| `Version -> exit 1
| `Ok () -> exit 0