Open-source AI podcast clipper. Generate vertical clips with face tracking and burned-in captions. CLI, MCP server, web app.
Python ai-toolsauto-captionscaptionscliffmpegmcpmcp-serveropusclip-alternativepodcast-clipspodcastsshortform-videovertical-videowhisper
Remove the unpublishable npm package and other dead files (#66)
Nika Siradze781ed3d140a1
diff --git a/.gitignore b/.gitignoreindex 09a8dd4..71a1b23 100644--- a/.gitignore+++ b/.gitignore@@ -54,6 +54,7 @@ episodes/*.srtuploads/output/+out/cli/internal/backend/files/cli/internal/podstack/commands/cli/podclidiff --git a/npm/README.md b/npm/README.mddeleted file mode 100644index f03f78d..0000000--- a/npm/README.md+++ /dev/null@@ -1,21 +0,0 @@-# podcli--AI podcast clip generator — transcribe, find viral moments, and export vertical-short-form clips with burned captions.--```sh-npm i -g podcli # or: bun add -g podcli-podcli setup # one-time: provisions a self-contained runtime-podcli process episode.mp4 --top 5-```--Installing this package downloads the native `podcli` binary for your platform-into a managed directory; the `podcli` command is a thin shim that runs it. The-binary is self-contained — `podcli setup` provisions its own Python, ffmpeg,-whisper.cpp, and models, so there is nothing else to install.--Updates: `podcli update` checks for a newer release. Disable auto-update checks-with `podcli config set update.auto off` (or `PODCLI_NO_UPDATE=1`).--Uninstall app files with `podcli uninstall`; it keeps your config, knowledge,-presets, assets, history, and cache unless you add `--purge`.diff --git a/npm/bin/podcli.js b/npm/bin/podcli.jsdeleted file mode 100644index afc9bbd..0000000--- a/npm/bin/podcli.js+++ /dev/null@@ -1,24 +0,0 @@-#!/usr/bin/env node-'use strict';--const fs = require('fs');-const { spawnSync } = require('child_process');-const { binPath, ensure } = require('../scripts/install');--(async () => {- let bin = binPath();- if (!fs.existsSync(bin)) {- try {- bin = await ensure();- } catch (e) {- console.error('podcli: failed to fetch native binary:', e.message);- process.exit(1);- }- }- const r = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });- if (r.error) {- console.error('podcli:', r.error.message);- process.exit(1);- }- process.exit(r.status == null ? 1 : r.status);-})();diff --git a/npm/package.json b/npm/package.jsondeleted file mode 100644index 318a39c..0000000--- a/npm/package.json+++ /dev/null@@ -1,31 +0,0 @@-{- "name": "podcli",- "version": "2.0.0",- "description": "AI podcast clip generator — native CLI. Transcribe, find viral moments, export vertical clips with burned captions.",- "bin": {- "podcli": "bin/podcli.js"- },- "scripts": {- "postinstall": "node scripts/install.js"- },- "files": [- "bin/",- "scripts/"- ],- "engines": {- "node": ">=16"- },- "license": "AGPL-3.0-only",- "repository": {- "type": "git",- "url": "https://github.com/nmbrthirteen/podcli.git"- },- "keywords": [- "podcast",- "clips",- "shorts",- "whisper",- "ffmpeg",- "cli"- ]-}diff --git a/npm/scripts/install.js b/npm/scripts/install.jsdeleted file mode 100644index 5c630db..0000000--- a/npm/scripts/install.js+++ /dev/null@@ -1,156 +0,0 @@-'use strict';--// Fetches the native podcli binary for this platform into the managed dir. Runs-// on npm/bun postinstall, and again lazily from the bin shim if the binary is-// missing. PODCLI_BINARY_SRC=<path> copies a local binary instead of downloading-// (used for testing and from the release build before publishing).--const os = require('os');-const fs = require('fs');-const path = require('path');-const https = require('https');-const crypto = require('crypto');-const { version } = require('../package.json');--const REPO = 'nmbrthirteen/podcli';--function allowedHost(h) {- h = String(h).toLowerCase();- if (['github.com', 'api.github.com', 'objects.githubusercontent.com', 'codeload.github.com'].includes(h)) return true;- return h.endsWith('.githubusercontent.com');-}--const TARGETS = {- 'darwin-arm64': 'darwin-arm64',- 'linux-x64': 'linux-amd64',- 'linux-arm64': 'linux-arm64',- 'win32-x64': 'windows-amd64',-};--function defaultHome() {- const h = os.homedir();- if (process.platform === 'darwin') return path.join(h, 'Library', 'Application Support', 'podcli');- if (process.platform === 'win32') return path.join(process.env.LOCALAPPDATA || path.join(h, 'AppData', 'Local'), 'podcli');- return process.env.XDG_DATA_HOME ? path.join(process.env.XDG_DATA_HOME, 'podcli') : path.join(h, '.local', 'share', 'podcli');-}--function binPath() {- const home = process.env.PODCLI_HOME || defaultHome();- return path.join(home, 'bin', process.platform === 'win32' ? 'podcli.exe' : 'podcli');-}--function target() {- const key = `${process.platform}-${process.arch}`;- const t = TARGETS[key];- if (!t) throw new Error(`unsupported platform ${key}`);- return t;-}--function download(url, dest, redirects) {- redirects = redirects || 0;- return new Promise((resolve, reject) => {- let host;- try { host = new URL(url).hostname; } catch (e) { return reject(e); }- if (!allowedHost(host)) return reject(new Error(`refusing to download from untrusted host ${host}`));- https- .get(url, { headers: { 'User-Agent': 'podcli-install' } }, (res) => {- if ([301, 302, 307, 308].includes(res.statusCode) && res.headers.location && redirects < 6) {- res.resume();- return resolve(download(res.headers.location, dest, redirects + 1));- }- if (res.statusCode !== 200) {- res.resume();- return reject(new Error(`HTTP ${res.statusCode} for ${url}`));- }- const tmp = dest + '.part';- const file = fs.createWriteStream(tmp);- res.pipe(file);- file.on('finish', () => file.close(() => {- fs.renameSync(tmp, dest);- resolve();- }));- file.on('error', reject);- })- .on('error', reject);- });-}--function fetchText(url, redirects) {- redirects = redirects || 0;- return new Promise((resolve, reject) => {- let host;- try { host = new URL(url).hostname; } catch (e) { return reject(e); }- if (!allowedHost(host)) return reject(new Error(`refusing to fetch from untrusted host ${host}`));- https- .get(url, { headers: { 'User-Agent': 'podcli-install' } }, (res) => {- if ([301, 302, 307, 308].includes(res.statusCode) && res.headers.location && redirects < 6) {- res.resume();- return resolve(fetchText(res.headers.location, redirects + 1));- }- if (res.statusCode === 404) { res.resume(); return resolve(null); }- if (res.statusCode !== 200) { res.resume(); return reject(new Error(`HTTP ${res.statusCode} for ${url}`)); }- let body = '';- res.setEncoding('utf8');- res.on('data', (c) => { body += c; });- res.on('end', () => resolve(body));- })- .on('error', reject);- });-}--function parseChecksums(text) {- const out = {};- for (const line of text.split('\n')) {- const f = line.trim().split(/\s+/);- if (f.length < 2) continue;- out[path.basename(f[f.length - 1])] = f[0].toLowerCase();- }- return out;-}--function sha256(file) {- return crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');-}--// verify checks dest against checksums.txt for this release. Fails closed on a-// mismatch; fails open (warning) when the manifest or entry is absent.-async function verify(dest, name, tag) {- const text = await fetchText(`https://github.com/${REPO}/releases/download/v${tag}/checksums.txt`);- if (!text) { console.error('podcli: no checksums.txt in release — skipped verification'); return; }- const want = parseChecksums(text)[name];- if (!want) { console.error(`podcli: no checksum entry for ${name} — skipped verification`); return; }- const got = sha256(dest);- if (got !== want) {- fs.rmSync(dest, { force: true });- throw new Error(`checksum mismatch for ${name}: got ${got} want ${want}`);- }-}--async function ensure() {- const dest = binPath();- fs.mkdirSync(path.dirname(dest), { recursive: true });- const src = process.env.PODCLI_BINARY_SRC;- if (src) {- fs.copyFileSync(src, dest);- } else {- const ext = process.platform === 'win32' ? '.exe' : '';- const name = `podcli-${target()}${ext}`;- const url = `https://github.com/${REPO}/releases/download/v${version}/${name}`;- await download(url, dest);- await verify(dest, name, version);- }- if (process.platform !== 'win32') fs.chmodSync(dest, 0o755);- return dest;-}--module.exports = { binPath, ensure };--if (require.main === module) {- ensure()- .then((d) => console.log(`podcli binary ready: ${d}`))- .catch((e) => {- // Don't hard-fail the install — the bin shim fetches it on first run.- console.error(`podcli: could not pre-fetch binary (${e.message}); it will be fetched on first run.`);- process.exit(0);- });-}diff --git a/out/product-shots/podcli-fixed-flat-4card.png b/out/product-shots/podcli-fixed-flat-4card.pngdeleted file mode 100644index dbe9380..0000000Binary files a/out/product-shots/podcli-fixed-flat-4card.png and /dev/null differdiff --git a/out/product-shots/podcli-fixed-flat-rounded.png b/out/product-shots/podcli-fixed-flat-rounded.pngdeleted file mode 100644index aa412cd..0000000Binary files a/out/product-shots/podcli-fixed-flat-rounded.png and /dev/null differdiff --git a/out/product-shots/podcli-hd-1920x1080.png b/out/product-shots/podcli-hd-1920x1080.pngdeleted file mode 100644index 9b606d9..0000000Binary files a/out/product-shots/podcli-hd-1920x1080.png and /dev/null differdiff --git a/out/product-shots/podcli-hd-2x.png b/out/product-shots/podcli-hd-2x.pngdeleted file mode 100644index cfbd465..0000000Binary files a/out/product-shots/podcli-hd-2x.png and /dev/null differdiff --git a/out/product-shots/podcli-library-crop-shot.png b/out/product-shots/podcli-library-crop-shot.pngdeleted file mode 100644index 04c9bb1..0000000Binary files a/out/product-shots/podcli-library-crop-shot.png and /dev/null differdiff --git a/out/product-shots/podcli-library-fullpage.png b/out/product-shots/podcli-library-fullpage.pngdeleted file mode 100644index 811266c..0000000Binary files a/out/product-shots/podcli-library-fullpage.png and /dev/null differdiff --git a/out/product-shots/podcli-ui-concepts.png b/out/product-shots/podcli-ui-concepts.pngdeleted file mode 100644index 8b7f70c..0000000Binary files a/out/product-shots/podcli-ui-concepts.png and /dev/null differdiff --git a/out/product-shots/podcli-ui-full.png b/out/product-shots/podcli-ui-full.pngdeleted file mode 100644index f557b90..0000000Binary files a/out/product-shots/podcli-ui-full.png and /dev/null differdiff --git a/out/product-shots/ui-avatar-crop.png b/out/product-shots/ui-avatar-crop.pngdeleted file mode 100644index 6777924..0000000Binary files a/out/product-shots/ui-avatar-crop.png and /dev/null differdiff --git a/out/product-shots/ui-avatar.png b/out/product-shots/ui-avatar.pngdeleted file mode 100644index a844a2c..0000000Binary files a/out/product-shots/ui-avatar.png and /dev/null differdiff --git a/out/product-shots/ui-minimal-crop.png b/out/product-shots/ui-minimal-crop.pngdeleted file mode 100644index 1b90814..0000000Binary files a/out/product-shots/ui-minimal-crop.png and /dev/null differdiff --git a/out/product-shots/ui-minimal.png b/out/product-shots/ui-minimal.pngdeleted file mode 100644index 080c031..0000000Binary files a/out/product-shots/ui-minimal.png and /dev/null differdiff --git a/out/product-shots/ui-silhouette-crop.png b/out/product-shots/ui-silhouette-crop.pngdeleted file mode 100644index e8dbf91..0000000Binary files a/out/product-shots/ui-silhouette-crop.png and /dev/null differdiff --git a/out/product-shots/ui-silhouette.png b/out/product-shots/ui-silhouette.pngdeleted file mode 100644index 8b1ee85..0000000Binary files a/out/product-shots/ui-silhouette.png and /dev/null differdiff --git a/out/product-shots/ui-waveform-crop.png b/out/product-shots/ui-waveform-crop.pngdeleted file mode 100644index f5b1b9d..0000000Binary files a/out/product-shots/ui-waveform-crop.png and /dev/null differdiff --git a/out/product-shots/ui-waveform.png b/out/product-shots/ui-waveform.pngdeleted file mode 100644index 239d451..0000000Binary files a/out/product-shots/ui-waveform.png and /dev/null differdiff --git a/package.json b/package.jsonindex 077cc29..dba31ab 100644--- a/package.json+++ b/package.json@@ -1,13 +1,11 @@{"name": "podcli","version": "2.4.1",+ "private": true,"description": "AI-powered podcast clip generator for TikTok/YouTube Shorts. Transcribe, find viral moments, export vertical clips with burned captions.","type": "module","license": "AGPL-3.0-only","main": "dist/index.js",- "bin": {- "podcli": "./podcli"- },"engines": {"node": ">=18.0.0"},diff --git a/podcli b/podclideleted file mode 100755index 829336f..0000000--- a/podcli+++ /dev/null@@ -1,193 +0,0 @@-#!/bin/bash-# podcli — CLI wrapper-# Usage: ./podcli process video.mp4 --top 5 --transcript file.txt--SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"--# Suppress macOS ObjC duplicate class warnings (OpenCV + Homebrew conflict)-export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES--# Use venv python if available-if [ -f "$SCRIPT_DIR/venv/bin/python3" ]; then- PYTHON="$SCRIPT_DIR/venv/bin/python3"-elif [ -f "$SCRIPT_DIR/.env" ]; then- PYTHON=$(grep '^PYTHON_PATH=' "$SCRIPT_DIR/.env" | cut -d'=' -f2-)- [ -z "$PYTHON" ] && PYTHON="python3"-else- PYTHON="python3"-fi--# ── Native CLI upgrade notice ──-# This in-repo bash launcher is superseded by the native `podcli` binary. Running-# the native CLI in this same directory auto-migrates this project's data on first-# run. Printed to stderr so command stdout (JSON, pipes) stays clean.-{- U_ACCENT="\033[38;2;212;135;74m"- U_BOLD="\033[1m"- U_DIM="\033[2m"- U_RESET="\033[0m"- NATIVE_BIN="$(command -v podcli 2>/dev/null)"- echo -e " ${U_BOLD}podcli now ships as a native CLI.${U_RESET} ${U_DIM}You're running the old in-repo launcher.${U_RESET}" >&2- if [ -n "$NATIVE_BIN" ] && [ "$NATIVE_BIN" != "$0" ] && [ "$NATIVE_BIN" != "$SCRIPT_DIR/podcli" ]; then- echo -e " Run ${U_ACCENT}podcli${U_RESET} in this folder instead — it auto-migrates this project's data on first run." >&2- else- echo -e " Install ${U_ACCENT}npm i -g podcli${U_RESET}, then run ${U_ACCENT}podcli${U_RESET} here — it auto-migrates this project's data on first run." >&2- fi- echo "" >&2-}--# ── PodStack slash commands → launch an AI agent ──-CMD="$1"-# Strip leading / or -- prefix (user might try /prep-episode, --prep-episode, or prep-episode)-CMD_CLEAN="${CMD#/}"-CMD_CLEAN="${CMD_CLEAN#--}"--PODSTACK_COMMANDS="auto prep-episode process-transcript generate-titles generate-descriptions plan-thumbnails review-content publish-checklist retro-episode plan-episode produce-shorts"--launch_auto() {- ACCENT="\033[38;2;212;135;74m"- GREEN="\033[38;2;74;222;128m"- YELLOW="\033[38;2;250;204;21m"- BOLD="\033[1m"- DIM="\033[2m"- RESET="\033[0m"-- shift- AI_ENGINE="${PODCLI_AI:-auto}"- PROMPT_ARGS=()- while [ "$#" -gt 0 ]; do- case "$1" in- --codex)- AI_ENGINE="codex"- shift- ;;- --claude)- AI_ENGINE="claude"- shift- ;;- --ai)- shift- if [ -z "${1:-}" ]; then- echo -e " ${BOLD}Missing value for --ai.${RESET} Use: --ai codex|claude|auto"- exit 1- fi- AI_ENGINE="$1"- shift- ;;- --ai=*)- AI_ENGINE="${1#--ai=}"- shift- ;;- *)- PROMPT_ARGS+=("$1")- shift- ;;- esac- done-- case "$AI_ENGINE" in- auto|claude|codex) ;;- *)- echo -e " ${BOLD}Invalid AI engine:${RESET} $AI_ENGINE"- echo -e " ${DIM}Use: --codex, --claude, or --ai codex|claude|auto${RESET}"- exit 1- ;;- esac-- PROMPT="/auto"- if [ "${#PROMPT_ARGS[@]}" -gt 0 ]; then- PROMPT="$PROMPT ${PROMPT_ARGS[*]}"- fi- CODEX_PROMPT="Run the PodStack workflow from .claude/commands/auto.md with these arguments, then follow that workflow exactly: $PROMPT"-- CLAUDE_BIN="$(command -v claude 2>/dev/null || true)"- CODEX_BIN="$(command -v codex 2>/dev/null || true)"-- if [ "$AI_ENGINE" = "codex" ]; then- if [ -z "$CODEX_BIN" ]; then- echo ""- echo -e " ${BOLD}Codex not found in PATH.${RESET}"- echo -e " ${DIM}Install Codex, then run:${RESET}"- echo -e " ${ACCENT}codex --cd \"$SCRIPT_DIR\" \"$CODEX_PROMPT\"${RESET}"- echo ""- exit 1- fi- elif [ "$AI_ENGINE" = "claude" ]; then- if [ -z "$CLAUDE_BIN" ]; then- echo ""- echo -e " ${BOLD}Claude Code not found in PATH.${RESET}"- echo -e " ${DIM}Install it, then run:${RESET}"- echo -e " ${ACCENT}claude \"$PROMPT\"${RESET}"- echo ""- exit 1- fi- fi-- if [ "$AI_ENGINE" != "codex" ] && [ -n "$CLAUDE_BIN" ]; then- echo ""- echo -e " ${GREEN}▶${RESET} Launching Claude Code with: ${ACCENT}$PROMPT${RESET}"- echo -e " ${DIM}cwd: $SCRIPT_DIR${RESET}"- echo ""- (cd "$SCRIPT_DIR" && "$CLAUDE_BIN" "$PROMPT")- STATUS=$?- if [ "$STATUS" -eq 0 ]; then- exit 0- fi- if [ "$AI_ENGINE" = "claude" ]; then- exit "$STATUS"- fi- if [ -z "$CODEX_BIN" ]; then- exit "$STATUS"- fi- echo ""- echo -e " ${YELLOW}⚠${RESET} Claude exited with code $STATUS; trying Codex..."- elif [ "$AI_ENGINE" != "claude" ] && [ -z "$CODEX_BIN" ]; then- echo ""- echo -e " ${BOLD}No AI agent CLI found in PATH.${RESET}"- echo -e " ${DIM}Install Claude Code or Codex, then run one of:${RESET}"- echo -e " ${ACCENT}claude \"$PROMPT\"${RESET}"- echo -e " ${ACCENT}codex --cd \"$SCRIPT_DIR\" \"$CODEX_PROMPT\"${RESET}"- echo ""- exit 0- else- echo ""- if [ "$AI_ENGINE" = "codex" ]; then- echo -e " ${DIM}Using Codex because it was requested.${RESET}"- else- echo -e " ${DIM}Claude Code not found; using Codex.${RESET}"- fi- fi-- echo ""- echo -e " ${GREEN}▶${RESET} Launching Codex with: ${ACCENT}$PROMPT${RESET}"- echo -e " ${DIM}cwd: $SCRIPT_DIR${RESET}"- echo ""- exec "$CODEX_BIN" --cd "$SCRIPT_DIR" "$CODEX_PROMPT"-}--for pc in $PODSTACK_COMMANDS; do- if [ "$CMD_CLEAN" = "$pc" ]; then- if [ "$pc" = "auto" ]; then- launch_auto "$@"- fi- ACCENT="\033[38;2;212;135;74m"- BOLD="\033[1m"- DIM="\033[2m"- RESET="\033[0m"- echo ""- echo -e " ${BOLD}/$pc${RESET} is a PodStack command — it runs inside ${ACCENT}Claude Code or Codex${RESET}, not the terminal."- echo ""- echo -e " ${BOLD}How to use:${RESET}"- echo -e " 1. Open Claude Code: ${DIM}claude${RESET}"- echo -e " Or open Codex: ${DIM}codex --cd \"$SCRIPT_DIR\"${RESET}"- echo -e " 2. Type: ${ACCENT}/$pc${RESET}"- echo -e " Force /auto Codex: ${ACCENT}./podcli /auto --codex <video>${RESET}"- echo ""- echo -e " ${DIM}PodStack commands use AI to generate titles, descriptions, thumbnails, etc.${RESET}"- echo -e " ${DIM}They need Claude Code's LLM context to work.${RESET}"- echo ""- exit 0- fi-done--exec "$PYTHON" -W ignore::UserWarning "$SCRIPT_DIR/backend/cli.py" "$@" 2> >(grep -v -e '^objc\[' -e 'FP16 is not supported' -e 'warnings.warn' >&2)diff --git a/podcli.cmd b/podcli.cmddeleted file mode 100644index ef9d022..0000000--- a/podcli.cmd+++ /dev/null@@ -1,41 +0,0 @@-@echo off-setlocal enabledelayedexpansion-rem podcli - CLI wrapper (Windows)-rem Usage: podcli process video.mp4 --top 5 --transcript file.txt--set "SCRIPT_DIR=%~dp0"--rem Use venv python if available, else fall back to PYTHON_PATH in .env, else `python`.-set "PYTHON=python"-if exist "%SCRIPT_DIR%venv\Scripts\python.exe" (- set "PYTHON=%SCRIPT_DIR%venv\Scripts\python.exe"-) else if exist "%SCRIPT_DIR%.env" (- for /f "usebackq tokens=1,* delims==" %%A in ("%SCRIPT_DIR%.env") do (- if /I "%%A"=="PYTHON_PATH" if not "%%B"=="" set "PYTHON=%%B"- )-)--rem Strip a leading / or -- from the first arg so /auto, --auto, auto all match.-set "CMD_CLEAN=%~1"-if defined CMD_CLEAN (- if "!CMD_CLEAN:~0,2!"=="--" set "CMD_CLEAN=!CMD_CLEAN:~2!"- if "!CMD_CLEAN:~0,1!"=="/" set "CMD_CLEAN=!CMD_CLEAN:~1!"-)--rem PodStack slash commands run inside Claude Code / Codex, not the terminal.-for %%P in (auto prep-episode process-transcript generate-titles generate-descriptions plan-thumbnails review-content publish-checklist retro-episode plan-episode produce-shorts) do (- if /I "!CMD_CLEAN!"=="%%P" (- echo.- echo /%%P is a PodStack command - it runs inside Claude Code or Codex, not the terminal.- echo.- echo How to use:- echo 1. Open Claude Code: claude- echo Or open Codex: codex --cd "%SCRIPT_DIR%"- echo 2. Type: /%%P- echo.- exit /b 0- )-)--"%PYTHON%" -W ignore::UserWarning "%SCRIPT_DIR%backend\cli.py" %*-exit /b %ERRORLEVEL%