Skip to content

DsChauhan08/easycopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easycopy

Just show me the code.

A Rust implementation of rendergit that works on Windows, Linux, and Android (Termux). Flatten any GitHub repository into a single, static HTML page with syntax highlighting, markdown rendering, and a clean sidebar navigation. Perfect for code review, exploration, and an instant Ctrl+F experience.

Features

  • Cross-platform: Works on Windows, Linux, and Android (Termux)
  • Local & Remote: Analyze GitHub repos or local directories
  • Git flexibility: Clone specific branches, tags, or commits
  • Progress indicators: Visual feedback for large repositories
  • Dual view modes - toggle between Human and LLM views
    • 👤 Human View: Pretty interface with syntax highlighting and navigation
    • 🤖 LLM View: Raw CXML text format - perfect for copying to Claude/ChatGPT for code analysis
  • Syntax highlighting for code files via syntect
  • Markdown rendering for README files and docs
  • Smart filtering - skips binaries and oversized files
  • Directory tree overview at the top
  • Sidebar navigation with file links and sizes
  • Responsive design that works on mobile
  • Search-friendly - use Ctrl+F to find anything across all files
  • Fast and efficient - written in Rust with optimized binaries

Installation

Download Pre-built Binaries

Download the latest release from GitHub Releases:

Debian/Ubuntu (.deb):

# Download the .deb file from releases, then:
sudo dpkg -i easycopy_2.0.0-1_amd64.deb

# Or install directly from URL:
wget https://github.com/DsChauhan08/easycopy/releases/download/v2.0.0/easycopy_2.0.0-1_amd64.deb
sudo dpkg -i easycopy_2.0.0-1_amd64.deb

Fedora/RHEL/CentOS (.rpm):

# Download the .rpm file from releases, then:
sudo rpm -i easycopy-2.0.0-1.x86_64.rpm

# Or install directly from URL:
wget https://github.com/DsChauhan08/easycopy/releases/download/v2.0.0/easycopy-2.0.0-1.x86_64.rpm
sudo rpm -i easycopy-2.0.0-1.x86_64.rpm

Windows (.zip):

  1. Download easycopy-x86_64-pc-windows-msvc-v2.0.0.zip from releases
  2. Extract the zip file
  3. Move easycopy.exe to a folder in your PATH (e.g., C:\Program Files\easycopy\)
  4. Or run directly from the extracted folder

macOS (.dmg):

  1. Download easycopy-x86_64-apple-darwin-v2.0.0.dmg from releases
  2. Open the .dmg file
  3. Drag easycopy to Applications or install to /usr/local/bin

Prerequisites (for building from source)

You need to have Rust installed. If you don't have it:

Linux/macOS:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Windows: Download and run rustup-init.exe

Android (Termux):

pkg install rust

Build from source

git clone https://github.com/DsChauhan08/easycopy
cd easycopy
cargo build --release

The binary will be at target/release/easycopy (or easycopy.exe on Windows).

Install to system

cargo install --path .

This installs easycopy to your cargo bin directory (usually ~/.cargo/bin), which should be in your PATH.

Usage

Basic usage

# Analyze a GitHub repository
easycopy https://github.com/username/easycopy

# Analyze a local directory
easycopy /path/to/local/project
easycopy .  # Current directory

This will:

  1. Clone the repo (or use local directory)
  2. Render its source code into a single static HTML file
  3. Automatically open the file in your browser

Advanced options

# Specify output location
easycopy https://github.com/username/easycopy -o output.html

# Don't open in browser
easycopy https://github.com/username/easycopy --no-open

# Set maximum file size (in bytes) to render
easycopy https://github.com/username/easycopy --max-bytes 100000

# Clone specific branch
easycopy https://github.com/username/easycopy --branch develop

# Clone specific tag
easycopy https://github.com/username/easycopy --tag v2.0.0

# Clone specific commit
easycopy https://github.com/username/easycopy --commit abc123def

# Disable progress indicators (useful for CI/automation)
easycopy https://github.com/username/easycopy --no-progress

# View help
easycopy --help

Examples

# Analyze a small project
easycopy https://github.com/karpathy/nanoGPT

# Save to specific location without opening
easycopy https://github.com/rust-lang/rust -o rust-src.html --no-open

# Increase max file size for larger files
easycopy https://github.com/torvalds/linux --max-bytes 200000

# Analyze a specific release version
easycopy https://github.com/rust-lang/cargo --tag 0.75.0

# Compare different branches (generate separate files)
easycopy https://github.com/user/project --branch main -o main.html --no-open
easycopy https://github.com/user/project --branch develop -o develop.html --no-open

# Analyze your current working directory
easycopy . -o my-project.html

Platform-Specific Notes

Windows

  • The compiled binary is fully standalone
  • Git must be available in PATH (or use embedded git2 library)
  • Opens in default browser automatically

Linux

  • Works on all major distributions
  • Requires libssl-dev and pkg-config for building:
    # Debian/Ubuntu
    sudo apt-get install libssl-dev pkg-config
    
    # Fedora/RHEL
    sudo dnf install openssl-devel
    
    # Arch
    sudo pacman -S openssl pkg-config

Android (Termux)

Full support for running in Termux CLI environment:

# Install dependencies
pkg install rust git openssl

# Clone and build
git clone https://github.com/DsChauhan08/easycopy
cd easycopy
cargo build --release

# Run
./target/release/easycopy https://github.com/username/easycopy

Note: The --no-open flag is recommended in Termux since browser integration is limited:

easycopy https://github.com/username/easycopy --no-open

Then open the generated HTML file with:

termux-open output.html

How It Works

  1. Clone: Creates a shallow clone of the repository in a temporary directory
  2. Analyze: Scans all files, detecting binary files, large files, and text files
  3. Process:
    • Applies syntax highlighting to code files
    • Renders markdown files to HTML
    • Generates directory tree structure
    • Creates CXML format for LLM consumption
  4. Generate: Builds a single self-contained HTML file with:
    • Embedded CSS for styling
    • JavaScript for view toggling
    • All file contents inline
  5. Cleanup: Removes temporary directory automatically

Development

Run tests

cargo test

Run with debug output

cargo run -- https://github.com/username/easycopy

Build optimized release

cargo build --release

Contributing

Contributions are welcome! This is a Rust port of the original Python rendergit tool, focused on cross-platform compatibility.

License

BSD-Zero-Clause - go nuts!

Credits

Inspired by and based on rendergit by Andrej Karpathy.

Differences from Original

  • Written in Rust instead of Python for better performance and cross-platform support
  • Uses syntect for syntax highlighting (vs Pygments)
  • Uses pulldown-cmark for markdown (vs python-markdown)
  • Uses git2-rs for git operations (vs subprocess calls)
  • Native support for Windows and Android/Termux
  • Self-contained binary with no runtime dependencies (except system libraries)

About

View any git repo into a single static HTML page for humans or LLMs

Resources

License

Stars

Watchers

Forks

Contributors