remote-bash

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

remote-bash

remote-bash

Execute bash commands against any public GitHub repository without cloning it to the local machine.
bash
npx remote-bash <target> [options] -- <command>
无需将仓库克隆到本地机器,即可对任意公开GitHub仓库执行bash命令。
bash
npx remote-bash <target> [options] -- <command>

Target formats

目标格式

FormatExampleBehavior
owner/repo
vercel/next.js
Target the default branch
package-name
zod
Reads version from local lockfile, resolves to repo + exact SHA
格式示例行为
owner/repo
vercel/next.js
针对默认分支
package-name
zod
从本地锁文件读取版本,解析为仓库+精确SHA值

Options

选项

OptionDescription
-ref <branch|commit>
Target a specific branch or commit SHA
-v <version>
Target a specific version/tag
选项描述
-ref <branch|commit>
针对特定分支或提交SHA值
-v <version>
针对特定版本/标签

Examples

示例

bash
undefined
bash
undefined

check how next.js exports its cache APIs

查看next.js如何导出其缓存API

npx remote-bash vercel/next.js -- cat packages/next/cache.d.ts
npx remote-bash vercel/next.js -- cat packages/next/cache.d.ts

find all ZodIssueCode types in zod (uses your lockfile version)

在zod中查找所有ZodIssueCode类型(使用本地锁文件中的版本)

npx remote-bash zod -- grep "ZodIssueCode" packages/zod/src/v3/ZodError.ts
npx remote-bash zod -- grep "ZodIssueCode" packages/zod/src/v3/ZodError.ts

explore three.js module structure

探索three.js的模块结构

npx remote-bash mrdoob/three.js -- ls src/
npx remote-bash mrdoob/three.js -- ls src/

search for cacheLife usage across next.js canary branch

在next.js的canary分支中搜索cacheLife的使用情况

npx remote-bash vercel/next.js -ref canary -- grep -rn "cacheLife" --include="*.ts"
npx remote-bash vercel/next.js -ref canary -- grep -rn "cacheLife" --include="*.ts"

check a specific three.js release

查看three.js的特定版本

npx remote-bash mrdoob/three.js -v r150 -- cat src/Three.js
undefined
npx remote-bash mrdoob/three.js -v r150 -- cat src/Three.js
undefined

Key Benefits

核心优势

  • No local clone: Runs in the cloud, nothing downloaded to your machine
  • Lockfile-aware: Package names resolve to the exact version you have installed
  • Version pinning: Explore different branches, commits, or tags with
    -ref
    and
    -v
  • 无需本地克隆:在云端运行,不会将文件下载到本地机器
  • 支持锁文件识别:包名会解析为你本地已安装的精确版本
  • 版本固定:通过
    -ref
    -v
    选项探索不同分支、提交或标签