Skip to content

Commit 49421d7

Browse files
Merge branch 'feature/cli'
2 parents f18ad6a + dcc02a5 commit 49421d7

6 files changed

Lines changed: 340 additions & 0 deletions

File tree

cli/Cargo.lock

Lines changed: 282 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[package]
2+
name = "cli"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
clap = { version = "4.5.38", features = ["derive"] }
8+
tracing = "0.1.41"

cli/src/essential.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub fn update_cli() {
2+
println!("Updating CortexFlow CLI");
3+
println!("Looking for a newer version");
4+
}
5+
pub fn info() {}

cli/src/install.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
pub fn install_cortexflow() {
2+
println!("Preparing cortexflow installation");
3+
println!("🛸 Copying kubernetes manifests as temporary files");
4+
/* copying the files */
5+
6+
println!("🛸 creating cortexflow namespace");
7+
/* create the namespace */
8+
println!("🛸 installing cert manager");
9+
/* install cert manager */
10+
println!("🛸 installing cortexflow components");
11+
/* install the components */
12+
println!("🛸 creating the issuer");
13+
println!("🛸 caBundle certificate");
14+
println!("🛸 tls.key code");
15+
println!("🛸 tls.cert code");
16+
/* return the codes and automatically isntall the proxy injector */
17+
println!("🛸 Removing temporary files");
18+
/* remove all the installation files */
19+
println!("🛸 installation completed");
20+
}

cli/src/main.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
mod essential;
2+
mod install;
3+
4+
use clap::{Arg, Parser, Subcommand};
5+
6+
#[derive(Parser)]
7+
#[command(author="CortexFlow",version="0.1",about=None,long_about=None)]
8+
struct Args {
9+
name: String,
10+
}
11+
enum Commands {
12+
/* continue from here */
13+
Install(String),
14+
Update(String),
15+
}
16+
fn args_parser() {
17+
let args = Args::parse();
18+
println!("Arguments {:?}", args.name);
19+
}
20+
21+
fn main() {
22+
args_parser();
23+
}

cli/src/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub mod essential;
2+
pub mod install;

0 commit comments

Comments
 (0)