Installation
Prerequisites
- Node.js 18+ or Bun 1.0+
- yt-dlp (optional, for YouTube support) —
brew install yt-dlp(macOS),sudo apt install yt-dlp(Linux), orpip install yt-dlp(all platforms)
Install as a CLI
bash
bun install -g @linuxctrl/grabrAfter installation, verify it works:
bash
bunx @linuxctrl/grabr --helpInstall as a Library
bash
bun add @linuxctrl/grabrThen import it in your project:
typescript
import { Downloader } from "@linuxctrl/grabr";
const downloader = new Downloader();
await downloader.start();Build CLI & Library from Source
bash
git clone https://github.com/LinuxCTRL/grabr.git
cd grabr
bun install
bun run buildThis compiles and bundles the CLI executable and TS libraries into the dist/ folder.
YouTube Support (yt-dlp)
Grabr uses yt-dlp to fetch YouTube video formats and download videos. Install it with your package manager:
bash
# macOS
brew install yt-dlp
# Linux (Debian/Ubuntu)
sudo apt install yt-dlp
# Linux (Arch)
sudo pacman -S yt-dlp
# Windows / any platform with Python
pip install yt-dlpAfter installation, verify with yt-dlp --version. Make sure yt-dlp is available on your PATH.
Running Locally (Development)
bash
# Run the interactive CLI from source
bun run cli
# Start the background Bun daemon & Web UI
bun run src/server/index.ts