remote-bash
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseremote-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
目标格式
| Format | Example | Behavior |
|---|---|---|
| | Target the default branch |
| | Reads version from local lockfile, resolves to repo + exact SHA |
| 格式 | 示例 | 行为 |
|---|---|---|
| | 针对默认分支 |
| | 从本地锁文件读取版本,解析为仓库+精确SHA值 |
Options
选项
| Option | Description |
|---|---|
| Target a specific branch or commit SHA |
| Target a specific version/tag |
| 选项 | 描述 |
|---|---|
| 针对特定分支或提交SHA值 |
| 针对特定版本/标签 |
Examples
示例
bash
undefinedbash
undefinedcheck 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
undefinednpx remote-bash mrdoob/three.js -v r150 -- cat src/Three.js
undefinedKey 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 and
-ref-v
- 无需本地克隆:在云端运行,不会将文件下载到本地机器
- 支持锁文件识别:包名会解析为你本地已安装的精确版本
- 版本固定:通过和
-ref选项探索不同分支、提交或标签-v