diff options
Diffstat (limited to 'crates/typst-cli/src/args.rs')
| -rw-r--r-- | crates/typst-cli/src/args.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/typst-cli/src/args.rs b/crates/typst-cli/src/args.rs index 973eea8b..71cbf515 100644 --- a/crates/typst-cli/src/args.rs +++ b/crates/typst-cli/src/args.rs @@ -46,6 +46,9 @@ pub enum Command { #[command(visible_alias = "w")] Watch(CompileCommand), + /// Initializes a new project from a template + Init(InitCommand), + /// Processes an input file to extract provided metadata Query(QueryCommand), @@ -89,6 +92,21 @@ pub struct CompileCommand { pub timings: Option<Option<PathBuf>>, } +/// Initializes a new project from a template +#[derive(Debug, Clone, Parser)] +pub struct InitCommand { + /// The template to use, e.g. `@preview/charged-ieee` + /// + /// You can specify the version by appending e.g. `:0.1.0`. If no version is + /// specified, Typst will default to the latest version. + /// + /// Supports both local and published templates. + pub template: String, + + /// The project directory, defaults to the template's name + pub dir: Option<String>, +} + /// Processes an input file to extract provided metadata #[derive(Debug, Clone, Parser)] pub struct QueryCommand { |
