You have scripts for the small jobs you do once in a while. One kills whatever holds a port. One turns a folder of videos into GIFs. One renames photos by date. Some an AI wrote for you, some you wrote yourself.
They live in a chat history, a Markdown note, or a folder of .sh files. Every time you need one, you find it, open it, change the folder or the number in the middle of a long line, and run it. Next time, again.
cmdbook is a desktop app for macOS, Windows and Linux where those scripts live. You save a script once, and from then on it's one click to run it again.
How it works
Save it once. Paste the script into a new command, give it a name, put it in a folder. Set the folder it runs in and any environment variables it needs, once.
Run it with one click. The output shows up in a real terminal panel next to it, so you can watch it, scroll it, and answer the script if it asks you something. Run it again tomorrow, or next month, and it's the same click. No searching for where you saved it.
Find it again. Your commands sit in folders in a sidebar. Search finds them by name or by what's in the script, and Cmd+P (Ctrl+P on Windows and Linux) opens a quick launcher from anywhere in the app.
Only if it needs a value: add a form. Most scripts just run. When one needs something different each time, a folder or a port, replace that value with a placeholder:
DIR="{{prompt:folder}}" and Run shows a small form first. You can drag a file or folder onto it, and it remembers your last answer, so most of the time you just press Enter. A few more forms of the placeholder:
-
{{prompt:count?10}}: a field that defaults to 10 -
{{prompt:size?1280|960|1920}}: a dropdown -
{{prompt:token!secret}}: a masked field that's never remembered
Everything else is the script you already have.
This series takes real scripts, one per post, and shows them saved in cmdbook. Here they all are.
Everyday scripts (free)
Find and kill the process holding a port
Type a port, see who holds it (command, folder, parent), and answer y or n before anything is killed.
Find the files you changed recently with git from the command line
Drag a project in and get your own recent files, newest first, without node_modules and build output.
Convert every video in a folder to GIF with ffmpeg from the command line
Drag a folder in, pick a frame rate and a width. Every video in it, and in its subfolders, becomes a GIF.
Extract the audio from a video with ffmpeg from the command line
Drag a video in and pick a format. original keeps the audio as it is, in under a second.
Add a watermark to thousands of images with ImageMagick from the command line
Folder, text, corner, opacity. Originals untouched, all CPU cores busy, 2,000 images in under a minute.
Shrink a screen recording with ffmpeg from the command line
Drag a recording in, pick a width. A minute of 1080p went from 285 MB to 6 MB.
Convert a PDF to Markdown with MinerU from the command line
Drag a PDF in, pick a tier and the pages. Headings and tables come out as Markdown.
Rename photos by the date they were taken with exiftool from the command line
Dry run first, then rename by the date in the photo, not the file's date. Nothing is ever overwritten.
Run a check before a command, and a sound when it's done
Pre runs before the command and stops it if it fails. Post runs after: always, on success, or on failure.
For your projects (Pro)
Start your dev stack in order, waiting until each service is ready
Click the web app; the database, job server and API start first, each one waited for until it's ready.
Switch your whole stack between dev and test without editing .env files
Variables on the folder, a preset per environment, secrets in the keychain. One click switches every command.
Let your AI agent save the scripts it writes
The agent saves the script as a command, runs it and reads the output. You get the same command as a button.
Run a script every day on your Mac without cron
A schedule is a setting on a command you already run. The output is there when you look.
The dev server is stopped, but the port is still taken
See every process a command started. Stop stops all of them, so nothing is left holding a port.
Open a terminal already in your command's folder, with its variables set
A shell next to a running command: same folder, same variables, closed with the run.
See the HTTP requests your script makes, without changing it
Turn on capture, run, and read every request and response, headers and bodies included.
What's free, what's Pro
Free, with no account and no time limit: saving commands in folders, prompts and forms, dragging files in, remembered answers, search, import and export, Pre and Post hooks, health checks.
Pro: dependencies, folder variables and presets, secrets in your OS keychain, automations, the CLI and MCP server for your terminal and your AI agent, process tree, the integrated terminal, and HTTP capture.
Your commands stay on your machine.
Try cmdbook here: printf.app/cmdbook

















