Add CLI import and export commands (#484)

This commit is contained in:
Gregory Schier
2026-06-29 11:43:20 -07:00
committed by GitHub
parent 9ffd8d4810
commit 18b983bfe5
15 changed files with 592 additions and 126 deletions
+17
View File
@@ -37,6 +37,23 @@ async fn main() {
let exit_code = match command {
Commands::Auth(args) => commands::auth::run(args).await,
Commands::Import(args) => {
let mut context = CliContext::new(data_dir.clone(), app_id);
let execution_context = CliExecutionContext {
workspace_id: args.workspace_id.clone(),
..CliExecutionContext::default()
};
context.init_plugins(execution_context).await;
let exit_code = commands::import_export::run_import(&context, args).await;
context.shutdown().await;
exit_code
}
Commands::Export(args) => {
let context = CliContext::new(data_dir.clone(), app_id);
let exit_code = commands::import_export::run_export(&context, args);
context.shutdown().await;
exit_code
}
Commands::Plugin(args) => match args.command {
PluginCommands::Build(args) => commands::plugin::run_build(args).await,
PluginCommands::Dev(args) => commands::plugin::run_dev(args).await,