1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(
name = "partiri",
version,
about = "Deploy and manage services on Partiri Cloud",
long_about = None,
)]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
}
#[derive(Subcommand)]
pub enum Commands {
/// Configure your Partiri API key
Auth,
/// Run the interactive setup wizard and create .partiri.jsonc
Init,
/// Validate the local .partiri.jsonc config file
Validate,
/// Service management
#[command(subcommand)]
Service(ServiceCommands),
/// Project management
#[command(subcommand)]
Projects(ProjectCommands),
/// Workspace management
#[command(subcommand)]
Workspaces(WorkspaceCommands),
/// Install or remove the Partiri MCP server in AI tools
#[command(subcommand)]
Mcp(McpCommands),
}
#[derive(Subcommand)]
pub enum McpCommands {
/// Install the Partiri MCP server into an AI tool
Install {
/// Target client (claude-desktop, claude-code, cursor, vscode, copilot-cli, windsurf)
#[arg(long)]
client: Option<String>,
},
/// Remove the Partiri MCP server from an AI tool
Uninstall {
/// Target client (claude-desktop, claude-code, cursor, vscode, copilot-cli, windsurf)
#[arg(long)]
client: Option<String>,
},
}
#[derive(Subcommand)]
pub enum ServiceCommands {
/// Register the service on Partiri and update .partiri.jsonc
Create,
/// Pull an existing service and save it as .partiri.jsonc
Pull,
/// Push local config changes to the existing service
Push,
/// Show current service metrics and recent jobs
Metrics,
/// Show the last 35 log lines from the past hour
Logs,
/// List jobs for this service
Jobs,
/// Trigger a deploy job
Deploy,
/// Pause the service
Pause,
/// Resume a paused service
Unpause,
/// Kill the service (requires confirmation)
Kill,
/// Fill in workspace, project, region and pod UUIDs interactively
Link,
/// Link an authentication token to this service (for private repositories or registries)
Token,
}
#[derive(Subcommand)]
pub enum ProjectCommands {
/// List all projects in a workspace
List,
/// Create a new project in a workspace
Create,
}
#[derive(Subcommand)]
pub enum WorkspaceCommands {
/// List all workspaces
List,
}