LLMs have changed the way the programming world works. Welcome to the machine-made code era! 🤖
maj-scripts-vibe is a home for utility scripts, all vibe-coded. 😎
If you're just here to use a script, start here. This README is the friendly map:
- Each script section tells you what the script does, what it needs, and the safest first commands to try.
- Use Your Local Setup when Python, Git,
ffmpeg, or package managers need a little help. - Use Friendly Launchers if you prefer double-clicks, drag-and-drop, file pickers, or right-click actions.
wh is a convenience wrapper for magic-wormhole.
- wraps the
wormholeCLI - auto-adds
--code-length=4for code-generating flows - passes all other commands through normally
- can help install
wormholewhen it is missing
- macOS
- Linux
- Windows
Shared prerequisites:
Primary external tool:
wormhole
Basic first run:
wh send file.zipIf wormhole is missing, wh can suggest a likely install route and offer to run it for you.
Send a file with a shorter generated code:
wh send file.zipReceive using the normal prompt flow:
wh receiveReceive while allocating the code on this side:
wh receive --allocatePass through other wormhole commands:
wh helpwhinjects--code-length=4forsendandtx.whalso injects--code-length=4forreceive --allocateand receive aliases such asrx,recv, andrecieve.whdoes not inject another code-length flag if you already passed--code-length.whleaves ordinaryreceiveunchanged because the sender normally generates the code.- Missing-
wormholeinstall prompts useY/n, where Enter means yes.
- Package-manager support varies by system, so
whsuggests the best install route it can find.
whisper is a self-bootstrapping subtitle and transcription CLI.
- accepts a media file or folder
- discovers supported audio/video files
- builds and manages its own Python runtime
- selects a backend based on the host, including MLX on Apple Silicon
- normalizes common Bible-reference formatting mistakes by default, such as
Psalm 83 18toPsalm 83:18 - writes subtitles by default, can also write plain-text transcripts, and can mux soft subtitle tracks into video containers
- macOS
- Linux
- Windows
MLX support is for Apple Silicon on macOS. Other environments use faster-whisper.
Shared prerequisites:
Useful system dependency:
ffmpegfor media workflows, especially default speech-onset subtitle trimming, subtitle burn-in, and subtitle-track embedding
Script-specific note:
- On Apple Silicon, MLX runtimes can auto-select a more stable managed-runtime Python.
Basic first run:
whisper /path/to/file.mp4Useful inspection/setup commands:
whisper --doctor
whisper --doctor --json
whisper --doctor --deep
whisper --setup-onlyOn first run, whisper will:
- inspect the host
- choose a managed runtime
- install required Python packages into that runtime
- prompt before downloading packages unless
-y/--yesis used
Transcribe one file:
whisper /path/to/file.mp4Transcribe multiple explicit files from shell expansion:
whisper *.mkv
whisper *.mp3 *.mp4Opt in to spoken Bible-reference parsing:
whisper /path/to/file.mp4 --bible-reference-phrasesUse a stricter subtitle readability profile:
whisper /path/to/file.mp4 --subtitle-style=strictLayer in a custom glossary and review what postprocessing still looks suspicious:
whisper /path/to/file.mp4 --glossary=/path/to/whisper-glossary.txt --review-postprocessingSuppress a known intro or outro from a shared phrase list:
whisper /path/to/file.mp4 --suppress-phrases=/path/to/whisper-suppress.txtWrite a plain-text transcript next to the normal subtitle output:
whisper /path/to/file.mp4 -t
whisper /path/to/file.mp4 --transcript
whisper /path/to/file.mp4 -t --paragraphsWrite only the transcript:
whisper /path/to/file.mp4 -T
whisper /path/to/file.mp4 --transcript-onlyWrite a speaker-labeled transcript:
whisper /path/to/file.mp4 -T --speaker-labels --paragraphs
whisper /path/to/file.mp4 -T --diarizePreview the work plan without setup, installs, or transcription:
whisper /path/to/file.mp4 --plan
whisper /path/to/folder --recursive --plan --jsonCreate a tiny video plus matching subtitle sidecar for manual embed checks:
whisper --make-sample-media=/tmp/whisper-sample.mp4
whisper /tmp/whisper-sample.mp4 --embed-fileRetranscribe even when the expected subtitle or video output already exists:
whisper /path/to/file.mp4 --forceKeep repeated defaults in a project-local TOML config:
# .maj-scripts-whisper.toml
lang = "en"
subtitle_style = "strict"
speaker_labels = false
glossary = ["./whisper-glossary.txt"]
suppress_phrases = ["./whisper-suppress.txt"]Transcribe recursive matches in batches instead of starting one whisper process per file:
find . -type f -name '*.mp4' -exec whisper '{}' +
find . -type f -name '*.mp4' -print0 | xargs -0 whisperChoose a model explicitly:
whisper /path/to/file.mp4 --model=mediumChoose a language explicitly:
whisper /path/to/file.mp4 -l enWrite output to a chosen folder:
whisper /path/to/file.mp4 --outdir=/path/to/outputEmbed a soft subtitle track into the output video:
whisper /path/to/file.mp4 --embedEmbed a soft subtitle track and replace the source video after muxing succeeds:
whisper /path/to/file.mp4 -e -iEmbed an edited matching sidecar subtitle file without retranscribing:
whisper /path/to/file.mp4 -f
whisper /path/to/file.mp4 -f /path/to/file.srt -iBurn subtitles into a new video with an explicit AV1 encoder:
whisper /path/to/file.mp4 --burn --burn-vcodec=libsvtav1Run MLX comparison diagnostics:
whisper /path/to/file.mp4 --mlx-word-timestamps=off
whisper /path/to/file.mp4 --mlx-output-format=text
whisper /path/to/file.mp4 --model=tiny --mlx-word-timestamps=off --mlx-output-format=text- The script self-manages its runtime instead of requiring a manually prepared virtualenv.
- On Apple Silicon, MLX runtimes can auto-select a more stable managed-runtime Python.
- Default model selection is hardware-aware.
--plan/--dry-runshows discovered files, selected backend/model, output paths, configured glossary and suppression files, speaker-label status, embed/burn actions, and whetherffmpegis required without installing packages or transcribing.- Normal
--doctorchecks installed runtime modules without importing native backends, which keeps routine diagnostics calmer around MLX/Metal crashes. --doctor --jsonprints machine-readable diagnostics for scripts, CI, and support notes.--doctor --deepexplicitly imports installed runtime backends for deeper diagnostics. Use it when you want to isolate backend import failures and are comfortable with native packages being loaded.--make-sample-media=PATHcreates a tiny video and matching.srtsidecar so you can test--embed-filewithout hunting for a media fixture.- Existing expected outputs are skipped by default, so reruns resume safely instead of retranscribing finished files. Use
--forceto overwrite that skip behavior. -t/--transcriptwrites a.txttranscript alongside normal.srt/.assoutput. If the expected sidecar subtitle already exists, it builds the transcript from that file instead of retranscribing unless--forceis set.-T/--transcript-onlywrites only the.txtfile and skips subtitle/video outputs.--paragraphsformats transcript text with blank lines between likely paragraphs, based on timing gaps and sentence boundaries. It does not affect subtitle output.--speaker-labelsadds anonymousSpeaker 1,Speaker 2, and similar labels to transcript output. It implies transcript output, leaves subtitles unlabeled, and has--diarizeas a technical alias.- Speaker labels are fully optional. They install larger ML packages only when requested, show a size warning first, reuse an existing global Hugging Face speaker model cache when one is already present, and otherwise keep speaker model files in the managed runtime area.
--clean-speaker-labelsremoves optional speaker-label packages and the app-owned speaker-label model cache. It does not touch global Hugging Face caches.- You can pass multiple explicit files and folders in one command, and duplicate matches are skipped after the first one.
- If you're using
find, prefer batched forms such as-exec whisper '{}' +orxargs -0 whisper; plain-exec whisper '{}' \;launches a freshwhisperprocess for every file. - Reusable CLI defaults can live in
~/.config/maj-scripts/whisper/config.tomlglobally or.maj-scripts-whisper.tomlin a project. Precedence is built-in defaults, global config, nearest project config, then CLI flags. - Config files use TOML. Use
glossary = [...]orsuppress_phrases = [...]to replace earlier config-layer lists, andextra_glossary = [...]orextra_suppress_phrases = [...]to append to them. - Common JW/Bible and general capitalization such as
Jehovah,Governing Body,Kingdom Hall,Bible,jw.org,OpenAI,ChatGPT,YouTube, andWi-Fiis normalized by default. - Project glossary files named
.whisper-glossary.json,.whisper-glossary.txt,whisper-glossary.json, orwhisper-glossary.txtare auto-loaded from parent folders when present. You can stack extra glossary files explicitly with repeated--glossary=PATH. - Text glossary files use
source => Replacementlines, while JSON glossary files can be a plain object of string replacements. Suppression text files accept optionalstart:,end:, orany:prefixes per line, and JSON suppression files can use matchingstart,end, andanykeys. - Bible references such as
Psalm 83 18,Psalm 83-18,Psalm 83.18,Psalm 8318, and range forms likePsalm 83 18 19are normalized by default. Use--no-bible-reference-normalizationto opt out. - Spoken forms such as
Psalm 83 verse 18,Psalm chapter 83 verse 18, and1 John chapter 4 verse 8are available as an opt-in with--bible-reference-phrases. - Subtitle cue starts and ends are speech-trimmed by default to avoid long lead-ins and long tails over music or ambient audio. Timed-word edges that sit outside detected speech are also pruned conservatively, cue timing is smoothed for readability, and obvious repeated-word glitches are collapsed conservatively when timed words are available. Use
--no-speech-trimto opt out of the speech-aware cleanup pass. --subtitle-style=balanced|strictlets you keep the current balanced defaults or switch to a stricter readability profile with tighter line width and lower chars-per-second targets.- Known boilerplate intros and outros can be suppressed with
--suppress-phrases=PATH, and project suppression files named.whisper-suppress.json,.whisper-suppress.txt,whisper-suppress.json, orwhisper-suppress.txtare auto-loaded from parent folders when present. --review-postprocessing/--lintdoes not rewrite extra text on its own; it reports leftover spoken Bible-reference phrases, dense subtitle cues, and other postprocessing things you may want to inspect.--embedkeeps the original media streams and adds a soft subtitle track when the container supports it directly.--embed-fileuses an existing.srtor.assinstead of retranscribing, and bare-f/--embed-filelooks for a matching subtitle file next to the video. It runs directly in the launcher Python, skips backend loading, and reuses source audio language metadata when available.--in-placefirst writes to a temporary file, then replaces the original video only after a successful mux. The short alias is-i.--fontsets the font family used for ASS and karaoke subtitle output. The short alias is-F.- MP4 and MOV use
mov_textfor embedded text subtitles; ASS subtitles fall back to MKV so styling survives. --burnalways re-encodes video because subtitle burn-in uses anffmpegvideo filter.--burn-vcodec=autoletsffmpegchoose the video encoder, or you can pass a codec such aslibx264orlibsvtav1.- MLX diagnostic flags are for comparison and investigation:
--mlx-word-timestamps=auto|on|off--mlx-output-format=auto|subtitle|text--mlx-model-default=wrapper|official
- The normal wrapper behavior stays subtitle-oriented unless you explicitly ask for a different comparison mode.
- First-run setup can take longer because packages and models may need to be installed or downloaded.
- Speaker labels depend on pyannote and may require accepting model terms on Hugging Face plus setting
HF_TOKENorHUGGINGFACE_TOKEN. - Soft subtitle embedding and burn-in both require
ffmpeg, and the default speech-onset trim uses it when available. - In-place embedding only works when the embedded output can stay in the same container; cases that need an MKV fallback still require plain
--embed. - MLX behavior can vary by machine, Python version, model choice, and the host Metal stack. If MLX fails or macOS reports that Python closed unexpectedly, try
--backend=faster-whisperand use--doctor --deeponly when you want an explicit native import check.
Use this section for shared prerequisites and friendlier ways to run scripts without living in a terminal. Script-specific notes can link back here instead of repeating the same setup steps everywhere.
These scripts stay command-line-first because that keeps them portable, scriptable, and easy to debug. Friendly launchers are thin wrappers around the same commands for people who prefer double-clicking, drag-and-drop, file pickers, or context menus.
Good launchers should:
- show command output or keep a log file so errors are not hidden
- pass selected files and folders through to the script without changing them
- keep the underlying command easy to inspect and edit
- rely on the shared Python, Git, and tool setup below
For a simple double-click launcher, create a .command file that runs a script from this repo. For drag-and-drop, create an Automator Application or Shortcuts workflow that accepts files or folders from Finder and passes them to the script.
Helpful macOS patterns:
- Finder Quick Actions work well for right-click workflows.
- Automator Applications work well for drag-and-drop workflows.
- A
.commandfile should be executable withchmod +x. - Keep Terminal visible while testing so setup prompts and errors are easy to see.
Example wrapper shape:
#!/bin/zsh
cd /path/to/maj-scripts-vibe || exit 1
./script-name "$@"For Windows, use a PowerShell script, a .cmd file, or a shortcut in the Send to folder. The py launcher is the safest default because it forwards arguments to Python scripts predictably.
Helpful Windows patterns:
- A
Send toshortcut works well for right-click file workflows. - A PowerShell wrapper can keep the window open after errors.
- Start with one selected file while testing, then try multiple files.
- If Windows blocks a downloaded script, unblock it from file Properties or use a local wrapper you created yourself.
Example wrapper shape:
py C:\path\to\maj-scripts-vibe\script-name @argsFor Linux desktops, use a .desktop launcher, a file-manager custom action, or a small shell wrapper. Nautilus, Nemo, Dolphin, and Thunar each expose custom actions a little differently, but the core idea is the same: pass selected files to the script and keep output visible.
Helpful Linux patterns:
- Use
Terminal=truein.desktoplaunchers while testing. - File-manager custom actions are often the best right-click workflow.
- A shell wrapper can normalize paths and write logs before calling the repo script.
- Desktop environments differ, so keep launcher docs practical rather than tied to one file manager.
Example .desktop command shape:
Exec=/path/to/maj-scripts-vibe/script-name %F
Terminal=trueTreat launchers as convenience wrappers, not separate apps with different behavior. When a launcher is new, test it with a tiny throwaway file or a harmless preview command first. If a script offers a dry-run, doctor, or sample-file command, use that before handing it important files.
Most scripts in this repo are expected to use Python 3.
Check whether Python 3 is already available:
python3 --versionIf that command works, you're probably already most of the way there. If not, the platform guidance below will help you get set up.
For this repo, a modern Python 3 release is the safe default.
Python setup by platform:
Do not assume a usable python3 is already present. A quick check first can save time:
python3 --versionIf python3 is missing:
- Install Homebrew if needed.
- Install Python with Homebrew.
For scripts that need compiled dependencies or multimedia tools, Xcode Command Line Tools may also be useful:
xcode-select --installPython 3 is often available already, but it is still worth checking first:
python3 --versionIf it is missing, Debian/Ubuntu-style setup is a good baseline:
sudo apt-get update
sudo apt-get install -y python3 python3-venv ffmpegOther distros should use their normal package manager equivalents.
On Windows, it is best to treat Python installation as an explicit setup step rather than assuming it is already present.
When running Python scripts from this repo on Windows, the safest default is:
py <scriptname> [args]The py launcher passes arguments after the script name through to the script itself.
First check:
py --version
python --versionIf Python is missing, install it using one of these routes:
- Official Python installer: https://www.python.org/downloads/windows/
- a package manager such as
wingetor Chocolatey
After installation, verify:
py --version
python --versionGit is optional if you only want to download a ZIP and try one script. It becomes handy when you want to keep your local copy of this repo up to date without re-downloading everything by hand.
Check whether Git is already available:
git --versionIf you have Git, you can make a local copy with:
git clone https://github.com/majal/maj-scripts-vibe.git
cd maj-scripts-vibeLater, update that copy from inside the repo folder:
git pullIf Git feels like too much, downloading a fresh ZIP from GitHub is still okay. Git just makes updates tidier. If you prefer a visual app, GitHub Desktop can clone the repo and update it with Fetch/Pull buttons.
Package managers help you install and update command-line tools without chasing individual downloads by hand.
Package manager setup by platform:
Homebrew (macOS)
Install Homebrew by following the official instructions:
Verify Homebrew:
brew --versionCommon examples:
brew install python
brew install ffmpeg
brew install gitYou can use the same pattern for other command-line tools as new scripts are added to this repo.
Verify installed tools as needed:
python3 --version
ffmpeg -version
git --versionwinget and Chocolatey (Windows)
For most Windows users, winget is the simpler default choice because it is built into modern Windows versions. Chocolatey is also a solid option if you already use it.
Verify winget if available:
winget --versionCommon examples with winget:
winget install Python.Python.3
winget install Gyan.FFmpeg
winget install Git.GitEquivalent examples with Chocolatey:
choco install python
choco install ffmpeg
choco install gitYou can use the same pattern for other command-line tools as new scripts are added to this repo.
Verify installed tools as needed:
py --version
ffmpeg -version
git --version
python --versionWhen future scripts are added, keep this README as the main navigation page and update it alongside the script so new tools stay easy to discover.
Keep Your Local Setup generic and reusable. Script-specific requirements, caveats, and quality-of-life notes should live in the relevant script section instead.
For quick repo checks, run the lightweight test harness before or after changes:
python3 -m testsOn Windows, use:
py -m testsThe harness covers smoke checks for the top-level CLIs, README consistency checks, and focused behavior tests for wh and core whisper logic.
Detailed contributor and AI-agent rules live in AGENTS.md.