@@ -21,6 +21,10 @@ pub struct Cli {
2121 #[ arg( long, short, global = true ) ]
2222 pub environment : Option < String > ,
2323
24+ /// Cookie jar ID to use when sending requests
25+ #[ arg( long = "cookie-jar" , global = true , value_name = "COOKIE_JAR_ID" ) ]
26+ pub cookie_jar : Option < String > ,
27+
2428 /// Enable verbose send output (events and streamed response body)
2529 #[ arg( long, short, global = true ) ]
2630 pub verbose : bool ,
@@ -58,6 +62,9 @@ pub enum Commands {
5862 /// Send a request, folder, or workspace by ID
5963 Send ( SendArgs ) ,
6064
65+ /// Cookie jar commands
66+ CookieJar ( CookieJarArgs ) ,
67+
6168 /// Workspace commands
6269 Workspace ( WorkspaceArgs ) ,
6370
@@ -85,6 +92,22 @@ pub struct SendArgs {
8592 pub fail_fast : bool ,
8693}
8794
95+ #[ derive( Args ) ]
96+ #[ command( disable_help_subcommand = true ) ]
97+ pub struct CookieJarArgs {
98+ #[ command( subcommand) ]
99+ pub command : CookieJarCommands ,
100+ }
101+
102+ #[ derive( Subcommand ) ]
103+ pub enum CookieJarCommands {
104+ /// List cookie jars in a workspace
105+ List {
106+ /// Workspace ID (optional when exactly one workspace exists)
107+ workspace_id : Option < String > ,
108+ } ,
109+ }
110+
88111#[ derive( Args ) ]
89112#[ command( disable_help_subcommand = true ) ]
90113pub struct WorkspaceArgs {
@@ -158,8 +181,8 @@ pub struct RequestArgs {
158181pub enum RequestCommands {
159182 /// List requests in a workspace
160183 List {
161- /// Workspace ID
162- workspace_id : String ,
184+ /// Workspace ID (optional when exactly one workspace exists)
185+ workspace_id : Option < String > ,
163186 } ,
164187
165188 /// Show a request as JSON
@@ -267,8 +290,8 @@ pub struct FolderArgs {
267290pub enum FolderCommands {
268291 /// List folders in a workspace
269292 List {
270- /// Workspace ID
271- workspace_id : String ,
293+ /// Workspace ID (optional when exactly one workspace exists)
294+ workspace_id : Option < String > ,
272295 } ,
273296
274297 /// Show a folder as JSON
@@ -324,8 +347,8 @@ pub struct EnvironmentArgs {
324347pub enum EnvironmentCommands {
325348 /// List environments in a workspace
326349 List {
327- /// Workspace ID
328- workspace_id : String ,
350+ /// Workspace ID (optional when exactly one workspace exists)
351+ workspace_id : Option < String > ,
329352 } ,
330353
331354 /// Output JSON schema for environment create/update payloads
@@ -421,6 +444,9 @@ pub enum PluginCommands {
421444 /// Generate a "Hello World" Yaak plugin
422445 Generate ( GenerateArgs ) ,
423446
447+ /// Install a plugin from a local directory or from the registry
448+ Install ( InstallPluginArgs ) ,
449+
424450 /// Publish a Yaak plugin version to the plugin registry
425451 Publish ( PluginPathArg ) ,
426452}
@@ -441,3 +467,9 @@ pub struct GenerateArgs {
441467 #[ arg( long) ]
442468 pub dir : Option < PathBuf > ,
443469}
470+
471+ #[ derive( Args , Clone ) ]
472+ pub struct InstallPluginArgs {
473+ /// Local plugin directory path, or registry plugin spec (@org/plugin[@version])
474+ pub source : String ,
475+ }
0 commit comments