This repository has been archived by the owner on Sep 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initializing cli for node initing and running
- Loading branch information
Showing
2 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
use clap::*; | ||
|
||
fn main() { | ||
println!("Hello, world!"); | ||
let init_command = command!() | ||
.name("init") | ||
.about("Initializing a Redvin node.") | ||
.arg( | ||
Arg::new("working-directory") | ||
.long("working-directory") | ||
.short('w') | ||
.help("Working directory is the path for saving relay, peers data and some other stuff for managing node.") | ||
.aliases(["workdir", "wdir", "workingdirectory", "workingdir", "wdirectory"]) | ||
.required(true) | ||
); | ||
|
||
let start_command = command!() | ||
.name("start") | ||
.about("Starting a Redvin instance by passing a working directory."); | ||
|
||
let _root_command = command!() | ||
.about("Redvin is an IPNN implementation in rust, helping to build decentralized future.") | ||
.subcommand(init_command) | ||
.subcommand(start_command) | ||
.get_matches(); | ||
} |