npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gebangautoupload

v1.1.3

Published

Auto-upload video ke YouTube dengan jadwal publish. Installer lintas-platform (Windows/macOS/Linux) + auto-start.

Readme

Gebang AutoUpload

Auto-upload video ke YouTube dari folder lokal, dengan jadwal publish.

  • Backend: Python 3.11 + Flask 3 + waitress + APScheduler + watchdog
  • Frontend: React 18 + TypeScript + Vite (+ Tailwind 4)
  • Database: SQLite (data/gebang.db), token OAuth enkripsi AES-256-GCM
  • Docker: image multi-arch (linux/amd64 + linux/arm64) siap-bangun otomatis via GitHub Actions, publish ke ghcr.io/orlin24/gebang-autoupload

Fitur

  • Multi-channel YouTube (OAuth desktop per channel, token terenkripsi AES-256-GCM)
  • Auto-upload dari folder lokal (watchdog, scanner folder 1 video + txt + thumb)
  • Jadwal per channel: harian (1-4x/hari) atau mingguan (1-7 hari), tanpa cron manual
  • Publish YouTube pada jam pasti (upload 01:00, publish 05:00) atau jeda menit setelah upload
  • API key pool + rotasi otomatis (round-robin by last_used)
  • Auto-refresh token YouTube
  • Logging real-time (UI polling 3 detik ke /api/state)
  • Backup/restore per channel dalam .gabak (enkripsi)
  • Dashboard system (CPU/RAM/Disk via psutil)

Instalasi tercepat (npm, lintas-platform) - Windows / macOS / Linux / Android-Temux

Satu perintah, otomatis menyiapkan Python + ffmpeg (via winget/brew/apt/pkg), menyalin source, build frontend, dan menyiapkan virtualenv. Butuh Node.js 18+ dan npm.

npm install -g gebangautoupload
gebang-autoupload

Lalu buka http://localhost:5000 (login admin / admin).

Belum ada di npmjs? Pakai install langsung dari GitHub: npm install -g github:orlin24/gebang-autoupload

Prasyarat: Node.js + npm

Paket ini dijalankan oleh npm, jadi Node.js + npm wajib ada lebih dulu. Node/npm tidak bisa dibundel ke dalam paket. Cek:

node -v && npm -v      # harus muncul, mis. v20.x dan 10.x

Kalau belum ada, install Node.js 18+ dulu (lihat tabel per-OS di bawah).

Linux minimal (Debian/Ubuntu, container, VPS) — copy-paste satu blok

Di sistem minimal, Node/npm, python3-venv (menyediakan ensurepip), dan curl sering belum terpasang. Jalankan ini sekali dari nol:

# 1. Node.js + npm (kalau belum ada)
apt update
apt install -y nodejs npm

# 2. Prasyarat Python + curl
apt install -y python3-venv python3-pip curl

# 3. Install aplikasi
npm install -g gebangautoupload
gebang-autoupload

Sudah dicoba dan ini solusi yang berhasil di Debian/Ubuntu minimal. Kalau python3-venv tak menyelesaikan, pakai paket bervesi: apt install -y python3.13-venv (sesuaikan python3 --version). Node dari repo bawaan Debian kadang tua; kalau node -v masih < 18, pakai NodeSource atau nvm.

Windows / macOS

# Windows (PowerShell / cmd) — pastikan Node 18+ dari https://nodejs.org
npm install -g gebangautoupload
gebang-autoupload

# macOS
brew install node          # kalau belum ada
npm install -g gebangautoupload
gebang-autoupload

Android (Termux)

pkg update && pkg install -y nodejs python
npm install -g gebangautoupload
gebang-autoupload

Ringkasan per-OS

| OS | Pasang Node | Perintah install app | |---|---|---| | Windows | installer dari nodejs.org | npm install -g gebangautoupload | | macOS | brew install node | npm install -g gebangautoupload | | Debian/Ubuntu | apt install -y nodejs npm | apt install -y python3-venv python3-pip curl lalu npm install | | Arch | pacman -S nodejs npm | npm install -g gebangautoupload | | Termux | pkg install nodejs | npm install -g gebangautoupload |

Catatan installer

  • Installer berjalan otomatis lewat postinstall: siapkan dependency → build frontend → venv → .env (dengan FLASK_SECRET_KEY random).
  • Kalau postinstall diblokir npm (npm 11+ memblokir install-scripts secara default), cukup tetap jalankan gebang-autoupload — CLI akan menjalankan installer otomatis saat pertama dijalankan. Atau paksa: npm install -g --allow-scripts=gebangautoupload gebangautoupload.
  • Source disalin ke ~/.gebang-autoupload/app (Windows: C:\Users\<nama>\.gebang-autoupload\app).
  • Idempotent: npm install -g gebangautoupload berulang aman; langkah yang sudah beres (frontend build, dependency Python) dilewati, .env user tidak pernah ditimpa.
  • Virtualenv tangguh: kalau ensurepip tak ada, installer mencoba python3-venv → venv --without-pip + get-pip → virtualenv.
  • Lewati installer otomatis (mis. untuk CI): set GA_SKIP_POSTINSTALL=1.
  • Lokasi custom: set GA_HOME (folder app) atau GA_PORT sebelum install.
  • Install ulang / update: jalankan perintah npm install lagi, atau gebang-autoupload update (kalau source berupa git clone).

Perintah CLI

gebang-autoupload                    # jalankan app
gebang-autoupload autostart on       # auto-start saat login/boot
gebang-autoupload autostart off      # matikan auto-start
gebang-autoupload autostart status   # cek status auto-start
gebang-autoupload update             # update source + rebuild + reinstall
gebang-autoupload path               # lokasi folder aplikasi
gebang-autoupload help

Auto-start memakai mekanisme native per OS:

  • Windows: Scheduled Task (ONLOGON, hak user biasa).
  • macOS: launchd LaunchAgent (~/Library/LaunchAgents/com.gebang.autoupload.plist, KeepAlive).
  • Linux: systemd user service (~/.config/systemd/user/gebang-autoupload.service) + enable-linger.

Uninstall: gebang-autoupload autostart off lalu npm uninstall -g gebangautoupload dan hapus ~/.gebang-autoupload.

Catatan: di Linux/macOS, npm install -g global kadang butuh sudo (atau setup prefix npm user). Installer akan memanggil sudo apt/brew bila Python/ffmpeg belum ada — siapkan password jika diminta.

Publish ke npmjs.com (untuk maintainer)

Agar orang bisa npm install -g gebangautoupload (tanpa URL GitHub):

npm login                 # sekali, pakai akun npmjs.com kamu
npm publish               # pakai publishConfig.access=public di package.json

Setelah publish, update versi & publish ulang tiap rilis:

npm version patch         # atau minor / major
npm publish

Cek isi paket sebelum publish: npm pack --dry-run.


Instalasi dengan Docker (alternatif) - REKOMENDASI untuk server

Image sudah dibangun (Ubuntu base + Python + ffmpeg + frontend). Anda tidak butuh install Node, Python, atau ffmpeg. Cuma Docker + composer file.

1) Linux (VPS Ubuntu/Debian atau desktop)

Prerequisite: install Docker (sekali saja):

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
# logout dan login kembali (supaya docker tanpa sudo)

Jika package GHCR ini private (default): login sekalo pertama:

echo "PASTE-YOUR-TOKEN" | docker login ghcr.io -u orlin24 --password-stdin
# token = fine-grained PAT, scope: read:packages

Clone dan start:

git clone https://github.com/orlin24/gebang-autoupload.git
cd gebang-autoupload
docker compose up -d
  • Pull image (konten ~250 MB), lalu app listen di http://IP-mesin:5000.
  • Login default: admin / admin.

Set mau sendiri - edit docker-compose.yml:

    environment:
      GA_DATA_DIR: /data
      GA_HOST: 0.0.0.0
      GA_PORT: "5000"
      TZ: Asia/Jakarta            # zona waktu scheduler
      ADMIN_USERNAME: admin
      ADMIN_PASSWORD: <ganti-password>        # wajib ganti!
      FLASK_SECRET_KEY: <string-random-64>    # session cookie
      # GA_BROWSE_ROOTS: /mnt/video           # folder sumber di UI picker
    volumes:
      - gebang-data:/data         # SQLite + master.key + oauth (PERSISTENT)
      - /mnt/video:/mnt/video     # mount folder video sumber

Restart apply: docker compose up -d (repeat). Update image: docker compose pull && docker compose up -d.

Penting tentang OAuth YouTube: di Linux, compose sudah set network_mode: host supaya callback Google OAuth (127.0.0.1 loopback) jalan langsung. Tidak perlu konfig lokil port.

2) Windows (Docker Desktop)

Install Docker Desktop → start. Fork docker-compose.yml dan ubah bagian network: Docker Desktop = VM Linux, network_mode: host tidak berlaku. Pakai bridge mode dengan port publish:

services:
  gebang:
    image: ghcr.io/orlin24/gebang-autoupload:latest
    restart: unless-stopped
    ports:
      - "5000:5000"
    volumes:
      - gebang-data:/data
      # - /c/Users/<nama>/Videos:/mnt/video     # contoh mount folder Windows
    environment:
      GA_DATA_DIR: /data
      GA_HOST: 0.0.0.0
      GA_PORT: "5000"
      TZ: Asia/Jakarta
      ADMIN_USERNAME: admin
      ADMIN_PASSWORD: <ganti-password>
volumes:
  gebang-data:

Buka http://localhost:5000.

OAuth Google di Windows: callback loopback men-try di dalam VM, jadi e flow "Mulai OAuth" tidak finish dari browser Windows. Two solusi:

  • OAuth dijalankan pertama kali di mesin Linux, lalu copy data/ volume (file migrasi di bawah) - easiest.
  • Atau tunnel: ssh -L 8765:127.0.0.1:8765 user@server-linux saat link OAuth.

3) macOS

Docker Desktop / Colima - sama caveat Windows: host network tidak berlaku. Solusi: instalasi native manual (section di bawah), atau Linux server + UI dari Mac browser.

Data: backup berganti (WAJIB)

Data aplikasi hidup di volume gebang-data (folder /data di dalam container: gebang.db, master.key, oauth-client.json, logs/). Volume tidak jepar puta sa container stop/restart - butuh backup:

  1. UI Settings -> Backup Lengkap → Download .gabak (enkripsi) + master.key
  2. Volume copy manual: docker run --rm -v gebang-data:/data -v $PWD:/backup alpine cp -r /data /backup/data-backup

Migrasi ke mesin baru: copy volume + ikut master.key, kalu tidak .gabak lama tidak bisa didekripsi.

Troubleshooting cepat

| Problem | Solusi | |---|---| | Address already in use port 5000 | App lain listen 5000. Ubah GA_PORT / ports: ke 5001, buka :5001. | | docker: permission denied | Anda butuh logout/login (usermod -aG docker). | | Cannot connect to the Docker daemon | Docker service belum up: sudo systemctl enable --now docker (Linux) / start Docker Desktop (Windows/Mac). | | Login page open, upload tidak terjadi | Cek log: docker logs gebang-autoupload (compose name), paste di issue. |


Instalasi classic (manual, senza Docker) di VPS Ubuntu 22.04 / 24.04

# Clone dari repo
git clone https://github.com/orlin24/gebang-autoupload.git
cd gebang-autoupload

# Jalankan installer (sebagai root). Akan:
# - apt install git, ffmpeg, python3-venv, ufw
# - clone ke /var/www/html/gebang-autoupload
# - venv + pip install
# - generate .env dengan FLASK_SECRET_KEY random
# - systemd service gebang-autoupload.service
# - ufw allow 5000
sudo ./installer.sh

Default service: http://<vps>:5000, TZ Asia/Jakarta. Login dengan admin / admin (GANTI di .env lalu sudo systemctl restart gebang-autoupload).

Variabel env yang didukung (lihat env.example.txt):

  • FLASK_SECRET_KEY (wajib random)
  • ADMIN_USERNAME, ADMIN_PASSWORD
  • GA_DATA_DIR (default <repo>/data)
  • GA_HOST, GA_PORT
  • TZ
  • GA_BROWSE_ROOTS (folders roots utk UI file picker, pisah :)

Cara pakai (semua install method)

  1. Login ke dashboard.
  2. Settings -> OAuth Client: tempel Google OAuth Client ID + Secret (Desktop type; redirect_uri tidak perlu di-set, otomatis loopback).
  3. Channels -> Login Channel Baru: klik "Mulai OAuth", buka URL di browser, login akun YouTube, kembali ke UI klik "Saya sudah selesai". Token akan di-encrypt (AES-256-GCM) ke data/gebang.db.
  4. Sumber -> Tambah Sumber Lokal: arahkan ke folder /var/www/html/gebang-content/ChannelA/ (atau mount path Docker). Scanner otomatis deteksi folder 01/, 02/, dst.
  5. Jadwal: pilih frekuensi (mis. 2x/hari atau 3x/minggu), jam upload, dan jam publish di YouTube.
  6. API Keys: masukkan YouTube Data API key (banyak key dari proyek berbeda agar quota tidak habis).

Struktur folder sumber

/path/sumber/ChannelA/
  01/
    final.mp4
    judul.txt     # baris 1 = title, sisanya = description
    thumb.jpg
  02/
    ...

Atau pisah title/desc:

  03/
    clip.mp4
    title.txt
    desc.txt
    thumbnail.png

Struktur repo

package.json                 # paket npm (bin: gebang-autoupload + postinstall installer)
bin/gebang-autoupload.js     # CLI launcher lintas-platform
lib/autostart.js             # auto-start (Scheduled Task / launchd / systemd user)
scripts/postinstall.js       # installer otomatis (winget/brew/apt + build + venv)
app.py                       # entry: waitress + bootstrap
wsgi.py                      # entry dev (Flask debug)
installer.sh                 # pasang ke VPS Ubuntu (install Node + build Vite)
Dockerfile                   # image multi-stage (node build + python runtime)
docker-compose.yml           # compose produksi (GHCR image, host network)
requirements.txt
env.example.txt
.github/workflows/docker.yml # GitHub Actions: build multi-arch + push GHCR
scripts/
  dev_full.sh                # Flask 5000 + Vite 5173 (proxy /api)
  dev_run.sh                 # backend saja
  uninstall.sh               # hapus service
app/
  __init__.py                # create_app() + serve dist/ + SPA fallback
  config.py                  # env -> Config
  crypto.py                  # AES-256-GCM (master.key)
  auth.py                    # Flask-Login + unauthorized handler
  models.py                  # SQLite repo (semua CRUD)
  routes/
    auth_routes.py           # /login (form + JSON) /logout
    api_routes.py            # /api/* JSON
  services/
    oauth.py                 # loopback HTTP callback + auto-open browser
    youtube.py               # upload + schedule + profile + refresh
    keypool.py               # CRUD + cek key ke API
    scanner.py               # parse folder sumber
    watcher_manager.py       # Observer per source
    schedule_spec.py         # frekuensi/jam upload, jam publish, next runs
    scheduler.py             # tick 30 detik, matcher harian/mingguan (+ cron warisan)
    uploader.py              # orkestrasi upload + retry + cleanup
    backup.py                # .gabak export/import
frontend/                    # Vite + React 18 + TypeScript
  src/
    api/client.ts            # fetch wrapper, 401 -> /login
    hooks/usePolling.ts      # usePolling hook (interval + visibility pause)
    components/Layout.tsx    # sidebar + topbar
    components/Modal.tsx
    pages/                   # 8 halaman (Login, Dashboard, Channels, ...)
    main.tsx                 # entry; BrowserRouter
    styles.css
dist/                        # hasil `npm run build` (auto-generate)
data/                        # SQLite + master.key + oauth-client.json (gitignored)

Development lokal

Dua mode:

1. Full dev (Flask + Vite HMR)

./scripts/dev_full.sh
# buka http://127.0.0.1:5173  (Vite proxy /api ke 5000)
# edit frontend/src/* -> HMR auto-reload

2. Backend saja (pakai dist/ hasil build terakhir)

./scripts/dev_run.sh
# buka http://127.0.0.1:5000

Sebelum mode 2, pastikan sudah cd frontend && npm run build.

Migrasi data dari versi Electron

Token lama tidak kompatibel langsung (format AES berbeda). Gunakan fitur Channels -> Backup di versi Electron lama (sudah support .gabak) untuk export token per channel, lalu restore via Settings di versi Flask ini (TODO: tambahkan UI import). Atau login ulang di UI Flask dan langsung simpan ke format baru.

Uninstall

sudo ./scripts/uninstall.sh
# Repo + data TETAP. Hapus total:
sudo rm -rf /var/www/html/gebang-autoupload

Referensi

  • Pola installer & UI: https://github.com/orlin24/badutstream
  • YouTube Data API v3: https://developers.google.com/youtube/v3
  • Google OAuth2 desktop: https://developers.google.com/identity/protocols/oauth2/native-app

Lisensi

ISC (lihat repo Electron lama).