Render Cli 标志

Render Cli

社区
exiao
render-cli

Manage Render.com services, deploys, databases, logs, and infrastructure using the official Render CLI (`render`). Use this skill whenever the user asks about Render deployments, service management, viewing Render logs, restarting Render services, running database queries on Render Postgres, triggering deploys, managing environments/projects, or anything related to their Render infrastructure. Also use when the user mentions render.com, Render dashboard actions, or wants to automate Render workflows.

概览

发布者exiao
代码仓库skills
技能名称render-cli
星标数
40
复刻数
12
附带文件
1
链接
  • Markdown 格式的指令

    模型按需加载的 SKILL.md 文件,因此只有在请求确实匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个随附文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 exiao 发布于 GitHub。请在安装前查看源内容。

安装

在 TypingMind 中安装 Render Cli AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/exiao/skills/tree/main/external-services/render-cli
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/exiao/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/external-services/render-cli .claude/skills/render-cli
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Render Cli,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Render Cli。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Render Cli 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会获取指令,因此未使用的技能不会产生额外费用。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Render CLI

Manage Render.com infrastructure from the command line using the official render CLI (Go binary, installed via brew install render).

Docs: https://render.com/docs/cli Source: https://github.com/render-oss/cli

Prerequisites

  • render CLI installed (brew install render)
  • Authenticated via render login (browser-based) or RENDER_API_KEY env var
  • Active workspace set via render workspace set

Non-Interactive Mode

AI agents cannot use interactive menus. Always pass --output json --confirm (or -o json --confirm) to every command. This disables prompts and returns structured output.

bash
render <command> -o json --confirm

Output formats: json, yaml, text. Use json for parsing, text for human-readable.

Commands

Services

bash
# List all services in active workspace
render services -o json --confirm

# Filter by environment
render services -e env-abc123 -o json --confirm

# Include preview environments
render services --include-previews -o json --confirm

# List instances for a service
render services instances <SERVICE_ID> -o json --confirm

# Create a service
render services create --name my-api --type web_service --repo https://github.com/org/repo -o json --confirm

# Clone from existing service
render services create --from srv-abc123 --name my-api-clone -o json --confirm

# Update a service
render services update <SERVICE_ID> -o json --confirm

Service types for --type: web_service, static_site, private_service, background_worker, cron_job.

Deploys

bash
# List deploys
render deploys list <SERVICE_ID> -o json --confirm

# Trigger a deploy
render deploys create <SERVICE_ID> -o json --confirm

# Deploy specific commit
render deploys create <SERVICE_ID> --commit <SHA> -o json --confirm

# Deploy specific Docker image
render deploys create <SERVICE_ID> --image <URL> -o json --confirm

# Deploy and wait for completion (non-zero exit on failure)
render deploys create <SERVICE_ID> --wait -o json --confirm

# Clear build cache before deploying
render deploys create <SERVICE_ID> --clear-cache -o json --confirm

# Cancel a running deploy
render deploys cancel <SERVICE_ID> -o json --confirm

Restart

bash
render restart <SERVICE_ID> -o json --confirm

Logs

bash
# Basic log fetch
render logs -r <SERVICE_ID> -o json --confirm

# Filter by time range
render logs -r <SERVICE_ID> --start "2026-04-01T00:00:00Z" --end "2026-04-02T00:00:00Z" -o json --confirm

# Filter by log level
render logs -r <SERVICE_ID> --level error -o json --confirm

# Filter by text search
render logs -r <SERVICE_ID> --text "connection refused" -o json --confirm

# Filter by HTTP status code
render logs -r <SERVICE_ID> --status-code 500,502 -o json --confirm

# Filter by HTTP method and path
render logs -r <SERVICE_ID> --method POST --path "/api/webhook" -o json --confirm

# Limit number of results
render logs -r <SERVICE_ID> --limit 50 -o json --confirm

# Multiple resources at once
render logs -r <SERVICE_ID_1>,<SERVICE_ID_2> -o json --confirm

# Tail/stream logs (interactive only, won't work in automation)
render logs -r <SERVICE_ID> --tail

The -r / --resources flag is required in non-interactive mode.

Database Sessions

bash
# Open psql session (interactive)
render psql <DATABASE_ID>

# Run a single query
render psql <DATABASE_ID> -c "SELECT NOW();" -o text --confirm

# Query as JSON
render psql <DATABASE_ID> -c "SELECT id, name FROM users LIMIT 5;" -o json --confirm

# CSV output via psql passthrough
render psql <DATABASE_ID> -c "SELECT id, email FROM users;" -o text --confirm -- --csv

# Open redis/valkey CLI
render kv-cli <KV_ID>

SSH

bash
# SSH into running instance
render ssh <SERVICE_ID>

# Ephemeral shell (isolated, no start command)
render ssh <SERVICE_ID> --ephemeral

# Pass args to ssh
render ssh <SERVICE_ID> -- -L 8080:localhost:8080

One-Off Jobs

bash
# List jobs for a service
render jobs list <SERVICE_ID> -o json --confirm

# Create a job
render jobs create <SERVICE_ID> --start-command "python manage.py migrate" -o json --confirm

# Cancel a running job
render jobs cancel <SERVICE_ID> -o json --confirm

Projects & Environments

bash
# List projects
render projects -o json --confirm

# List environments for a project
render environments <PROJECT_ID> -o json --confirm

Workspaces

bash
# List workspaces
render workspaces -o json --confirm

# Set active workspace
render workspace set

# Show current user/workspace
render whoami -o json --confirm

Blueprints

bash
# Validate render.yaml
render blueprints validate ./render.yaml -o json --confirm

Workflows

bash
# List workflows
render workflows list -o json --confirm

# List workflow versions
render workflows versions <WORKFLOW_ID> -o json --confirm

# List workflow tasks
render workflows tasks <WORKFLOW_ID> -o json --confirm

# View task runs
render workflows runs <WORKFLOW_ID> -o json --confirm

Agent Skills

bash
# List installed Render agent skills
render skills list -o json --confirm

# Install skills for coding tools
render skills install -o json --confirm

# Update installed skills
render skills update -o json --confirm

# Remove installed skills
render skills remove -o json --confirm

Authentication

Two methods:

  1. CLI token (interactive login): render login opens browser, generates token saved to ~/.render/cli.yaml. Tokens expire periodically.

  2. API key (automation/CI): Set RENDER_API_KEY env var. Keys don't expire. Takes precedence over CLI tokens.

bash
export RENDER_API_KEY=rnd_xxxYourKeyHerexxx

Multi-Workspace Setup

To switch between workspaces (e.g., team-staging vs team-production), set RENDER_API_KEY per-command:

bash
# Staging workspace
RENDER_API_KEY=rnd_xxxStagingKeyxxx render services -o json --confirm

# Production workspace
RENDER_API_KEY=rnd_xxxProductionKeyxxx render services -o json --confirm

Or set the active workspace once and use the default key:

bash
render workspace set <WORKSPACE_ID> -o json --confirm

The workspace persists in ~/.render/cli.yaml across commands.

Environment Variables (REST API only)

The Render CLI does NOT support env var management. Use the REST API:

bash
source ~/.hermes/.env

# Set/update a single env var (PUT creates or overwrites)
curl -s -X PUT "https://api.render.com/v1/services/<SERVICE_ID>/env-vars/<KEY>" \
  -H "Authorization: Bearer $RENDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value": "my-value"}'

# List env vars (paginated; follow cursors before concluding a key is absent)
cursor=""
while :; do
  url="https://api.render.com/v1/services/<SERVICE_ID>/env-vars"
  [ -n "$cursor" ] && url="$url?cursor=$cursor"
  page=$(curl -s "$url" -H "Authorization: Bearer $RENDER_API_KEY")
  printf '%s\n' "$page"
  cursor=$(printf '%s' "$page" | jq -r '.[-1].cursor // empty')
  [ -z "$cursor" ] && break
done

Pitfalls:

  • POST to /env-vars (bulk create) may silently return empty. Use PUT to /env-vars/<KEY> for reliable single-key operations.
  • Env var listing is paginated. The first page can omit common keys like WORKERS or DATABASE_URL; follow cursor values before concluding a key is absent.
  • No generic RENDER_API_KEY exists in .env. Use workspace-specific keys: RENDER_API_KEY_BLOOM or RENDER_API_KEY.

Pitfalls

  • Stale workspace after API key switch: The CLI caches the last workspace in ~/.render/cli.yaml. If you switch RENDER_API_KEY to a different account, the cached workspace ID belongs to the old account and every command fails with 404: not found: owner: tea-XXXXX. Fix: render workspaces -o json --confirm to list available workspaces, then render workspace set <WORKSPACE_ID> -o json --confirm to select the right one.
  • Postgres databases aren't listed by render services. Use the REST API: curl -s "https://api.render.com/v1/postgres" -H "Authorization: Bearer $RENDER_API_KEY" | jq '.[].postgres | {id, name}'. The render psql <DB_ID> command works once you have the ID.
  • Private GitHub repos: Render can't clone private repos without the GitHub app installed on the repo owner's account. Never make a repo public to work around this. Have the user install Render's GitHub app instead.
  • Python version: Render defaults to latest Python (e.g., 3.14). Add a .python-version file (e.g., 3.12.4) to the repo root to pin it.
  • Multi-account setup: If you have separate Render accounts/workspaces for different projects, use project-specific API keys in .env. Set RENDER_API_KEY=<project-key> before CLI commands to target the right workspace. Also run render workspace set <ID> since the CLI caches the last workspace.
  • Private repo deps in requirements.txt: pip install on Render can't clone private GitHub repos (no auth). Either make the dep repo public, use Render's GitHub app for the dep repo too, or vendor the dependency.

Migrating from Docker to Native Python Runtime

When a service uses runtime: docker and you want to switch to Render's native Python runtime:

  1. render.yaml changes:

    • runtime: docker → runtime: python
    • Add buildCommand: pip install . (or pip install -r requirements.txt)
    • Add startCommand: with the actual run command (use $PORT env var for the port)
    • Update HERMES_HOME env var path: Docker uses /app/..., native uses /opt/render/project/src/...
  2. Add runtime.txt to repo root with e.g. python-3.12.3 (Render defaults to latest Python otherwise, which may break things).

  3. Update any scripts that hardcode /app/ paths to use /opt/render/project/src/ or derive paths dynamically.

  4. Delete the Dockerfile.

  5. Verify that application code uses relative paths from __file__ rather than hardcoded absolute paths, so it works in both environments.

Pitfall: if the Dockerfile installed system packages (e.g., apt-get install git curl), those may not be available in the native runtime. Check the Dockerfile's RUN apt-get lines. Render's native Python image includes git but not all system deps.

Common Patterns

Deploy and verify

bash
# Trigger deploy, wait for it, check exit code
render deploys create <SERVICE_ID> --wait -o json --confirm
echo "Exit code: $?"

Check recent errors

bash
render logs -r <SERVICE_ID> --level error --limit 50 -o json --confirm

List all services with their status

bash
render services -o json --confirm | jq '.[] | {id, name: .service.name, type: .service.type, status: .service.suspended}'

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Render Cli AI 技能有什么作用?

Manage Render.com services, deploys, databases, logs, and infrastructure using the official Render CLI (`render`). Use this skill whenever the user asks about Render deployments, service management, viewing Render logs, restarting Render services, running database queries on Render Postgres, triggering deploys, managing environments/projects, or anything related to their Render infrastructure. Also use when the user mentions render.com, Render dashboard actions, or wants to automate Render workflows.

为什么在 TypingMind 中使用 Render Cli?

因为您只需安装一次,就能搭配任何模型使用。Render Cli 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型,甚至可以在聊天中途切换模型,而不会影响技能正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Render Cli?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/exiao/skills/tree/main/external-services/render-cli。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Render Cli?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Render Cli 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以搭配 Render Cli 使用,包括 GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等,都可在 TypingMind 中使用您自己的 API 密钥接入。

Render Cli AI 技能免费吗?

该技能源自 exiao 在 GitHub 上发布的项目。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇