[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AE05V97HSHWMVRXE37SG97":3,"skill-same:01M7AE05V97HSHWMVRXE37SG97":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M7AE05V97HSHWMVRXE37SG97","companion-clis",null,"Companion CLIs for Runpod workflows — HuggingFace, GitHub, Docker, and AWS.","hanchenhao\u002Fai-canvas","hanchenhao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F15713703?v=4","01M7ADWCF5AE30N3MG7MDF3RV2","01M7ADWCFVJS4V8VD9KWJG22WR",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhanchenhao\u002Fai-canvas\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcompanion-clis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: companion-clis\ndescription: Companion CLIs for Runpod workflows — HuggingFace, GitHub, Docker, and AWS.\nallowed-tools: Bash(hf:*), Bash(gh:*), Bash(docker:*), Bash(aws:*), Bash(ssh-keygen:*), Bash(ssh-add:*), Bash(ssh-agent:*)\ncompatibility: Linux, macOS, Windows\nmetadata:\n  author: runpod\n  version: \"1.0\"\nlicense: Apache-2.0\n---\n\n# Companion CLIs\n\nFour CLIs commonly needed alongside Runpod: HuggingFace (`hf`), GitHub (`gh`), Docker (`docker`), and AWS (`aws`). Each requires credentials before use.\n\n## Windows: Install WSL2 First\n\nIf you are on Windows, install WSL2 (Windows Subsystem for Linux) before proceeding. WSL2 gives you a native Linux environment on Windows, which all these CLIs are designed for. Run in PowerShell as Administrator, then restart:\n\n```powershell\nwsl --install\n```\n\nThis installs WSL2 with Ubuntu by default. After restarting, open the Ubuntu app to complete setup (create a Linux username and password). From that point on, follow the **Linux** instructions throughout this skill.\n\n## HuggingFace CLI\n\nThe HuggingFace CLI (`hf`) is used to download models from the Hub to your local machine so they are cached and available when you build and run the Docker container. For example, to deploy `meta-llama\u002FLlama-3.1-8B` to a Runpod serverless endpoint: download the model locally first, build a Docker image that includes or mounts it, validate the container locally, then push the image to Docker Hub for Runpod to pull.\n\n### Install\n\n```bash\n# macOS \u002F Linux (standalone installer — recommended)\ncurl -LsSf https:\u002F\u002Fhf.co\u002Fcli\u002Finstall.sh | bash\n\n# macOS (Homebrew)\nbrew install hf\n\n# Windows (WSL2): use the Linux standalone installer above\n```\n\n> **Note:** `pip install huggingface_hub` installs the older Python CLI (`huggingface-cli`), which uses different command syntax. The commands below are for the standalone `hf` CLI.\n\n### Credentials\n\nGet a token at https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Ftokens. Use **write** access for uploading; **read** access is sufficient for downloading public or gated models.\n\n```bash\n# Option 1: interactive login (saves token to ~\u002F.cache\u002Fhuggingface\u002Ftoken, optionally to git credential store)\nhf auth login\n\n# Option 2: non-interactive (pass token directly, useful in scripts and pod start commands)\nhf auth login --token $HF_TOKEN --add-to-git-credential\n\n# Option 3: environment variable (takes precedence over saved token; to revert, unset the variable)\nexport HF_TOKEN=hf_...\n```\n\n```bash\nhf auth whoami      # confirm auth and org memberships\nhf auth logout      # delete all locally stored tokens\n```\n\n### Key Commands\n\n```bash\n# Download a model to a local directory (use --local-dir to control where it lands)\nhf download meta-llama\u002FLlama-3.1-8B --local-dir .\u002Fmodels\u002Fllama-3.1-8b\nhf download TinyLlama\u002FTinyLlama-1.1B-Chat-v1.0 --local-dir .\u002Fmodels\u002Ftinyllama\n\n# Download a single file from a model repo\nhf download meta-llama\u002FLlama-3.1-8B config.json --local-dir .\u002Fmodels\u002Fllama-3.1-8b\n\n# Download with glob filters (e.g. only safetensors weights, skip fp16 variants)\nhf download stabilityai\u002Fstable-diffusion-xl-base-1.0 \\\n  --include \"*.safetensors\" --exclude \"*.fp16.*\" \\\n  --local-dir .\u002Fmodels\u002Fsdxl\n\n# Download a specific revision (commit hash, branch, or tag — append --revision REF)\nhf download meta-llama\u002FLlama-3.1-8B --revision v1.0 --local-dir .\u002Fmodels\u002Fllama-3.1-8b\n```\n\n### Troubleshooting\n\n```bash\n# Increase download timeout on slow connections (default: 10s)\nexport HF_HUB_DOWNLOAD_TIMEOUT=30\n```\n\n---\n\n## GitHub CLI\n\nThe GitHub CLI (`gh`) is used to manage repositories for Runpod serverless workers. This includes cloning repos into local Docker containers for testing, versioning source code so changes can be tracked and shared with teammates or collaborators, and creating GitHub releases that publish listings to the Runpod Hub. The Hub indexes releases — not commits — so every deployment update requires a new release.\n\n### Install\n\n```bash\n# macOS\nbrew install gh\n\n# Linux (Debian\u002FUbuntu)\n(type -p wget >\u002Fdev\u002Fnull || (sudo apt update && sudo apt install wget -y)) \\\n  && sudo mkdir -p -m 755 \u002Fetc\u002Fapt\u002Fkeyrings \\\n  && out=$(mktemp) && wget -nv -O$out https:\u002F\u002Fcli.github.com\u002Fpackages\u002Fgithubcli-archive-keyring.gpg \\\n  && cat $out | sudo tee \u002Fetc\u002Fapt\u002Fkeyrings\u002Fgithubcli-archive-keyring.gpg > \u002Fdev\u002Fnull \\\n  && sudo chmod go+r \u002Fetc\u002Fapt\u002Fkeyrings\u002Fgithubcli-archive-keyring.gpg \\\n  && echo \"deb [arch=$(dpkg --print-architecture) signed-by=\u002Fetc\u002Fapt\u002Fkeyrings\u002Fgithubcli-archive-keyring.gpg] https:\u002F\u002Fcli.github.com\u002Fpackages stable main\" \\\n     | sudo tee \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fgithub-cli.list > \u002Fdev\u002Fnull \\\n  && sudo apt update && sudo apt install gh -y\n\n# Linux (Alpine)\napk add github-cli\n\n# Windows (WSL2): use the Linux (Debian\u002FUbuntu) installer above\n```\n\n### SSH Keys\n\nAn SSH key identifies your machine as authentic to remote services. Generate one key and register the public key with each service that requires it — GitHub (via `gh`) and HuggingFace (via browser).\n\n**Generate a key**\n\n```bash\nssh-keygen -t ed25519 -C \"your_email@example.com\"\n# Saves to ~\u002F.ssh\u002Fid_ed25519 (private) and ~\u002F.ssh\u002Fid_ed25519.pub (public)\n# Press Enter to accept the default path; set a passphrase or leave blank\n```\n\n**Add the key to the SSH agent**\n\n```bash\n# macOS\neval \"$(ssh-agent -s)\"\nssh-add --apple-use-keychain ~\u002F.ssh\u002Fid_ed25519\n\n# macOS — also add to ~\u002F.ssh\u002Fconfig so the key loads automatically on login.\n# Create the file if it doesn't exist, and add these lines:\n#\n#   Host *\n#     AddKeysToAgent yes\n#     UseKeychain yes\n#     IdentityFile ~\u002F.ssh\u002Fid_ed25519\n\n# Linux\neval \"$(ssh-agent -s)\"\nssh-add ~\u002F.ssh\u002Fid_ed25519\n\n# Windows (WSL2): use the Linux instructions above\n```\n\n### Credentials\n\n```bash\n# Interactive login — when prompted, select SSH as the git protocol\ngh auth login\n\n# Verify auth\ngh auth status\n```\n\n**Register the public key with each service**\n\n```bash\n# GitHub — upload via gh CLI (requires auth above to be completed first)\ngh ssh-key add ~\u002F.ssh\u002Fid_ed25519.pub --title \"my-machine\"\n\n# HuggingFace — paste contents of public key manually in browser\ncat ~\u002F.ssh\u002Fid_ed25519.pub   # copy this output\n# Then add at https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Fkeys\n```\n\n### Key Commands\n\n```bash\n# Repositories\ngh repo create my-worker --public             # create a new public repo (required for Hub)\ngh repo clone owner\u002Frepo                      # clone a repository over SSH\ngh repo clone owner\u002Frepo -- --depth 1        # shallow clone\ngh repo view owner\u002Frepo                       # view repo details and URL\n\n# Releases — the Runpod Hub indexes releases, not commits\n# Every update to a Hub listing requires a new GitHub release\ngh release create v1.0.0 --title \"v1.0.0\" --notes \"Initial release\"   # create a release\ngh release create v1.0.1 --title \"v1.0.1\" --notes \"Update model tag\"  # update Hub listing\ngh release list                               # list all releases\ngh release view v1.0.0                        # view release details\n```\n\n#### Runpod Hub repository structure\n\nA Hub-compatible repository requires these files (in root or `.runpod\u002F` directory):\n\n```\nhandler.py        # serverless worker implementation\nDockerfile        # container definition\nREADME.md         # documentation shown on Hub listing\n.runpod\u002F\n  hub.json        # Hub metadata: title, description, category, GPU config, env vars\n  tests.json      # test cases run after each release\n```\n\nTo publish: go to https:\u002F\u002Fconsole.runpod.io → Hub → Add your repo → enter the GitHub repository URL.\n\n---\n\n## Docker\n\nDocker is used to build and validate container images locally before pushing to Docker Hub. Runpod uses Docker Hub as its default image registry — serverless endpoints, pods, and templates all reference images by their Docker Hub tag. Once an image is pushed, Runpod workers pull it automatically when the endpoint or pod is started.\n\n### Install\n\n**macOS:** Download Docker Desktop from https:\u002F\u002Fdocs.docker.com\u002Fdesktop\u002Fsetup\u002Finstall\u002Fmac-install\u002F\n- Choose the **Apple Silicon** installer for M-series Macs, or **Intel Chip** for older Macs\n- Open the DMG, drag Docker to Applications, and launch it\n\n**Windows:** Download Docker Desktop from https:\u002F\u002Fdocs.docker.com\u002Fdesktop\u002Fsetup\u002Finstall\u002Fwindows-install\u002F\n- Requires WSL 2 — if you followed the WSL2 setup above, Docker Desktop will detect it automatically\n- After installation, `docker` commands work inside your WSL2 terminal without extra configuration\n- Run the installer and follow the setup wizard\n\n**Linux:** See https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Finstall\u002F for distro-specific instructions\n\n```bash\n# Linux convenience script (Ubuntu\u002FDebian)\ncurl -fsSL https:\u002F\u002Fget.docker.com | sh\nsudo usermod -aG docker $USER   # allow non-root usage (re-login after)\n```\n\n### Credentials\n\nDocker Hub authentication uses a personal access token (PAT), not your account password.\n\n1. Go to https:\u002F\u002Fapp.docker.com → Avatar (top right) → Account Settings → Personal Access Tokens\n2. Click **Generate new token** — give it a descriptive name, set an expiration, and choose **Read & Write** access\n3. Copy the token immediately — it is shown only once\n\n```bash\ndocker login -u DOCKERHUB_USERNAME\n# When prompted for a password, paste your personal access token\n```\n\nCredentials are saved to `~\u002F.docker\u002Fconfig.json` after a successful login.\n\n### Tagging\n\n> **Always use explicit semantic version tags. Never rely on `latest`.**\n\nThe `latest` tag does not automatically point to the newest image — it only reflects the last build that was pushed without an explicit tag. If you push `v1.0.0` and then push `v1.0.1` with an explicit tag, `latest` still points to `v1.0.0`. Runpod workers pinned to `latest` will silently pull the wrong version.\n\nUse a tag that uniquely identifies the build: `v1.0.0`, `v1.0.1`, etc.\n\n```bash\n# Correct: explicit semantic version tag\ndocker build --platform=linux\u002Famd64 -t myorg\u002Fmyimage:v1.0.0 .\ndocker push myorg\u002Fmyimage:v1.0.0\n\n# Wrong: latest tag is ambiguous and unreliable\ndocker build -t myorg\u002Fmyimage:latest .\n```\n\n### Docker Hub\n\nDocker Hub is the registry Runpod pulls images from. After pushing, images are visible at https:\u002F\u002Fhub.docker.com\u002Frepositories\u002F and referenceable in Runpod as `username\u002Fimage:tag`.\n\nImages on Docker Hub can be public (anyone can pull) or private (requires credentials). For private images, register your Docker Hub credentials in Runpod once and they become available to any template:\n\n1. Go to https:\u002F\u002Fconsole.runpod.io\u002Fuser\u002Fsettings → **Container Registry Settings**\n2. Add your Docker Hub username and personal access token (the same PAT used for `docker login`)\n3. When creating or editing a template, select the saved credential from the dropdown\n\n> Runpod currently only supports `docker login` type credentials for container registry authentication.\n\n### Key Commands\n\n```bash\n# Build for Runpod (always --platform=linux\u002Famd64 — pods run on x86 Linux)\ndocker build --platform=linux\u002Famd64 -t myorg\u002Fmyimage:v1.0.0 .\ndocker build --platform=linux\u002Famd64 -t myorg\u002Fmyimage:v1.0.0 -f Dockerfile.prod .  # specify Dockerfile\n\n# Tag an existing image before pushing (does not duplicate image data)\ndocker tag myorg\u002Fmyimage:v1.0.0 myorg\u002Fmyimage:v1.0.1\n\n# Push to Docker Hub (image becomes available to Runpod as myorg\u002Fmyimage:v1.0.0)\ndocker push myorg\u002Fmyimage:v1.0.0\n\n# Run locally for validation\ndocker run --rm -it myorg\u002Fmyimage:v1.0.0 bash\ndocker run --rm --gpus all myorg\u002Fmyimage:v1.0.0 bash   # with GPU (requires nvidia-container-toolkit)\ndocker run --rm -p 8080:80 -e API_KEY=secret myorg\u002Fmyimage:v1.0.0  # port mapping + env vars\n\n# Debug a running container\ndocker exec -it CONTAINER_ID \u002Fbin\u002Fbash\n\n# Inspect\ndocker images                          # list local images\ndocker ps -a                           # list all containers (including stopped)\ndocker logs CONTAINER_ID             # view container output\ndocker logs -f CONTAINER_ID          # follow logs in real time\n\n# Cleanup\ndocker rmi myorg\u002Fmyimage:v1.0.0        # remove an image\ndocker rm CONTAINER_ID               # remove a stopped container\n```\n\n---\n\n## AWS CLI\n\nThe AWS CLI is used to access Runpod storage over the S3 protocol. Any Runpod product that can mount a Network Volume — pods, clusters, and serverless endpoints — can have its storage accessed this way. The bucket name is the network volume ID.\n\n### Install\n\n```bash\n# macOS\nbrew install awscli\n\n# Linux\ncurl \"https:\u002F\u002Fawscli.amazonaws.com\u002Fawscli-exe-linux-x86_64.zip\" -o awscliv2.zip\nunzip awscliv2.zip && sudo .\u002Faws\u002Finstall\n```\n\n### Credentials\n\nRunpod uses its own S3-compatible API, not AWS. You need a Runpod user ID and S3 API key — not an AWS account.\n\n- **Access key** (`AWS_ACCESS_KEY_ID`): your Runpod user ID — found in the console under Settings > S3 API Keys, in the key description (format: `user_...`)\n- **Secret key** (`AWS_SECRET_ACCESS_KEY`): an S3 API key — generate one at Settings > S3 API Keys > Create. Shown only once; save it immediately (format: `rps_...`)\n\n```bash\n# Option 1: interactive configure (writes ~\u002F.aws\u002Fcredentials and ~\u002F.aws\u002Fconfig)\n# When prompted: enter user ID as access key, S3 API key as secret.\n# Press Enter to skip region and output format — region is always passed per-command, not stored in config.\naws configure\n\naws configure list    # verify stored credentials\n\n# Option 2: environment variables (override config files)\nexport AWS_ACCESS_KEY_ID=user_...\nexport AWS_SECRET_ACCESS_KEY=rps_...\n\n# To stop using env vars and fall back to config file:\nunset AWS_ACCESS_KEY_ID\nunset AWS_SECRET_ACCESS_KEY\n```\n\n### Region and Endpoint\n\nThe `--region` flag on every command is the Runpod datacenter ID where the network volume lives — not an AWS region. The `--endpoint-url` is derived from the same datacenter ID.\n\nEvery command requires both flags:\n```\n--region DATACENTER --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F\n```\n\n**Tip:** Each network volume on the storage page at https:\u002F\u002Fconsole.runpod.io\u002Fuser\u002Fstorage\u002F shows a pre-filled example `aws s3 ls` command with the correct `--region` and `--endpoint-url` already substituted. Use this to confirm the exact values for a given volume.\n\nDatacenter IDs by region:\n\n| Region | Datacenter IDs |\n|--------|---------------|\n| EU | CZ-1, RO-1, IS-1, NO-1 |\n| US | CA-2, GA-2, IL-1, KS-2, MD-1, MO-1, MO-2, NC-1, NC-2, NE-1, WA-1 |\n\n### Key Commands\n\nReplace `DATACENTER` with the datacenter ID of your network volume (e.g. `CA-2`) and `NETWORK_VOLUME_ID` with the volume ID (used as the S3 bucket name).\n\n```bash\n# List files in a volume\naws s3 ls \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002F\n\n# List a subdirectory\naws s3 ls \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002Fmy-folder\u002F\n\n# Upload a file\naws s3 cp local-file.txt \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002F\n\n# Download a file\naws s3 cp \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002Fremote-file.txt .\u002F\n\n# Delete a file\naws s3 rm \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002Fremote-file.txt\n\n# Sync a local directory to a volume\naws s3 sync local-dir\u002F \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002Fremote-dir\u002F\n```\n\nPath mapping: `\u002Fworkspace\u002Fmy-folder\u002Ffile.txt` on a pod = `s3:\u002F\u002FNETWORK_VOLUME_ID\u002Fmy-folder\u002Ffile.txt` via S3.\n\n### Troubleshooting\n\n```bash\n# Retry on timeout (large transfers)\nexport AWS_RETRY_MODE=standard\nexport AWS_MAX_ATTEMPTS=10\n\n# Extend read timeout for large files (seconds)\naws s3 cp large-file.zip \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  --cli-read-timeout 7200 \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002F\n```\n","# Companion CLIs\n\nFour CLIs commonly needed alongside Runpod: HuggingFace (`hf`), GitHub (`gh`), Docker (`docker`), and AWS (`aws`). Each requires credentials before use.\n\n## Windows: Install WSL2 First\n\nIf you are on Windows, install WSL2 (Windows Subsystem for Linux) before proceeding. WSL2 gives you a native Linux environment on Windows, which all these CLIs are designed for. Run in PowerShell as Administrator, then restart:\n\n```powershell\nwsl --install\n```\n\nThis installs WSL2 with Ubuntu by default. After restarting, open the Ubuntu app to complete setup (create a Linux username and password). From that point on, follow the **Linux** instructions throughout this skill.\n\n## HuggingFace CLI\n\nThe HuggingFace CLI (`hf`) is used to download models from the Hub to your local machine so they are cached and available when you build and run the Docker container. For example, to deploy `meta-llama\u002FLlama-3.1-8B` to a Runpod serverless endpoint: download the model locally first, build a Docker image that includes or mounts it, validate the container locally, then push the image to Docker Hub for Runpod to pull.\n\n### Install\n\n```bash\n# macOS \u002F Linux (standalone installer — recommended)\ncurl -LsSf https:\u002F\u002Fhf.co\u002Fcli\u002Finstall.sh | bash\n\n# macOS (Homebrew)\nbrew install hf\n\n# Windows (WSL2): use the Linux standalone installer above\n```\n\n> **Note:** `pip install huggingface_hub` installs the older Python CLI (`huggingface-cli`), which uses different command syntax. The commands below are for the standalone `hf` CLI.\n\n### Credentials\n\nGet a token at https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Ftokens. Use **write** access for uploading; **read** access is sufficient for downloading public or gated models.\n\n```bash\n# Option 1: interactive login (saves token to ~\u002F.cache\u002Fhuggingface\u002Ftoken, optionally to git credential store)\nhf auth login\n\n# Option 2: non-interactive (pass token directly, useful in scripts and pod start commands)\nhf auth login --token $HF_TOKEN --add-to-git-credential\n\n# Option 3: environment variable (takes precedence over saved token; to revert, unset the variable)\nexport HF_TOKEN=hf_...\n```\n\n```bash\nhf auth whoami      # confirm auth and org memberships\nhf auth logout      # delete all locally stored tokens\n```\n\n### Key Commands\n\n```bash\n# Download a model to a local directory (use --local-dir to control where it lands)\nhf download meta-llama\u002FLlama-3.1-8B --local-dir .\u002Fmodels\u002Fllama-3.1-8b\nhf download TinyLlama\u002FTinyLlama-1.1B-Chat-v1.0 --local-dir .\u002Fmodels\u002Ftinyllama\n\n# Download a single file from a model repo\nhf download meta-llama\u002FLlama-3.1-8B config.json --local-dir .\u002Fmodels\u002Fllama-3.1-8b\n\n# Download with glob filters (e.g. only safetensors weights, skip fp16 variants)\nhf download stabilityai\u002Fstable-diffusion-xl-base-1.0 \\\n  --include \"*.safetensors\" --exclude \"*.fp16.*\" \\\n  --local-dir .\u002Fmodels\u002Fsdxl\n\n# Download a specific revision (commit hash, branch, or tag — append --revision REF)\nhf download meta-llama\u002FLlama-3.1-8B --revision v1.0 --local-dir .\u002Fmodels\u002Fllama-3.1-8b\n```\n\n### Troubleshooting\n\n```bash\n# Increase download timeout on slow connections (default: 10s)\nexport HF_HUB_DOWNLOAD_TIMEOUT=30\n```\n\n---\n\n## GitHub CLI\n\nThe GitHub CLI (`gh`) is used to manage repositories for Runpod serverless workers. This includes cloning repos into local Docker containers for testing, versioning source code so changes can be tracked and shared with teammates or collaborators, and creating GitHub releases that publish listings to the Runpod Hub. The Hub indexes releases — not commits — so every deployment update requires a new release.\n\n### Install\n\n```bash\n# macOS\nbrew install gh\n\n# Linux (Debian\u002FUbuntu)\n(type -p wget >\u002Fdev\u002Fnull || (sudo apt update && sudo apt install wget -y)) \\\n  && sudo mkdir -p -m 755 \u002Fetc\u002Fapt\u002Fkeyrings \\\n  && out=$(mktemp) && wget -nv -O$out https:\u002F\u002Fcli.github.com\u002Fpackages\u002Fgithubcli-archive-keyring.gpg \\\n  && cat $out | sudo tee \u002Fetc\u002Fapt\u002Fkeyrings\u002Fgithubcli-archive-keyring.gpg > \u002Fdev\u002Fnull \\\n  && sudo chmod go+r \u002Fetc\u002Fapt\u002Fkeyrings\u002Fgithubcli-archive-keyring.gpg \\\n  && echo \"deb [arch=$(dpkg --print-architecture) signed-by=\u002Fetc\u002Fapt\u002Fkeyrings\u002Fgithubcli-archive-keyring.gpg] https:\u002F\u002Fcli.github.com\u002Fpackages stable main\" \\\n     | sudo tee \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fgithub-cli.list > \u002Fdev\u002Fnull \\\n  && sudo apt update && sudo apt install gh -y\n\n# Linux (Alpine)\napk add github-cli\n\n# Windows (WSL2): use the Linux (Debian\u002FUbuntu) installer above\n```\n\n### SSH Keys\n\nAn SSH key identifies your machine as authentic to remote services. Generate one key and register the public key with each service that requires it — GitHub (via `gh`) and HuggingFace (via browser).\n\n**Generate a key**\n\n```bash\nssh-keygen -t ed25519 -C \"your_email@example.com\"\n# Saves to ~\u002F.ssh\u002Fid_ed25519 (private) and ~\u002F.ssh\u002Fid_ed25519.pub (public)\n# Press Enter to accept the default path; set a passphrase or leave blank\n```\n\n**Add the key to the SSH agent**\n\n```bash\n# macOS\neval \"$(ssh-agent -s)\"\nssh-add --apple-use-keychain ~\u002F.ssh\u002Fid_ed25519\n\n# macOS — also add to ~\u002F.ssh\u002Fconfig so the key loads automatically on login.\n# Create the file if it doesn't exist, and add these lines:\n#\n#   Host *\n#     AddKeysToAgent yes\n#     UseKeychain yes\n#     IdentityFile ~\u002F.ssh\u002Fid_ed25519\n\n# Linux\neval \"$(ssh-agent -s)\"\nssh-add ~\u002F.ssh\u002Fid_ed25519\n\n# Windows (WSL2): use the Linux instructions above\n```\n\n### Credentials\n\n```bash\n# Interactive login — when prompted, select SSH as the git protocol\ngh auth login\n\n# Verify auth\ngh auth status\n```\n\n**Register the public key with each service**\n\n```bash\n# GitHub — upload via gh CLI (requires auth above to be completed first)\ngh ssh-key add ~\u002F.ssh\u002Fid_ed25519.pub --title \"my-machine\"\n\n# HuggingFace — paste contents of public key manually in browser\ncat ~\u002F.ssh\u002Fid_ed25519.pub   # copy this output\n# Then add at https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Fkeys\n```\n\n### Key Commands\n\n```bash\n# Repositories\ngh repo create my-worker --public             # create a new public repo (required for Hub)\ngh repo clone owner\u002Frepo                      # clone a repository over SSH\ngh repo clone owner\u002Frepo -- --depth 1        # shallow clone\ngh repo view owner\u002Frepo                       # view repo details and URL\n\n# Releases — the Runpod Hub indexes releases, not commits\n# Every update to a Hub listing requires a new GitHub release\ngh release create v1.0.0 --title \"v1.0.0\" --notes \"Initial release\"   # create a release\ngh release create v1.0.1 --title \"v1.0.1\" --notes \"Update model tag\"  # update Hub listing\ngh release list                               # list all releases\ngh release view v1.0.0                        # view release details\n```\n\n#### Runpod Hub repository structure\n\nA Hub-compatible repository requires these files (in root or `.runpod\u002F` directory):\n\n```\nhandler.py        # serverless worker implementation\nDockerfile        # container definition\nREADME.md         # documentation shown on Hub listing\n.runpod\u002F\n  hub.json        # Hub metadata: title, description, category, GPU config, env vars\n  tests.json      # test cases run after each release\n```\n\nTo publish: go to https:\u002F\u002Fconsole.runpod.io → Hub → Add your repo → enter the GitHub repository URL.\n\n---\n\n## Docker\n\nDocker is used to build and validate container images locally before pushing to Docker Hub. Runpod uses Docker Hub as its default image registry — serverless endpoints, pods, and templates all reference images by their Docker Hub tag. Once an image is pushed, Runpod workers pull it automatically when the endpoint or pod is started.\n\n### Install\n\n**macOS:** Download Docker Desktop from https:\u002F\u002Fdocs.docker.com\u002Fdesktop\u002Fsetup\u002Finstall\u002Fmac-install\u002F\n- Choose the **Apple Silicon** installer for M-series Macs, or **Intel Chip** for older Macs\n- Open the DMG, drag Docker to Applications, and launch it\n\n**Windows:** Download Docker Desktop from https:\u002F\u002Fdocs.docker.com\u002Fdesktop\u002Fsetup\u002Finstall\u002Fwindows-install\u002F\n- Requires WSL 2 — if you followed the WSL2 setup above, Docker Desktop will detect it automatically\n- After installation, `docker` commands work inside your WSL2 terminal without extra configuration\n- Run the installer and follow the setup wizard\n\n**Linux:** See https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Finstall\u002F for distro-specific instructions\n\n```bash\n# Linux convenience script (Ubuntu\u002FDebian)\ncurl -fsSL https:\u002F\u002Fget.docker.com | sh\nsudo usermod -aG docker $USER   # allow non-root usage (re-login after)\n```\n\n### Credentials\n\nDocker Hub authentication uses a personal access token (PAT), not your account password.\n\n1. Go to https:\u002F\u002Fapp.docker.com → Avatar (top right) → Account Settings → Personal Access Tokens\n2. Click **Generate new token** — give it a descriptive name, set an expiration, and choose **Read & Write** access\n3. Copy the token immediately — it is shown only once\n\n```bash\ndocker login -u DOCKERHUB_USERNAME\n# When prompted for a password, paste your personal access token\n```\n\nCredentials are saved to `~\u002F.docker\u002Fconfig.json` after a successful login.\n\n### Tagging\n\n> **Always use explicit semantic version tags. Never rely on `latest`.**\n\nThe `latest` tag does not automatically point to the newest image — it only reflects the last build that was pushed without an explicit tag. If you push `v1.0.0` and then push `v1.0.1` with an explicit tag, `latest` still points to `v1.0.0`. Runpod workers pinned to `latest` will silently pull the wrong version.\n\nUse a tag that uniquely identifies the build: `v1.0.0`, `v1.0.1`, etc.\n\n```bash\n# Correct: explicit semantic version tag\ndocker build --platform=linux\u002Famd64 -t myorg\u002Fmyimage:v1.0.0 .\ndocker push myorg\u002Fmyimage:v1.0.0\n\n# Wrong: latest tag is ambiguous and unreliable\ndocker build -t myorg\u002Fmyimage:latest .\n```\n\n### Docker Hub\n\nDocker Hub is the registry Runpod pulls images from. After pushing, images are visible at https:\u002F\u002Fhub.docker.com\u002Frepositories\u002F and referenceable in Runpod as `username\u002Fimage:tag`.\n\nImages on Docker Hub can be public (anyone can pull) or private (requires credentials). For private images, register your Docker Hub credentials in Runpod once and they become available to any template:\n\n1. Go to https:\u002F\u002Fconsole.runpod.io\u002Fuser\u002Fsettings → **Container Registry Settings**\n2. Add your Docker Hub username and personal access token (the same PAT used for `docker login`)\n3. When creating or editing a template, select the saved credential from the dropdown\n\n> Runpod currently only supports `docker login` type credentials for container registry authentication.\n\n### Key Commands\n\n```bash\n# Build for Runpod (always --platform=linux\u002Famd64 — pods run on x86 Linux)\ndocker build --platform=linux\u002Famd64 -t myorg\u002Fmyimage:v1.0.0 .\ndocker build --platform=linux\u002Famd64 -t myorg\u002Fmyimage:v1.0.0 -f Dockerfile.prod .  # specify Dockerfile\n\n# Tag an existing image before pushing (does not duplicate image data)\ndocker tag myorg\u002Fmyimage:v1.0.0 myorg\u002Fmyimage:v1.0.1\n\n# Push to Docker Hub (image becomes available to Runpod as myorg\u002Fmyimage:v1.0.0)\ndocker push myorg\u002Fmyimage:v1.0.0\n\n# Run locally for validation\ndocker run --rm -it myorg\u002Fmyimage:v1.0.0 bash\ndocker run --rm --gpus all myorg\u002Fmyimage:v1.0.0 bash   # with GPU (requires nvidia-container-toolkit)\ndocker run --rm -p 8080:80 -e API_KEY=secret myorg\u002Fmyimage:v1.0.0  # port mapping + env vars\n\n# Debug a running container\ndocker exec -it CONTAINER_ID \u002Fbin\u002Fbash\n\n# Inspect\ndocker images                          # list local images\ndocker ps -a                           # list all containers (including stopped)\ndocker logs CONTAINER_ID             # view container output\ndocker logs -f CONTAINER_ID          # follow logs in real time\n\n# Cleanup\ndocker rmi myorg\u002Fmyimage:v1.0.0        # remove an image\ndocker rm CONTAINER_ID               # remove a stopped container\n```\n\n---\n\n## AWS CLI\n\nThe AWS CLI is used to access Runpod storage over the S3 protocol. Any Runpod product that can mount a Network Volume — pods, clusters, and serverless endpoints — can have its storage accessed this way. The bucket name is the network volume ID.\n\n### Install\n\n```bash\n# macOS\nbrew install awscli\n\n# Linux\ncurl \"https:\u002F\u002Fawscli.amazonaws.com\u002Fawscli-exe-linux-x86_64.zip\" -o awscliv2.zip\nunzip awscliv2.zip && sudo .\u002Faws\u002Finstall\n```\n\n### Credentials\n\nRunpod uses its own S3-compatible API, not AWS. You need a Runpod user ID and S3 API key — not an AWS account.\n\n- **Access key** (`AWS_ACCESS_KEY_ID`): your Runpod user ID — found in the console under Settings > S3 API Keys, in the key description (format: `user_...`)\n- **Secret key** (`AWS_SECRET_ACCESS_KEY`): an S3 API key — generate one at Settings > S3 API Keys > Create. Shown only once; save it immediately (format: `rps_...`)\n\n```bash\n# Option 1: interactive configure (writes ~\u002F.aws\u002Fcredentials and ~\u002F.aws\u002Fconfig)\n# When prompted: enter user ID as access key, S3 API key as secret.\n# Press Enter to skip region and output format — region is always passed per-command, not stored in config.\naws configure\n\naws configure list    # verify stored credentials\n\n# Option 2: environment variables (override config files)\nexport AWS_ACCESS_KEY_ID=user_...\nexport AWS_SECRET_ACCESS_KEY=rps_...\n\n# To stop using env vars and fall back to config file:\nunset AWS_ACCESS_KEY_ID\nunset AWS_SECRET_ACCESS_KEY\n```\n\n### Region and Endpoint\n\nThe `--region` flag on every command is the Runpod datacenter ID where the network volume lives — not an AWS region. The `--endpoint-url` is derived from the same datacenter ID.\n\nEvery command requires both flags:\n```\n--region DATACENTER --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F\n```\n\n**Tip:** Each network volume on the storage page at https:\u002F\u002Fconsole.runpod.io\u002Fuser\u002Fstorage\u002F shows a pre-filled example `aws s3 ls` command with the correct `--region` and `--endpoint-url` already substituted. Use this to confirm the exact values for a given volume.\n\nDatacenter IDs by region:\n\n| Region | Datacenter IDs |\n|--------|---------------|\n| EU | CZ-1, RO-1, IS-1, NO-1 |\n| US | CA-2, GA-2, IL-1, KS-2, MD-1, MO-1, MO-2, NC-1, NC-2, NE-1, WA-1 |\n\n### Key Commands\n\nReplace `DATACENTER` with the datacenter ID of your network volume (e.g. `CA-2`) and `NETWORK_VOLUME_ID` with the volume ID (used as the S3 bucket name).\n\n```bash\n# List files in a volume\naws s3 ls \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002F\n\n# List a subdirectory\naws s3 ls \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002Fmy-folder\u002F\n\n# Upload a file\naws s3 cp local-file.txt \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002F\n\n# Download a file\naws s3 cp \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002Fremote-file.txt .\u002F\n\n# Delete a file\naws s3 rm \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002Fremote-file.txt\n\n# Sync a local directory to a volume\naws s3 sync local-dir\u002F \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002Fremote-dir\u002F\n```\n\nPath mapping: `\u002Fworkspace\u002Fmy-folder\u002Ffile.txt` on a pod = `s3:\u002F\u002FNETWORK_VOLUME_ID\u002Fmy-folder\u002Ffile.txt` via S3.\n\n### Troubleshooting\n\n```bash\n# Retry on timeout (large transfers)\nexport AWS_RETRY_MODE=standard\nexport AWS_MAX_ATTEMPTS=10\n\n# Extend read timeout for large files (seconds)\naws s3 cp large-file.zip \\\n  --region DATACENTER \\\n  --endpoint-url https:\u002F\u002Fs3api-DATACENTER.runpod.io\u002F \\\n  --cli-read-timeout 7200 \\\n  s3:\u002F\u002FNETWORK_VOLUME_ID\u002F\n```\n",{"name":5,"license":14,"metadata":23,"description":7,"allowed-tools":26,"compatibility":27},{"author":24,"version":25},"runpod","1.0","Bash(hf:*), Bash(gh:*), Bash(docker:*), Bash(aws:*), Bash(ssh-keygen:*), Bash(ssh-add:*), Bash(ssh-agent:*)","Linux, macOS, Windows","main","4ef72a828b24c99c49109033c7ec504c34f3bd17",".claude\u002Fskills\u002Fcompanion-clis",0,"https:\u002F\u002Fgithub.com\u002Fhanchenhao\u002Fai-canvas","https:\u002F\u002Fgithub.com\u002Fhanchenhao","2026-08-18 16:41:12",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add hanchenhao\u002Fai-canvas --skill companion-clis",{"tool":41,"command":42},"bunx","bunx skills add hanchenhao\u002Fai-canvas --skill companion-clis",{"tool":44,"command":45},"pnpm","pnpm dlx skills add hanchenhao\u002Fai-canvas --skill companion-clis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhanchenhao\u002Fai-canvas\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcompanion-clis\u002FSKILL.md",true,[],[50,58,65,72,79,86],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":54,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7AE5NP5AWGV47WS3F37VPZ1","sandbox-zip","Read and write zip archives in a Code node or CodeAct action, with fflate running on the host under a 50 MB inflation cap","AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fhanchenhao\u002Fai-canvas\u002Fblob\u002Fmain\u002Fpackages\u002Fsandbox-packs\u002Fsandbox-zip\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":54,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7AE5JP0CG2S114Q246RC6MH","sandbox-yaml","Read and write YAML inside a Code node or CodeAct action, with js-yaml running in the guest","https:\u002F\u002Fgithub.com\u002Fhanchenhao\u002Fai-canvas\u002Fblob\u002Fmain\u002Fpackages\u002Fsandbox-packs\u002Fsandbox-yaml\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":54,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7AE5GJ9AV36WM1DPW1878VM","sandbox-xml","Parse XML feeds and sitemaps in a Code node or CodeAct action, with fast-xml-parser running on the host","https:\u002F\u002Fgithub.com\u002Fhanchenhao\u002Fai-canvas\u002Fblob\u002Fmain\u002Fpackages\u002Fsandbox-packs\u002Fsandbox-xml\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":54,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M7AE5DMYDAGJW27G8KKTZ2BN","sandbox-xlsx","Read and write Excel workbooks in a Code node or CodeAct action, with exceljs running on the host","https:\u002F\u002Fgithub.com\u002Fhanchenhao\u002Fai-canvas\u002Fblob\u002Fmain\u002Fpackages\u002Fsandbox-packs\u002Fsandbox-xlsx\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":54,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7AE5BARJSFCT296SEMYDSJQ","sandbox-twilio","Send SMS and WhatsApp messages and look up numbers from a Code node or CodeAct action, with NodeTool's Twilio request builder running on the host","https:\u002F\u002Fgithub.com\u002Fhanchenhao\u002Fai-canvas\u002Fblob\u002Fmain\u002Fpackages\u002Fsandbox-packs\u002Fsandbox-twilio\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":54,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M7AE57C5APRDF96NB3G0WQMW","sandbox-tfjs","Classify and embed images, detect objects, and answer from a passage in a Code node or CodeAct action, with TensorFlow.js running on the host","https:\u002F\u002Fgithub.com\u002Fhanchenhao\u002Fai-canvas\u002Fblob\u002Fmain\u002Fpackages\u002Fsandbox-packs\u002Fsandbox-tfjs\u002FSKILL.md",[],[]]