Scripts of various kinds (but also other scripts)
- TypeScript 86.7%
- Python 7.9%
- Nix 5.4%
| deno | ||
| python | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
Scripts! just scripts!
A collection of utility scripts in various languages (Deno/TypeScript, Python), managed with Nix Flakes for easy installation and execution.
Installation
The recommended way to use these scripts is via Nix Flakes and nix profile. This adds them to your PATH automatically.
# Clone the repo (if you want to install from local source)
git clone https://github.com/JulianNymark/scripts.git
cd scripts
# Install all scripts at once
nix profile add .
# Or install specific scripts by their alias
nix profile add .#nxs
nix profile add .#yttranscript
Once installed, you can run the scripts using their short aliases:
nxs, tdc, img2gbar, dyp, yttranscript, imr, ffr, ffc, wtf.
Available Aliases
| Alias | Full Name | Description |
|---|---|---|
nxs |
nix-search-formatter |
Formats nix search output to be more readable. |
tdc |
thumbnailify_cwd |
Generates thumbnails for images and videos in CWD. |
img2gbar |
image_to_uint16_array_4bpc_GBAR |
Converts images to 16-bit 4bpc GBAR arrays (for C++). |
dyp |
download_youtube_playlist |
Downloads audio from a YouTube playlist using yt-dlp. |
yttranscript |
yttranscript |
Fetches transcripts for YouTube videos. |
imr |
image_resize |
Resizes images using Sharp. |
ffr |
ffmpeg_resize |
Resizes videos using FFmpeg. |
ffc |
ffmpeg_count_frames |
Counts frames in a video file quickly. |
cln |
cleanup_build_artifacts |
Smart build artifact cleaner (git-aware, context-validated). |
randword |
randword |
Random English word selector (downloads word list on first run). |
pr-banner |
pr_banner |
Generates a banner image from PR diff and injects it into the PR description. |
wtf |
wtf |
Command introspection — shows what a command is (alias, function, builtin, or executable). |
Running Without Installing
You can also run any script directly without cloning or installing:
nix run github:JulianNymark/scripts#nxs -- "search terms"
Adding New Scripts
- Add your script to the
deno/orpython/directory. - Update
flake.nix:- For Deno scripts, add a new entry using
mkDenoApp(copy an existing one and changename,script,permissions, and optionallyruntimeInputs). - For Python scripts, add a new entry using
mkPythonApp(copy an existing one and changename,script, andpythonPackages). - Add your new package to the
pathslist insidedefault = pkgs.symlinkJoin { ... }so it is included in the aggregate install.
- For Deno scripts, add a new entry using
- (Optional) Keep the
nix-shellshebang for standalone execution.
Nix-shell Shebang (Legacy/Standalone)
Each script still contains a nix-shell shebang, allowing it to be run as a standalone file:
./deno/nix-search-formatter.ts <search-term>
This will automatically fetch dependencies and run the script, but it won't be in your PATH unless you manually symlink it.
- Update
flake.nix— add amkDenoApp/mkPythonAppentry and include it indefault. - Run
nix profile upgrade '.*'to pick it up.