Skip to content

jasonLaster/github-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Directory Downloader

A utility to download files from any GitHub repository directory.

Installation

# Install dependencies
bun install

# Build the standalone executable
bun run build

Usage

As a CLI Tool

# 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

Development Mode

# Run directly with Bun during development
bun ./src/index.ts <owner/repo> <path> [target-dir]

As a Module

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"
);

Development

Running Tests

bun test

The test suite includes a verification of downloading the NovaAct extension as a real-world example.

Building

# Create standalone Node.js executable
bun run build

This will create github-downloader.js in the root directory that can be run with Node.js.

Features

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages