A utility to download files from any GitHub repository directory.
# Install dependencies
bun install
# Build the standalone executable
bun run build# Download to a specific directory
node ./github-downloader.js <owner/repo> <path> [target-dir]
# Example: Download NovaAct extension
node ./github-downloader.js aws/nova-act src/nova_act/artifacts/chrome-mv3-prod ./nova-act-extension# Run directly with Bun during development
bun ./src/index.ts <owner/repo> <path> [target-dir]import { downloadFromGitHub } from "./src/index";
// Download to specific directory
const downloadPath = await downloadFromGitHub(
"microsoft/vscode",
"src/vs/editor",
"./vscode-editor"
);
// Or use temp directory (will be cleaned up when process exits)
const tempPath = await downloadFromGitHub(
"aws/nova-act",
"src/nova_act/artifacts/chrome-mv3-prod"
);bun testThe test suite includes a verification of downloading the NovaAct extension as a real-world example.
# Create standalone Node.js executable
bun run buildThis will create github-downloader.js in the root directory that can be run with Node.js.
- Download any directory from public GitHub repositories
- Supports both module and CLI usage
- Temporary directory support with automatic cleanup
- Error handling with detailed messages
- TypeScript support
- Standalone Node.js executable