Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd: Implement a basic CLI app #17

Closed
8 tasks
renaynay opened this issue Aug 20, 2021 · 9 comments · Fixed by #97
Closed
8 tasks

cmd: Implement a basic CLI app #17

renaynay opened this issue Aug 20, 2021 · 9 comments · Fixed by #97
Assignees
Labels
area:config CLI and config

Comments

@renaynay
Copy link
Member

renaynay commented Aug 20, 2021

I recommend using cobra as the maintainer is directly affiliated with golang and is generally more active in maintenance as opposed to urfave/cli.

Requirements:

  • basic app that interacts with node binary that is able to initialise and start the node, among other commands
    • celestia light init
    • celestia light start
    • celestia full init
    • celestia full start
  • ability to take in config file passed in via --config flag on init
  • nice grouping / categorisation of flags according to area (e.g. all flags related specifically to light mode are grouped under command ./celestia light --help, as well as other issue areas beyond the node type like metrics, utils, etc.)

Nice to haves:

  • ascii art something cool :D maybe this:
  / ____/__  / /__  _____/ /_(_)___ _
 / /   / _ \/ / _ \/ ___/ __/ / __ `/
/ /___/  __/ /  __(__  ) /_/ / /_/ / 
\____/\___/_/\___/____/\__/_/\__,_/  ```
 

@renaynay renaynay added the area:config CLI and config label Aug 20, 2021
@Wondertan
Copy link
Member

Let's not call it node, but celestia-node or just celestia.

@Wondertan
Copy link
Member

Wondertan commented Aug 20, 2021

Well, also let's use cobra and viper...

@Wondertan
Copy link
Member

Btw, remove the random 'todo' guy you mentioned.

@liamsi

This comment has been minimized.

@Wondertan
Copy link
Member

@liamsi, yep. Almost hit enter and the page update with the edit ;)

@Wondertan
Copy link
Member

@renaynay, @liamsi

IMO, we should have two different binaries for light and full nodes, e.g.

celestia-light
celestia-full

WDYT?

@Wondertan
Copy link
Member

Also, instead of bin start let's use a more common bin daemon.

@renaynay
Copy link
Member Author

I am against it. Will be more annoying to maintain and I would like people to think of celestia as the node and then initialise it in either full or light mode. I also am not in favour of bin daemon. It is not more common, especially for blockchain nodes. It's always bin init, bin start. Let's not deviate too much or else we risk confusing average users.

@liamsi
Copy link
Member

liamsi commented Aug 26, 2021

I'm also in favor of one binary for now. At least I do not see any good reasons for multiple binaries.

I don't think it matters much if the sub-command is called any of run, start, daemon (we could also support aliases if you want: https://github.com/tendermint/tendermint/blob/58a6cfff9a3e370e1bb5eabfd86091e0b1186a22/cmd/tendermint/commands/run_node.go#L104-L105).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:config CLI and config
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants