sesterce-cli
Version:
A powerful command-line interface tool for managing Sesterce Cloud services. Sesterce CLI provides easy access to GPU cloud instances, AI inference services, container registries, and SSH key management directly from your terminal.
85 lines (74 loc) • 4.47 kB
text/typescript
import { Command } from "commander";
import { createAIInferenceHardwaresCommand } from "./ai-inference/hardwares";
import { createAIInferenceInstanceDeleteCommand } from "./ai-inference/instance/delete";
import { createAIInferenceInstanceDetailsCommand } from "./ai-inference/instance/details";
import { createAIInferenceInstanceLaunchCommand } from "./ai-inference/instance/launch";
import { createAIInferenceInstanceListCommand } from "./ai-inference/instance/list";
import { createAIInferenceInstanceStartCommand } from "./ai-inference/instance/start";
import { createAIInferenceInstanceStopCommand } from "./ai-inference/instance/stop";
import { createAIInferenceInstanceUpdateCommand } from "./ai-inference/instance/update";
import { createAIInferenceModelsCommand } from "./ai-inference/models";
import { createAIInferenceRegionsCommand } from "./ai-inference/regions";
import { createGpuCloudInstanceDeleteCommand } from "./gpu-cloud/instance/delete";
import { createGpuCloudInstanceDetailsCommand } from "./gpu-cloud/instance/details";
import { createGpuCloudInstanceLaunchCommand } from "./gpu-cloud/instance/launch";
import { createGpuCloudInstanceListCommand } from "./gpu-cloud/instance/list";
import { createGpuCloudInstanceOffersCommand } from "./gpu-cloud/instance/offers";
import { createGpuCloudVolumeCreateCommand } from "./gpu-cloud/volume/create";
import { createGpuCloudVolumeDeleteCommand } from "./gpu-cloud/volume/delete";
import { createGpuCloudVolumeListCommand } from "./gpu-cloud/volume/list";
import { createGpuCloudVolumeOffersCommand } from "./gpu-cloud/volume/offers";
import { createRegistryCreateCommand } from "./registry/create";
import { createRegistryDeleteCommand } from "./registry/delete";
import { createRegistryListCommand } from "./registry/list";
import { createRegistryUpdateCommand } from "./registry/update";
import { createSSHKeyCreateCommand } from "./ssh-key/create";
import { createSSHKeyDeleteCommand } from "./ssh-key/delete";
import { createSSHKeyListCommand } from "./ssh-key/list";
import { createSSHKeyMakeDefaultCommand } from "./ssh-key/make-default";
export function createCommands(program: Command) {
// SSH Key commands
const sshKeyCommand = program.command("ssh-key");
createSSHKeyListCommand(sshKeyCommand);
createSSHKeyCreateCommand(sshKeyCommand);
createSSHKeyMakeDefaultCommand(sshKeyCommand);
createSSHKeyDeleteCommand(sshKeyCommand);
// Registry commands
const registryCommand = program.command("registry");
createRegistryCreateCommand(registryCommand);
createRegistryListCommand(registryCommand);
createRegistryUpdateCommand(registryCommand);
createRegistryDeleteCommand(registryCommand);
// GPU Cloud
const gpuCloudCommand = program.command("gpu-cloud");
// GPU Cloud Instance commands
const gpuCloudInstanceCommand = gpuCloudCommand.command("instance");
createGpuCloudInstanceOffersCommand(gpuCloudInstanceCommand);
createGpuCloudInstanceLaunchCommand(gpuCloudInstanceCommand);
createGpuCloudInstanceListCommand(gpuCloudInstanceCommand);
createGpuCloudInstanceDetailsCommand(gpuCloudInstanceCommand);
createGpuCloudInstanceDeleteCommand(gpuCloudInstanceCommand);
// GPU Cloud Volume commands
const gpuCloudVolumeCommand = gpuCloudCommand.command("volume");
createGpuCloudVolumeOffersCommand(gpuCloudVolumeCommand);
createGpuCloudVolumeCreateCommand(gpuCloudVolumeCommand);
createGpuCloudVolumeListCommand(gpuCloudVolumeCommand);
createGpuCloudVolumeDeleteCommand(gpuCloudVolumeCommand);
// AI Inference
const aiInferenceCommand = program.command("ai-inference");
// AI Inference Model commands
createAIInferenceModelsCommand(aiInferenceCommand);
// AI Inference Hardware commands
createAIInferenceHardwaresCommand(aiInferenceCommand);
// AI Inference Region commands
createAIInferenceRegionsCommand(aiInferenceCommand);
// AI Inference Instance commands
const aiInferenceInstanceCommand = aiInferenceCommand.command("instance");
createAIInferenceInstanceLaunchCommand(aiInferenceInstanceCommand);
createAIInferenceInstanceListCommand(aiInferenceInstanceCommand);
createAIInferenceInstanceDeleteCommand(aiInferenceInstanceCommand);
createAIInferenceInstanceStartCommand(aiInferenceInstanceCommand);
createAIInferenceInstanceStopCommand(aiInferenceInstanceCommand);
createAIInferenceInstanceUpdateCommand(aiInferenceInstanceCommand);
createAIInferenceInstanceDetailsCommand(aiInferenceInstanceCommand);
}