remote-bash
Execute bash commands against any public GitHub repository without cloning it to the local machine.
bash
1npx remote-bash <target> [options] -- <command>
Target formats
| Format | Example | Behavior |
|---|
owner/repo | vercel/next.js | Target the default branch |
package-name | zod | Reads version from local lockfile, resolves to repo + exact SHA |
Options
| Option | Description |
|---|
-ref <branch|commit> | Target a specific branch or commit SHA |
-v <version> | Target a specific version/tag |
Examples
bash
1# check how next.js exports its cache APIs
2npx remote-bash vercel/next.js -- cat packages/next/cache.d.ts
3
4# find all ZodIssueCode types in zod (uses your lockfile version)
5npx remote-bash zod -- grep "ZodIssueCode" packages/zod/src/v3/ZodError.ts
6
7# explore three.js module structure
8npx remote-bash mrdoob/three.js -- ls src/
9
10# search for cacheLife usage across next.js canary branch
11npx remote-bash vercel/next.js -ref canary -- grep -rn "cacheLife" --include="*.ts"
12
13# check a specific three.js release
14npx remote-bash mrdoob/three.js -v r150 -- cat src/Three.js
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