/ago

View files from a GitHub repo from a while ago

Primary LanguageTypeScript

ago

A simple Git-powered tool to view file content from any commit in your repository's history.

Features

  • View file content from any commit hash or N commits ago
  • Edit historical files directly in your editor
  • Show commit history for specific files
  • Works with any Git repository

Installation

curl -fsSL https://raw.githubusercontent.com/Explosion-Scratch/ago/main/index.js -o ~/.local/bin/ago && chmod +x ~/.local/bin/ago && echo "Installed ago to ~/.local/bin/ago"

Make sure ~/.local/bin is in your PATH.

Usage

# Show file from HEAD
ago README.md

# Show file from 5 commits ago
ago main.py 5

# Show file from specific commit hash
ago main.py abc1234

# Edit file from 2 commits ago
ago -e main.py 2

# Show commit history for a file
ago -w styles.css

Requirements

  • Git
  • Bun runtime