oseda_cli/lib.rs
1use clap::{Parser, Subcommand};
2
3pub mod cmd;
4pub mod color;
5pub mod config;
6pub mod github;
7pub mod license;
8pub mod net;
9pub mod puppeteer;
10pub mod tags;
11pub mod templates;
12
13/// Oseda Project scafolding CLI
14#[derive(Parser)]
15#[command(name = "oseda")]
16#[command(version)]
17#[command(about = "oseda project scafolding CLI", long_about = None)]
18#[command(author = "oseda.net")]
19pub struct Cli {
20 /// The subcommand to run
21 #[command(subcommand)]
22 pub command: Commands,
23}
24
25/// Oseda subcommand, represents an action to take on your Oseda project
26#[derive(Subcommand)]
27pub enum Commands {
28 /// Initialize a new Oseda project in the working directory
29 Init(cmd::init::InitOptions),
30 /// Run the Oseda project in the working directory
31 Run,
32 /// Check the Oseda project in the working directory for common errors
33 Check(cmd::check::CheckOptions),
34 /// Deploy your Oseda project to github to add to oseda.net
35 Deploy(cmd::deploy::DeployOptions),
36 /// Fork the library repository to submit your course
37 Fork,
38 /// Export the Oseda project to a PDF file
39 /// This will install the npm package `decktape`
40 /// This relies on a chromium backend, as a result, it may take a while to run
41 Export(cmd::export::ExportOptions),
42 /// Update the oseda binary from crates.io
43 Update,
44 /// Run an Oseda project in dev mode, with hot-reloading
45 Dev(cmd::dev::DevOptions),
46}