diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f049e58..c92dd15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: id: release with: release-type: go - package-name: runpod + package-name: runpodctl pull-request-title-pattern: release${component} ${version} - uses: actions/checkout@v2 @@ -30,10 +30,10 @@ jobs: - name: build if: ${{ steps.release.outputs.release_created }} run: | - env GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpod-linux-amd64 . - env GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpod-darwin-amd64 . - env GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpod-darwin-arm64 . - env GOOS=windows GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpod-windows-amd64.exe . + env GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-linux-amd64 . + env GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-darwin-amd64 . + env GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-darwin-arm64 . + env GOOS=windows GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-windows-amd64.exe . - name: upload linux amd64 release binary if: ${{ steps.release.outputs.release_created }} @@ -42,8 +42,8 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: bin/runpod-linux-amd64 - asset_name: runpod-linux-amd64 + asset_path: bin/runpodctl-linux-amd64 + asset_name: runpodctl-linux-amd64 asset_content_type: application/octet-stream - name: upload darwin amd64 release binary @@ -53,8 +53,8 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: bin/runpod-darwin-amd64 - asset_name: runpod-darwin-amd64 + asset_path: bin/runpodctl-darwin-amd64 + asset_name: runpodctl-darwin-amd64 asset_content_type: application/octet-stream - name: upload darwin arm64 release binary @@ -64,8 +64,8 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: bin/runpod-darwin-arm64 - asset_name: runpod-darwin-arm64 + asset_path: bin/runpodctl-darwin-arm64 + asset_name: runpodctl-darwin-arm64 asset_content_type: application/octet-stream - name: upload windows amd64 release binary @@ -75,6 +75,6 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: bin/runpod-windows-amd64.exe - asset_name: runpod-windows-amd64.exe + asset_path: bin/runpodctl-windows-amd64.exe + asset_name: runpodctl-windows-amd64.exe asset_content_type: application/octet-stream diff --git a/README.md b/README.md index aa29d65..17e0c61 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ # RunPod CLI -The CLI tool to automate / manage GPU pods for [runpod.io](https://runpod.io). +runpodctl is the CLI tool to automate / manage GPU pods for [runpod.io](https://runpod.io). -*Note: All pods automatically come with runpod cli installed with a pod-scoped API key.* +*Note: All pods automatically come with runpodctl installed with a pod-scoped API key.* @@ -40,27 +40,27 @@ wget cli.runpod.net | sudo bash ```bash # Using homebrew -brew tap runpod/runpod -brew install runpod +brew tap runpod/runpodctl +brew install runpodctl ``` #### Windows PowerShell ```powershell -wget https://github.com/runpod/runpodctl/releases/download/v1.9.0/runpod-windows-amd64.exe -O runpod.exe +wget https://github.com/runpod/runpodctl/releases/download/v1.9.0/runpodctl-windows-amd64.exe -O runpodctl.exe ``` ## Tutorial -Please checkout this [video tutorial](https://www.youtube.com/watch?v=QN1vdGhjcRc) for a detailed walkthrough of runpod cli. +Please checkout this [video tutorial](https://www.youtube.com/watch?v=QN1vdGhjcRc) for a detailed walkthrough of runpodctl. **Video Chapters:** -- [Installing the latest version of RunPod CLI](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=1384s) +- [Installing the latest version of runpodctl](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=1384s) - [Uploading large datasets](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2068s) - [File transfers from PC to RunPod](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2106s) - [Downloading folders from RunPod](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2549s) -- [Adding RunPod CLI to your environment path](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2589s) +- [Adding runpodctl to your environment path](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2589s) - [Downloading model files](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=4871s) ## Transferring Data (file send/receive) @@ -72,7 +72,7 @@ Run the following on the computer that has the file you want to send ### To send a file ```bash -runpod send data.txt +runpodctl send data.txt ``` *Example output:* @@ -82,13 +82,13 @@ Sending 'data.txt' (5 B) Code is: 8338-galileo-collect-fidel On the other computer run -runpod receive 8338-galileo-collect-fidel +runpodctl receive 8338-galileo-collect-fidel ``` ### To receive a file ```bash -runpod receive 8338-galileo-collect-fidel +runpodctl receive 8338-galileo-collect-fidel ``` *Example output:* @@ -114,23 +114,23 @@ Before using pod commands, configure the API key obtained from your [RunPod acco ```bash # configure API key -runpod config --apiKey={key} +runpodctl config --apiKey={key} # Get all pods -runpod get pod +runpodctl get pod # Get a pod -runpod get pod {podId} +runpodctl get pod {podId} # Start an ondemand pod. -runpod start pod {podId} +runpodctl start pod {podId} # Start a spot pod with bid. # The bid price you set is the price you will pay if not outbid: -runpod start pod {podId} --bid=0.3 +runpodctl start pod {podId} --bid=0.3 # Stop a pod -runpod stop pod {podId} +runpodctl stop pod {podId} ``` For a comprehensive list of commands, visit [RunPod CLI documentation](doc/runpod.md). diff --git a/cmd/croc/croc.go b/cmd/croc/croc.go index 66a4f40..906431e 100644 --- a/cmd/croc/croc.go +++ b/cmd/croc/croc.go @@ -520,7 +520,7 @@ func (c *Client) Send(filesInfo []FileInfo, emptyFoldersToTransfer []FileInfo, t return } flags := &strings.Builder{} - fmt.Fprintf(os.Stderr, "Code is: %[1]s\nOn the other computer run\n\nrunpod receive %[2]s%[1]s\n", c.Options.SharedSecret, flags.String()) + fmt.Fprintf(os.Stderr, "Code is: %[1]s\nOn the other computer run\n\nrunpodctl receive %[2]s%[1]s\n", c.Options.SharedSecret, flags.String()) if c.Options.Ask { machid, _ := machineid.ID() fmt.Fprintf(os.Stderr, "\rYour machine ID is '%s'\n", machid) diff --git a/cmd/project/exampleDockerfile b/cmd/project/exampleDockerfile index 8bfa700..2bf9428 100644 --- a/cmd/project/exampleDockerfile +++ b/cmd/project/exampleDockerfile @@ -1,4 +1,4 @@ -# AUTOGENERATED Dockerfile using RunPod CLI project build +# AUTOGENERATED Dockerfile using runpodctl project build # Base image -> https://github.com/runpod/containers/blob/main/official-templates/base/Dockerfile # DockerHub -> https://hub.docker.com/r/runpod/base/tags diff --git a/cmd/project/project.go b/cmd/project/project.go index 6437d81..6139833 100644 --- a/cmd/project/project.go +++ b/cmd/project/project.go @@ -162,7 +162,7 @@ Project Summary: pythonVersion, modelType, modelName, initCurrentDir) fmt.Printf("Project %s created successfully!", projectName) fmt.Println() - fmt.Println("From your project root run `runpod project dev` to start a development pod.") + fmt.Println("From your project root run `runpodctl project dev` to start a development pod.") }, } @@ -228,7 +228,7 @@ var BuildProjectCmd = &cobra.Command{ Use: "build", Args: cobra.ExactArgs(0), Short: "build Dockerfile for current project", - Long: "build a Dockerfile for the Runpod project in the current folder", + Long: "build a Dockerfile for the RunPod project in the current folder", Run: func(cmd *cobra.Command, args []string) { buildProjectDockerfile() // config := loadProjectConfig() diff --git a/cmd/root.go b/cmd/root.go index cbbfda7..3c6c241 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -15,8 +15,8 @@ var version string // rootCmd represents the base command when called without any subcommands var RootCmd = &cobra.Command{ - Use: "runpod", - Aliases: []string{"runpodctl"}, + Use: "runpodctl", + Aliases: []string{"runpod"}, Short: "CLI for runpod.io", Long: "CLI tool to manage your pods for runpod.io", } @@ -73,7 +73,7 @@ func initConfig() { fmt.Println("Runpod config location has moved from ~/.runpod.yaml to ~/.runpod/config.toml") fmt.Println("migrating your existing config to ~/.runpod/config.toml") } else { - fmt.Println("Runpod config file not found, please run `runpod config` to create it") + fmt.Println("Runpod config file not found, please run `runpodctl config` to create it") } viper.SetConfigType("toml") //make .runpod folder if not exists diff --git a/cmd/update.go b/cmd/update.go index 23c37c5..727e53f 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -74,21 +74,21 @@ func GetJson(url string) (*GithubApiResponse, error) { var updateCmd = &cobra.Command{ Use: "update", - Short: "update runpod cli", - Long: "update runpod cli to the latest version", + Short: "update runpodctl", + Long: "update runpodctl to the latest version", Run: func(c *cobra.Command, args []string) { //fetch newest github release githubApiUrl := "https://api.github.com/repos/runpod/runpodctl/releases/latest" apiResp, err := GetJson(githubApiUrl) if err != nil { - fmt.Println("error fetching latest version info for runpod cli", err) + fmt.Println("error fetching latest version info for runpodctl", err) return } //find download link for current platform latestVersion := apiResp.Version if semver.Compare("v"+version, latestVersion) == -1 { //version < latest - newBinaryName := fmt.Sprintf("runpod-%s-%s", runtime.GOOS, runtime.GOARCH) + newBinaryName := fmt.Sprintf("runpodctl-%s-%s", runtime.GOOS, runtime.GOARCH) foundNewBinary := false var downloadLink string for _, asset := range apiResp.Assets { @@ -107,20 +107,20 @@ var updateCmd = &cobra.Command{ } exPath := filepath.Dir(ex) downloadPath := newBinaryName - destFilename := "runpod" + destFilename := "runpodctl" if runtime.GOOS == "windows" { - destFilename = "runpod.exe" + destFilename = "runpodctl.exe" } destPath := filepath.Join(exPath, destFilename) if runtime.GOOS == "windows" { fmt.Println("To get the newest version, run this command:") - fmt.Printf("wget https://github.com/runpod/runpodctl/releases/download/%s/%s -O runpod.exe\n", latestVersion, newBinaryName) + fmt.Printf("wget https://github.com/runpod/runpodctl/releases/download/%s/%s -O runpodctl.exe\n", latestVersion, newBinaryName) } fmt.Printf("downloading runpod %s to %s\n", latestVersion, downloadPath) file, err := DownloadFile(downloadLink, downloadPath) defer file.Close() if err != nil { - fmt.Println("error fetching the latest version of runpod cli", err) + fmt.Println("error fetching the latest version of runpodctl", err) return } //chmod +x diff --git a/cmd/version.go b/cmd/version.go index 17ddf73..a4eb484 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -8,9 +8,9 @@ import ( var versionCmd = &cobra.Command{ Use: "version", - Short: "runpod cli version", - Long: "runpod cli version", + Short: "runpodctl version", + Long: "runpodctl version", Run: func(c *cobra.Command, args []string) { - fmt.Println("runpod " + version) + fmt.Println("runpodctl " + version) }, } diff --git a/doc/runpod.md b/doc/runpod.md deleted file mode 100644 index 868d39a..0000000 --- a/doc/runpod.md +++ /dev/null @@ -1,29 +0,0 @@ -## runpod - -CLI for runpod.io - -### Synopsis - -CLI tool to manage your pods for runpod.io - -### Options - -``` - -h, --help help for runpod -``` - -### SEE ALSO - -* [runpod config](runpod_config.md) - CLI Config -* [runpod create](runpod_create.md) - create a resource -* [runpod get](runpod_get.md) - get resource -* [runpod project](runpod_project.md) - manage projects -* [runpod receive](runpod_receive.md) - receive file(s), or folder -* [runpod remove](runpod_remove.md) - remove a resource -* [runpod send](runpod_send.md) - send file(s), or folder -* [runpod start](runpod_start.md) - start a resource -* [runpod stop](runpod_stop.md) - stop a resource -* [runpod update](runpod_update.md) - update runpod cli -* [runpod version](runpod_version.md) - runpod cli version - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_create.md b/doc/runpod_create.md deleted file mode 100644 index 1587abc..0000000 --- a/doc/runpod_create.md +++ /dev/null @@ -1,21 +0,0 @@ -## runpod create - -create a resource - -### Synopsis - -create a resource in runpod.io - -### Options - -``` - -h, --help help for create -``` - -### SEE ALSO - -* [runpod](runpod.md) - CLI for runpod.io -* [runpod create pod](runpod_create_pod.md) - start a pod -* [runpod create pods](runpod_create_pods.md) - create a group of pods - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_get.md b/doc/runpod_get.md deleted file mode 100644 index 9d36e9d..0000000 --- a/doc/runpod_get.md +++ /dev/null @@ -1,21 +0,0 @@ -## runpod get - -get resource - -### Synopsis - -get resources for pods - -### Options - -``` - -h, --help help for get -``` - -### SEE ALSO - -* [runpod](runpod.md) - CLI for runpod.io -* [runpod get cloud](runpod_get_cloud.md) - get all cloud gpus -* [runpod get pod](runpod_get_pod.md) - get all pods - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_project.md b/doc/runpod_project.md deleted file mode 100644 index be91dc7..0000000 --- a/doc/runpod_project.md +++ /dev/null @@ -1,23 +0,0 @@ -## runpod project - -manage projects - -### Synopsis - -Project management for Runpod projects - -### Options - -``` - -h, --help help for project -``` - -### SEE ALSO - -* [runpod](runpod.md) - CLI for runpod.io -* [runpod project build](runpod_project_build.md) - build Dockerfile for current project -* [runpod project deploy](runpod_project_deploy.md) - deploy current project -* [runpod project dev](runpod_project_dev.md) - start current project -* [runpod project new](runpod_project_new.md) - create a new project - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_project_build.md b/doc/runpod_project_build.md deleted file mode 100644 index 5417036..0000000 --- a/doc/runpod_project_build.md +++ /dev/null @@ -1,24 +0,0 @@ -## runpod project build - -build Dockerfile for current project - -### Synopsis - -build a Dockerfile for the Runpod project in the current folder - -``` -runpod project build [flags] -``` - -### Options - -``` - -h, --help help for build - --include-env include environment variables from runpod.toml in generated Dockerfile -``` - -### SEE ALSO - -* [runpod project](runpod_project.md) - manage projects - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_remove.md b/doc/runpod_remove.md deleted file mode 100644 index a34a494..0000000 --- a/doc/runpod_remove.md +++ /dev/null @@ -1,21 +0,0 @@ -## runpod remove - -remove a resource - -### Synopsis - -remove a resource in runpod.io - -### Options - -``` - -h, --help help for remove -``` - -### SEE ALSO - -* [runpod](runpod.md) - CLI for runpod.io -* [runpod remove pod](runpod_remove_pod.md) - remove a pod -* [runpod remove pods](runpod_remove_pods.md) - remove all pods using name - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_remove_pod.md b/doc/runpod_remove_pod.md deleted file mode 100644 index 1a262ff..0000000 --- a/doc/runpod_remove_pod.md +++ /dev/null @@ -1,23 +0,0 @@ -## runpod remove pod - -remove a pod - -### Synopsis - -remove a pod from runpod.io - -``` -runpod remove pod [podId] [flags] -``` - -### Options - -``` - -h, --help help for pod -``` - -### SEE ALSO - -* [runpod remove](runpod_remove.md) - remove a resource - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_start.md b/doc/runpod_start.md deleted file mode 100644 index 80b991d..0000000 --- a/doc/runpod_start.md +++ /dev/null @@ -1,20 +0,0 @@ -## runpod start - -start a resource - -### Synopsis - -start a resource in runpod.io - -### Options - -``` - -h, --help help for start -``` - -### SEE ALSO - -* [runpod](runpod.md) - CLI for runpod.io -* [runpod start pod](runpod_start_pod.md) - start a pod - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_stop.md b/doc/runpod_stop.md deleted file mode 100644 index 2f1261b..0000000 --- a/doc/runpod_stop.md +++ /dev/null @@ -1,20 +0,0 @@ -## runpod stop - -stop a resource - -### Synopsis - -stop a resource in runpod.io - -### Options - -``` - -h, --help help for stop -``` - -### SEE ALSO - -* [runpod](runpod.md) - CLI for runpod.io -* [runpod stop pod](runpod_stop_pod.md) - stop a pod - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_stop_pod.md b/doc/runpod_stop_pod.md deleted file mode 100644 index e77824f..0000000 --- a/doc/runpod_stop_pod.md +++ /dev/null @@ -1,23 +0,0 @@ -## runpod stop pod - -stop a pod - -### Synopsis - -stop a pod from runpod.io - -``` -runpod stop pod [podId] [flags] -``` - -### Options - -``` - -h, --help help for pod -``` - -### SEE ALSO - -* [runpod stop](runpod_stop.md) - stop a resource - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_update.md b/doc/runpod_update.md deleted file mode 100644 index 55d6b3b..0000000 --- a/doc/runpod_update.md +++ /dev/null @@ -1,23 +0,0 @@ -## runpod update - -update runpod cli - -### Synopsis - -update runpod cli to the latest version - -``` -runpod update [flags] -``` - -### Options - -``` - -h, --help help for update -``` - -### SEE ALSO - -* [runpod](runpod.md) - CLI for runpod.io - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpod_version.md b/doc/runpod_version.md deleted file mode 100644 index 22ffafa..0000000 --- a/doc/runpod_version.md +++ /dev/null @@ -1,23 +0,0 @@ -## runpod version - -runpod cli version - -### Synopsis - -runpod cli version - -``` -runpod version [flags] -``` - -### Options - -``` - -h, --help help for version -``` - -### SEE ALSO - -* [runpod](runpod.md) - CLI for runpod.io - -###### Auto generated by spf13/cobra on 26-Jan-2024 diff --git a/doc/runpodctl.md b/doc/runpodctl.md new file mode 100644 index 0000000..afa025d --- /dev/null +++ b/doc/runpodctl.md @@ -0,0 +1,29 @@ +## runpodctl + +CLI for runpod.io + +### Synopsis + +CLI tool to manage your pods for runpod.io + +### Options + +``` + -h, --help help for runpodctl +``` + +### SEE ALSO + +* [runpodctl config](runpodctl_config.md) - CLI Config +* [runpodctl create](runpodctl_create.md) - create a resource +* [runpodctl get](runpodctl_get.md) - get resource +* [runpodctl project](runpodctl_project.md) - manage projects +* [runpodctl receive](runpodctl_receive.md) - receive file(s), or folder +* [runpodctl remove](runpodctl_remove.md) - remove a resource +* [runpodctl send](runpodctl_send.md) - send file(s), or folder +* [runpodctl start](runpodctl_start.md) - start a resource +* [runpodctl stop](runpodctl_stop.md) - stop a resource +* [runpodctl update](runpodctl_update.md) - update runpodctl +* [runpodctl version](runpodctl_version.md) - runpodctl version + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_config.md b/doc/runpodctl_config.md similarity index 60% rename from doc/runpod_config.md rename to doc/runpodctl_config.md index 93b2d76..bbbb290 100644 --- a/doc/runpod_config.md +++ b/doc/runpodctl_config.md @@ -1,4 +1,4 @@ -## runpod config +## runpodctl config CLI Config @@ -7,7 +7,7 @@ CLI Config RunPod CLI Config Settings ``` -runpod config [flags] +runpodctl config [flags] ``` ### Options @@ -20,6 +20,6 @@ runpod config [flags] ### SEE ALSO -* [runpod](runpod.md) - CLI for runpod.io +* [runpodctl](runpodctl.md) - CLI for runpod.io -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_create.md b/doc/runpodctl_create.md new file mode 100644 index 0000000..08b2fc7 --- /dev/null +++ b/doc/runpodctl_create.md @@ -0,0 +1,21 @@ +## runpodctl create + +create a resource + +### Synopsis + +create a resource in runpod.io + +### Options + +``` + -h, --help help for create +``` + +### SEE ALSO + +* [runpodctl](runpodctl.md) - CLI for runpod.io +* [runpodctl create pod](runpodctl_create_pod.md) - start a pod +* [runpodctl create pods](runpodctl_create_pods.md) - create a group of pods + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_create_pod.md b/doc/runpodctl_create_pod.md similarity index 88% rename from doc/runpod_create_pod.md rename to doc/runpodctl_create_pod.md index 4cbd9ee..02322e5 100644 --- a/doc/runpod_create_pod.md +++ b/doc/runpodctl_create_pod.md @@ -1,4 +1,4 @@ -## runpod create pod +## runpodctl create pod start a pod @@ -7,7 +7,7 @@ start a pod start a pod from runpod.io ``` -runpod create pod [flags] +runpodctl create pod [flags] ``` ### Options @@ -34,6 +34,6 @@ runpod create pod [flags] ### SEE ALSO -* [runpod create](runpod_create.md) - create a resource +* [runpodctl create](runpodctl_create.md) - create a resource -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_create_pods.md b/doc/runpodctl_create_pods.md similarity index 88% rename from doc/runpod_create_pods.md rename to doc/runpodctl_create_pods.md index cd2ea87..2fcf868 100644 --- a/doc/runpod_create_pods.md +++ b/doc/runpodctl_create_pods.md @@ -1,4 +1,4 @@ -## runpod create pods +## runpodctl create pods create a group of pods @@ -7,7 +7,7 @@ create a group of pods create a group of pods on runpod.io ``` -runpod create pods [flags] +runpodctl create pods [flags] ``` ### Options @@ -34,6 +34,6 @@ runpod create pods [flags] ### SEE ALSO -* [runpod create](runpod_create.md) - create a resource +* [runpodctl create](runpodctl_create.md) - create a resource -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_get.md b/doc/runpodctl_get.md new file mode 100644 index 0000000..61c1e97 --- /dev/null +++ b/doc/runpodctl_get.md @@ -0,0 +1,21 @@ +## runpodctl get + +get resource + +### Synopsis + +get resources for pods + +### Options + +``` + -h, --help help for get +``` + +### SEE ALSO + +* [runpodctl](runpodctl.md) - CLI for runpod.io +* [runpodctl get cloud](runpodctl_get_cloud.md) - get all cloud gpus +* [runpodctl get pod](runpodctl_get_pod.md) - get all pods + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_get_cloud.md b/doc/runpodctl_get_cloud.md similarity index 72% rename from doc/runpod_get_cloud.md rename to doc/runpodctl_get_cloud.md index fe45158..54cd380 100644 --- a/doc/runpod_get_cloud.md +++ b/doc/runpodctl_get_cloud.md @@ -1,4 +1,4 @@ -## runpod get cloud +## runpodctl get cloud get all cloud gpus @@ -7,7 +7,7 @@ get all cloud gpus get all cloud gpus available on runpod.io ``` -runpod get cloud [gpuCount] [flags] +runpodctl get cloud [gpuCount] [flags] ``` ### Options @@ -23,6 +23,6 @@ runpod get cloud [gpuCount] [flags] ### SEE ALSO -* [runpod get](runpod_get.md) - get resource +* [runpodctl get](runpodctl_get.md) - get resource -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_get_pod.md b/doc/runpodctl_get_pod.md similarity index 54% rename from doc/runpod_get_pod.md rename to doc/runpodctl_get_pod.md index 90f3b9b..5984c9d 100644 --- a/doc/runpod_get_pod.md +++ b/doc/runpodctl_get_pod.md @@ -1,4 +1,4 @@ -## runpod get pod +## runpodctl get pod get all pods @@ -7,7 +7,7 @@ get all pods get all pods or specify pod id ``` -runpod get pod [podId] [flags] +runpodctl get pod [podId] [flags] ``` ### Options @@ -19,6 +19,6 @@ runpod get pod [podId] [flags] ### SEE ALSO -* [runpod get](runpod_get.md) - get resource +* [runpodctl get](runpodctl_get.md) - get resource -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_project.md b/doc/runpodctl_project.md new file mode 100644 index 0000000..b5b3581 --- /dev/null +++ b/doc/runpodctl_project.md @@ -0,0 +1,23 @@ +## runpodctl project + +manage projects + +### Synopsis + +Project management for Runpod projects + +### Options + +``` + -h, --help help for project +``` + +### SEE ALSO + +* [runpodctl](runpodctl.md) - CLI for runpod.io +* [runpodctl project build](runpodctl_project_build.md) - build Dockerfile for current project +* [runpodctl project deploy](runpodctl_project_deploy.md) - deploy current project +* [runpodctl project dev](runpodctl_project_dev.md) - start current project +* [runpodctl project new](runpodctl_project_new.md) - create a new project + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_project_build.md b/doc/runpodctl_project_build.md new file mode 100644 index 0000000..c698217 --- /dev/null +++ b/doc/runpodctl_project_build.md @@ -0,0 +1,24 @@ +## runpodctl project build + +build Dockerfile for current project + +### Synopsis + +build a Dockerfile for the RunPod project in the current folder + +``` +runpodctl project build [flags] +``` + +### Options + +``` + -h, --help help for build + --include-env include environment variables from runpod.toml in generated Dockerfile +``` + +### SEE ALSO + +* [runpodctl project](runpodctl_project.md) - manage projects + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_project_deploy.md b/doc/runpodctl_project_deploy.md similarity index 50% rename from doc/runpod_project_deploy.md rename to doc/runpodctl_project_deploy.md index e48aa7c..e54b649 100644 --- a/doc/runpod_project_deploy.md +++ b/doc/runpodctl_project_deploy.md @@ -1,4 +1,4 @@ -## runpod project deploy +## runpodctl project deploy deploy current project @@ -7,7 +7,7 @@ deploy current project deploy an endpoint for the Runpod project in the current folder ``` -runpod project deploy [flags] +runpodctl project deploy [flags] ``` ### Options @@ -18,6 +18,6 @@ runpod project deploy [flags] ### SEE ALSO -* [runpod project](runpod_project.md) - manage projects +* [runpodctl project](runpodctl_project.md) - manage projects -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_project_dev.md b/doc/runpodctl_project_dev.md similarity index 68% rename from doc/runpod_project_dev.md rename to doc/runpodctl_project_dev.md index 32d92df..4aabc4a 100644 --- a/doc/runpod_project_dev.md +++ b/doc/runpodctl_project_dev.md @@ -1,4 +1,4 @@ -## runpod project dev +## runpodctl project dev start current project @@ -7,7 +7,7 @@ start current project start a development pod session for the Runpod project in the current folder ``` -runpod project dev [flags] +runpodctl project dev [flags] ``` ### Options @@ -20,6 +20,6 @@ runpod project dev [flags] ### SEE ALSO -* [runpod project](runpod_project.md) - manage projects +* [runpodctl project](runpodctl_project.md) - manage projects -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_project_new.md b/doc/runpodctl_project_new.md similarity index 60% rename from doc/runpod_project_new.md rename to doc/runpodctl_project_new.md index 9a7f606..c50dcf6 100644 --- a/doc/runpod_project_new.md +++ b/doc/runpodctl_project_new.md @@ -1,4 +1,4 @@ -## runpod project new +## runpodctl project new create a new project @@ -7,7 +7,7 @@ create a new project create a new Runpod project folder ``` -runpod project new [flags] +runpodctl project new [flags] ``` ### Options @@ -20,6 +20,6 @@ runpod project new [flags] ### SEE ALSO -* [runpod project](runpod_project.md) - manage projects +* [runpodctl project](runpodctl_project.md) - manage projects -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_receive.md b/doc/runpodctl_receive.md similarity index 52% rename from doc/runpod_receive.md rename to doc/runpodctl_receive.md index ef0b1aa..5975e71 100644 --- a/doc/runpod_receive.md +++ b/doc/runpodctl_receive.md @@ -1,4 +1,4 @@ -## runpod receive +## runpodctl receive receive file(s), or folder @@ -7,7 +7,7 @@ receive file(s), or folder receive file(s), or folder from pod or any computer ``` -runpod receive [code] [flags] +runpodctl receive [code] [flags] ``` ### Options @@ -18,6 +18,6 @@ runpod receive [code] [flags] ### SEE ALSO -* [runpod](runpod.md) - CLI for runpod.io +* [runpodctl](runpodctl.md) - CLI for runpod.io -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_remove.md b/doc/runpodctl_remove.md new file mode 100644 index 0000000..61870d8 --- /dev/null +++ b/doc/runpodctl_remove.md @@ -0,0 +1,21 @@ +## runpodctl remove + +remove a resource + +### Synopsis + +remove a resource in runpod.io + +### Options + +``` + -h, --help help for remove +``` + +### SEE ALSO + +* [runpodctl](runpodctl.md) - CLI for runpod.io +* [runpodctl remove pod](runpodctl_remove_pod.md) - remove a pod +* [runpodctl remove pods](runpodctl_remove_pods.md) - remove all pods using name + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_remove_pod.md b/doc/runpodctl_remove_pod.md new file mode 100644 index 0000000..d572b60 --- /dev/null +++ b/doc/runpodctl_remove_pod.md @@ -0,0 +1,23 @@ +## runpodctl remove pod + +remove a pod + +### Synopsis + +remove a pod from runpod.io + +``` +runpodctl remove pod [podId] [flags] +``` + +### Options + +``` + -h, --help help for pod +``` + +### SEE ALSO + +* [runpodctl remove](runpodctl_remove.md) - remove a resource + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_remove_pods.md b/doc/runpodctl_remove_pods.md similarity index 58% rename from doc/runpod_remove_pods.md rename to doc/runpodctl_remove_pods.md index 20931f6..2efc4bb 100644 --- a/doc/runpod_remove_pods.md +++ b/doc/runpodctl_remove_pods.md @@ -1,4 +1,4 @@ -## runpod remove pods +## runpodctl remove pods remove all pods using name @@ -7,7 +7,7 @@ remove all pods using name remove all pods using name from runpod.io ``` -runpod remove pods [name] [flags] +runpodctl remove pods [name] [flags] ``` ### Options @@ -19,6 +19,6 @@ runpod remove pods [name] [flags] ### SEE ALSO -* [runpod remove](runpod_remove.md) - remove a resource +* [runpodctl remove](runpodctl_remove.md) - remove a resource -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_send.md b/doc/runpodctl_send.md similarity index 56% rename from doc/runpod_send.md rename to doc/runpodctl_send.md index 6bb2c1a..0cea825 100644 --- a/doc/runpod_send.md +++ b/doc/runpodctl_send.md @@ -1,4 +1,4 @@ -## runpod send +## runpodctl send send file(s), or folder @@ -7,7 +7,7 @@ send file(s), or folder send file(s), or folder to pod or any computer ``` -runpod send [filename(s) or folder] [flags] +runpodctl send [filename(s) or folder] [flags] ``` ### Options @@ -19,6 +19,6 @@ runpod send [filename(s) or folder] [flags] ### SEE ALSO -* [runpod](runpod.md) - CLI for runpod.io +* [runpodctl](runpodctl.md) - CLI for runpod.io -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_start.md b/doc/runpodctl_start.md new file mode 100644 index 0000000..f20b044 --- /dev/null +++ b/doc/runpodctl_start.md @@ -0,0 +1,20 @@ +## runpodctl start + +start a resource + +### Synopsis + +start a resource in runpod.io + +### Options + +``` + -h, --help help for start +``` + +### SEE ALSO + +* [runpodctl](runpodctl.md) - CLI for runpod.io +* [runpodctl start pod](runpodctl_start_pod.md) - start a pod + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpod_start_pod.md b/doc/runpodctl_start_pod.md similarity index 52% rename from doc/runpod_start_pod.md rename to doc/runpodctl_start_pod.md index 33ce35a..72ffa5f 100644 --- a/doc/runpod_start_pod.md +++ b/doc/runpodctl_start_pod.md @@ -1,4 +1,4 @@ -## runpod start pod +## runpodctl start pod start a pod @@ -7,7 +7,7 @@ start a pod start a pod from runpod.io ``` -runpod start pod [podId] [flags] +runpodctl start pod [podId] [flags] ``` ### Options @@ -19,6 +19,6 @@ runpod start pod [podId] [flags] ### SEE ALSO -* [runpod start](runpod_start.md) - start a resource +* [runpodctl start](runpodctl_start.md) - start a resource -###### Auto generated by spf13/cobra on 26-Jan-2024 +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_stop.md b/doc/runpodctl_stop.md new file mode 100644 index 0000000..7b7c899 --- /dev/null +++ b/doc/runpodctl_stop.md @@ -0,0 +1,20 @@ +## runpodctl stop + +stop a resource + +### Synopsis + +stop a resource in runpod.io + +### Options + +``` + -h, --help help for stop +``` + +### SEE ALSO + +* [runpodctl](runpodctl.md) - CLI for runpod.io +* [runpodctl stop pod](runpodctl_stop_pod.md) - stop a pod + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_stop_pod.md b/doc/runpodctl_stop_pod.md new file mode 100644 index 0000000..946cfd1 --- /dev/null +++ b/doc/runpodctl_stop_pod.md @@ -0,0 +1,23 @@ +## runpodctl stop pod + +stop a pod + +### Synopsis + +stop a pod from runpod.io + +``` +runpodctl stop pod [podId] [flags] +``` + +### Options + +``` + -h, --help help for pod +``` + +### SEE ALSO + +* [runpodctl stop](runpodctl_stop.md) - stop a resource + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_update.md b/doc/runpodctl_update.md new file mode 100644 index 0000000..e16e66d --- /dev/null +++ b/doc/runpodctl_update.md @@ -0,0 +1,23 @@ +## runpodctl update + +update runpodctl + +### Synopsis + +update runpodctl to the latest version + +``` +runpodctl update [flags] +``` + +### Options + +``` + -h, --help help for update +``` + +### SEE ALSO + +* [runpodctl](runpodctl.md) - CLI for runpod.io + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/doc/runpodctl_version.md b/doc/runpodctl_version.md new file mode 100644 index 0000000..d6c095a --- /dev/null +++ b/doc/runpodctl_version.md @@ -0,0 +1,23 @@ +## runpodctl version + +runpodctl version + +### Synopsis + +runpodctl version + +``` +runpodctl version [flags] +``` + +### Options + +``` + -h, --help help for version +``` + +### SEE ALSO + +* [runpodctl](runpodctl.md) - CLI for runpod.io + +###### Auto generated by spf13/cobra on 28-Jan-2024 diff --git a/install.sh b/install.sh index 373798e..b24abf8 100644 --- a/install.sh +++ b/install.sh @@ -81,15 +81,15 @@ check_system_requirements() { fi } -# ---------------------------- RunPod CLI Version ---------------------------- # +# ----------------------------- runpodctl Version ---------------------------- # fetch_latest_version() { local version_url="https://api.github.com/repos/runpod/runpodctl/releases/latest" VERSION=$(wget -q -O- "$version_url" | jq -r '.tag_name') if [ -z "$VERSION" ]; then - echo "Failed to fetch the latest version of RunPod CLI." + echo "Failed to fetch the latest version of runpodctl." exit 1 fi - echo "Latest version of RunPod CLI: $VERSION" + echo "Latest version of runpodctl: $VERSION" } # ------------------------------- Download URL ------------------------------- # @@ -113,12 +113,12 @@ download_url_constructor() { exit 1 fi - DOWNLOAD_URL="https://github.com/runpod/runpodctl/releases/download/${VERSION}/runpod-${os_type}-${arch_type}" + DOWNLOAD_URL="https://github.com/runpod/runpodctl/releases/download/${VERSION}/runpodctl-${os_type}-${arch_type}" } # ---------------------------- Download & Install ---------------------------- # download_and_install_cli() { - local cli_file_name="runpod" + local cli_file_name="runpodctl" if ! wget -q --show-progress "$DOWNLOAD_URL" -O "$cli_file_name"; then echo "Failed to download $cli_file_name." exit 1 @@ -128,14 +128,14 @@ download_and_install_cli() { echo "Failed to move $cli_file_name to /usr/local/bin/." exit 1 fi - echo "RunPod CLI installed successfully." + echo "runpodctl installed successfully." } # ---------------------------------------------------------------------------- # # Main # # ---------------------------------------------------------------------------- # -echo "Installing RunPod CLI..." +echo "Installing runpodctl..." check_root check_system_requirements diff --git a/makefile b/makefile index 1c96253..736d60d 100644 --- a/makefile +++ b/makefile @@ -1,15 +1,15 @@ .PHONY: proto build-linux: - env GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpod . + env GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpodctl . dev: - env GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpod . + env GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpodctl . windows: - env GOOS=windows GOARCH=amd64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpod.exe . + env GOOS=windows GOARCH=amd64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpodctl.exe . dev-amd64: - env GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpod . + env GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpodctl . lint: