Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@
"runpodctl/reference/runpodctl-pod",
"runpodctl/reference/runpodctl-serverless",
"runpodctl/reference/runpodctl-template",
"runpodctl/reference/runpodctl-model",
"runpodctl/reference/runpodctl-hub",
"runpodctl/reference/runpodctl-network-volume",
"runpodctl/reference/runpodctl-registry",
Expand Down
1 change: 1 addition & 0 deletions runpodctl/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ Runpod CLI organizes commands into groups based on the resource type:
| `runpodctl pod` | | Manage Pods (create, list, start, stop, delete) |
| `runpodctl serverless` | `sls` | Manage Serverless endpoints |
| `runpodctl template` | `tpl` | List, search, and manage templates |
| `runpodctl model` | | Manage models in the model repository (add, list, remove) |
| `runpodctl hub` | | Browse and deploy from the Runpod Hub |
| `runpodctl network-volume` | `nv` | Manage network volumes |
| `runpodctl registry` | `reg` | Manage container registry authentications |
Expand Down
16 changes: 16 additions & 0 deletions runpodctl/reference/runpodctl-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ Your Runpod API key, which authenticates the CLI to access your account. You can
The Runpod API endpoint URL. The default value should work for most users.
</ResponseField>

## Environment variables

You can also configure the CLI using environment variables. When set, these take precedence over the corresponding values in your config file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented the RUNPOD_API_KEY, RUNPOD_GRAPHQL_URL, and RUNPOD_API_URL environment variables and their precedence over config values, based on the new internal/configenv/configenv.go package: APIKeyEnvapiKey, GraphQLURLEnvapiUrl, RESTURLEnvrestApiUrl, with envOrConfig giving a non-empty env var priority over the config file.

Source: https://github.com/runpod/runpodctl/pull/302/files


<ResponseField name="RUNPOD_API_KEY" type="string">
Your Runpod API key. Overrides the `apiKey` value in your config file.
</ResponseField>

<ResponseField name="RUNPOD_GRAPHQL_URL" type="string">
The Runpod GraphQL API endpoint URL. Overrides the `apiUrl` value in your config file.
</ResponseField>

<ResponseField name="RUNPOD_API_URL" type="string">
The Runpod REST API endpoint URL. Overrides the `restApiUrl` value in your config file.
</ResponseField>

## Related commands

- [`runpodctl doctor`](/runpodctl/reference/runpodctl-doctor)
Expand Down
111 changes: 111 additions & 0 deletions runpodctl/reference/runpodctl-model.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: "model"
sidebarTitle: "model"
---

Manage models in the Runpod model repository. Use these subcommands to upload model files, list your models, and remove models or individual model versions.

<RequestExample>
```bash Command
runpodctl model <subcommand> [flags]
```
</RequestExample>

## Subcommands

### Add a model

Add a model to the model repository. To upload model files from your local machine, point `--model-path` at the directory that contains them:

```bash
runpodctl model add --name "my-model" --owner "my-team" --model-path ./model
```

When you upload from a directory in a terminal, `runpodctl` shows a progress bar with upload progress and estimated time remaining, then prints the total model size once the upload finishes.

#### Add flags

<ResponseField name="--name" type="string">
Model name.
</ResponseField>

<ResponseField name="--owner" type="string">
Model owner namespace (a user or team owner ID).
</ResponseField>

<ResponseField name="--model-path" type="string">
Directory containing the model files to upload.
</ResponseField>

<ResponseField name="--wait-for-hash" type="bool" default="false">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented the new --wait-for-hash and -v, --verbose flags on runpodctl model add from PR #302's cmd/model/addModelToRepo.go (flag registration and the --wait-for-hash requires --model-path constraint), plus the progress bar and total-model-size output added in the same file.

Source: https://github.com/runpod/runpodctl/pull/302/files

Wait for uploaded model files to finish hashing before the command returns. Requires `--model-path`. When hashing completes, `runpodctl` prints a message confirming the model is ready to deploy along with its model URL.
</ResponseField>

<ResponseField name="--hash-timeout" type="duration" default="30m0s">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented the new --hash-timeout duration flag on model add; its default of 30m0s and the "0 disables the timeout" behavior come from the flag registration and modelHashWaitTimeout = 30 * time.Minute in cmd/model/addModelToRepo.go.

Source: https://github.com/runpod/runpodctl/pull/302/files

Maximum time to wait when `--wait-for-hash` is set. Set to `0` to wait indefinitely.
</ResponseField>

<ResponseField name="--verbose, -v" type="bool" default="false">
Include the full upload details in the `--wait-for-hash` output. Without this flag, a compact summary is printed instead.
</ResponseField>

<Note>

`runpodctl model add` also accepts lower-level flags for configuring uploads directly, such as `--content-type`, `--file-name`, `--file-size`, `--part-size`, `--metadata`, and `--model-status`. Run `runpodctl model add --help` to see the complete list.

</Note>

### List models

List the models in your model repository:

```bash
runpodctl model list
```

#### List flags

<ResponseField name="--name" type="string">
Filter the results by model name.
</ResponseField>

<ResponseField name="--provider" type="string">
Filter the results by provider.
</ResponseField>

### Remove a model

Remove a model from the model repository:

```bash
runpodctl model remove --name "my-model" --owner "my-team"
```

To remove a single model version instead of the entire model, pass either `--hash` or `--version`. This marks that version as removed and leaves the rest of the model in place.

```bash
runpodctl model remove --name "my-model" --owner "my-team" --version "<version-uuid>"
```

#### Remove flags

<ResponseField name="--name" type="string">
Model name.
</ResponseField>

<ResponseField name="--owner" type="string">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented the new --hash and --version flags on runpodctl model remove from PR #302's cmd/model/removeModel.go, including the mutual-exclusivity check (only one of --hash or --version can be provided) and that a matching version is marked removed rather than deleting the whole model.

Source: https://github.com/runpod/runpodctl/pull/302/files

Model owner.
</ResponseField>

<ResponseField name="--hash" type="string">
Hash of the model version to remove. Cannot be combined with `--version`.
</ResponseField>

<ResponseField name="--version" type="string">
UUID of the model version to remove. Cannot be combined with `--hash`.
</ResponseField>

## Related commands

- [`runpodctl serverless`](/runpodctl/reference/runpodctl-serverless)
- [`runpodctl config`](/runpodctl/reference/runpodctl-config)
Loading