Skip to content

feat: expand runpodctl coverage with legacy-safe cli#229

Open
TimPietruskyRunPod wants to merge 24 commits intomainfrom
refactor/cli-restructure
Open

feat: expand runpodctl coverage with legacy-safe cli#229
TimPietruskyRunPod wants to merge 24 commits intomainfrom
refactor/cli-restructure

Conversation

@TimPietruskyRunPod
Copy link
Member

@TimPietruskyRunPod TimPietruskyRunPod commented Feb 1, 2026

summary

  • resolves 17 tracked issues across pods/serverless/templates/gpu/datacenter/billing/ssh/doctor/help
  • drop-in upgrade: runpodctl binary kept; legacy commands still work with stderr-only warnings
  • new higher-level resource commands (pod/serverless/template/etc.) plus legacy verb-noun compatibility
  • clearer gpu identifiers: --gpu-id flag and gpuId/gpuIds output
  • broader api coverage (rest-first + graphql fallback) with json/yaml output for automation
  • onboarding improvements: doctor + ssh key setup + auto-migration from ~/.runpod.yaml to ~/.runpod/config.toml
  • tests: full unit suite + full e2e suite; e2e covers all cli entrypoints (legacy + new) with cleanup via t.Cleanup

help (runpodctl --help):

runpodctl cli - manage gpu pods, serverless endpoints, and more.

getting started:
  1. get your api key at https://www.runpod.io/console/user/settings
  2. run: runpodctl doctor (will prompt for key and save it)
  or: export RUNPOD_API_KEY=your-key

resources:
  pod            manage gpu pods
  serverless     manage serverless endpoints (alias: sls)
  template       manage templates (alias: tpl)
  model          manage model repository
  network-volume manage network volumes (alias: nv)
  registry       manage container registry auth (alias: reg)

info:
  user           show account info and balance (alias: me)
  gpu            list available gpu types
  datacenter     list datacenters and availability (alias: dc)
  billing        view billing history

utilities:
  doctor         diagnose and fix cli issues
  ssh            manage ssh keys and connections
  send/receive   transfer files to/from pods

runpodctl v2 - legacy commands still supported
legacy (deprecated): (get, create, remove, start, stop, exec, project, config, get models)

Usage:
  runpodctl [command]

Available Commands:
  billing        view billing history
  completion     install shell completion
  datacenter     list datacenters
  doctor         diagnose and fix cli issues
  gpu            list available gpu types
  help           help about any command
  model          manage model repository
  network-volume manage network volumes
  pod            manage gpu pods
  receive        receive files or folders
  registry       manage container registry auth
  send           send files or folders
  serverless     manage serverless endpoints
  ssh            manage ssh keys and connections
  template       manage templates
  update         update runpodctl cli
  user           show account info
  version        print the version

Flags:
  -h, --help            help for runpodctl
  -o, --output string   output format (json, yaml) (default "json")
  -v, --version         print the version of runpodctl

Use "runpodctl [command] --help" for more information about a command.

tests

  • go test ./...
  • go test -tags e2e ./e2e

…urce groups

- rename module from runpodctl to runpod and binary to runpod
- change command structure from verb-noun to noun-verb pattern
- add new resource command groups: serverless, template, volume, registry
- add legacy command support for backward compatibility
- create internal api layer with rest client and resource methods
- add output formatting support (json/yaml/table)
- enhance ssh key management and commands
- update dependencies (cobra v1.8.1, viper v1.19.0)
- update documentation and add agents.md for ai tooling
- remove deprecated test files and consolidate version handling
@TimPietruskyRunPod TimPietruskyRunPod changed the title refactor(cli): restructure commands to noun-verb pattern and add resource groups feat: refactor the whole runpodctl into a cli which can be used by agents Feb 1, 2026
- rename volume command to network-volume with alias 'nv'
- remove table output format, keep only json and yaml
- hide deprecated project command
- update help text and command descriptions
- simplify api test responses to use direct arrays
- update all tests to reflect command rename and output changes
- add user command to show account info and balance (alias: me, account)
- add gpu command to list available gpu types
- add datacenter command to list datacenters (alias: dc)
- add billing command with subcommands for pods, serverless, network-volume
- add doctor command to diagnose and fix cli configuration issues
- add pod restart and reset commands
- refactor legacy commands to use actual commands with deprecation warnings
- improve config handling with explicit viper value setting
- update error messages to guide users to doctor command
- deprecate config command in favor of doctor
- update default ssh key name to RunPod-Key-Go
- add comprehensive e2e tests for all new commands
- update root help text with getting started instructions
- add completion command that auto-detects shell (bash, zsh, fish, powershell)
- automatically install completion to appropriate config files
- disable default cobra completion command
- add hidden generate subcommand for advanced usage
- register completion and update commands in root
- update comment formatting in update command
- update root help text to mention runpod v2 (formerly runpodctl)
- update version template to include formerly runpodctl note
- update version command output to clarify migration from runpodctl
- add template search command to search by name or image
- add --type flag to filter templates (official, community, user)
- add --limit and --offset flags for pagination
- add --all flag to include user templates
- update list command with smart defaults (show all for official/user, limit for community)
- add graphql support for fetching official and community templates
- enhance gettemplate to try rest api first, fallback to graphql
- add template type constants and list options struct
- add comprehensive e2e tests for filtering and pagination
- add cpu pod creation with compute-type and gpu-type-id naming
- include ssh info and lifecycle fields in pod get output
- return template readme/env/ports on get and parse graphql ports
- promote model repo commands and add legacy get models mapping
- update gpu list output to gpu type id and expand e2e coverage
keep exec as a hidden legacy command that points users to ssh, and restore missing legacy commands for cloud and multi-pod operations.
preserve backward compatibility for legacy exec while pointing users to ssh. add project create/build test coverage and remove resolved issue notes.
add global-networking to pod create with validation and error hints, wire the rest request, add e2e coverage, and update the issue note.
add --public-ip for community cloud pods, wire supportPublicIp, add unit and e2e coverage, and document testing expectations.
standardize command help text casing and plurals, and add unit + e2e checks to prevent regressions.
avoid breaking existing users by reverting the cli name to runpodctl.
align docs, tooling, and tests so install and update paths keep the same binary.
add legacy command assertions and help coverage for remaining cli entrypoints.
include ssh, completion, and send/receive checks to catch regressions.
install govulncheck in ci and call it directly to keep the build green.
document non-obvious pitfalls to avoid regressions in templates, legacy, and doctor.
use --template-id for pod creation to align with serverless and clarify intent.
update help text and e2e coverage accordingly.
rename gpu-type-id flag to gpu-id and normalize gpuTypeId output to gpuId.
align billing filters/grouping and update tests/docs; remove resolved docs/issues.
@TimPietruskyRunPod TimPietruskyRunPod marked this pull request as ready for review February 5, 2026 19:40
@TimPietruskyRunPod TimPietruskyRunPod changed the title feat: refactor the whole runpodctl into a cli which can be used by agents feat: expand runpodctl coverage with legacy-safe cli Feb 5, 2026
TimPietruskyRunPod and others added 6 commits February 5, 2026 20:48
simplify root help messaging and regenerate markdown docs for the new cli.
update pr template to match the new summary/testing guidance.
update go.mod module path to github.com/runpod/runpodctl and rewrite imports
to match; includes gofmt cleanup after the path change.
remove the cli restructure justification from the repo while keeping it locally.

Co-authored-by: Cursor <cursoragent@cursor.com>
use graphql api for gpu pod creation to support startSsh field, which
controls whether ssh keys are injected into the pod. cpu pods fall back
to rest api since graphql requires gpuTypeId.
create model and remove model were not registered in the legacy
command layer, causing flags like --name and --owner to be unknown.
model repo uploads do not accept a hash, causing errors when specified.
also bumps go version to 1.25.7.

cherry-picked from #230.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments