pub mod add;
pub mod build;
pub mod deploy;
pub mod dev;
pub mod init;
pub mod queue;
use clap::{Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser)]
#[command(name = "forte")]
#[command(about = "Forte - Fullstack Framework", long_about = None)]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
}
#[derive(Subcommand)]
pub enum Commands {
Dev {
#[arg(short, long)]
project: Option<PathBuf>,
#[arg(short = 'P', long)]
port: Option<u16>,
},
Init {
name: String,
},
Add {
#[command(subcommand)]
command: AddCommands,
},
Deploy {
#[arg(short, long)]
project: Option<PathBuf>,
#[arg(long)]
build_on_remote: Option<String>,
},
Queue {
#[command(subcommand)]
command: QueueCommands,
},
}
#[derive(Subcommand)]
pub enum QueueCommands {
Flush {
#[arg(short, long)]
project: Option<PathBuf>,
#[arg(short, long)]
task_name: Option<String>,
},
}
#[derive(Subcommand)]
pub enum AddCommands {
Page {
path: String,
},
Action {
path: String,
},
}