Examples
Five example scripts demonstrating progressively more advanced features. These are the built-in examples shipped with QuikGIF (also available via the MCP resource quikgif://examples/{name}).
hello.qgif
Minimal single-window recording demo. Opens a Terminal, types a command, and renders a GIF.
# hello.qgif — minimal single-window recording demo
# Usage: quikgif script hello.qgif
set fps 30
set output "hello.gif"
set max-width 800
# Open a fresh Terminal window
open "Terminal"
wait 0.5
capture-window app "Terminal" as $term
# Resize for consistent dimensions and clear for a clean slate
resize 800 400
wait 0.3
clear
wait 0.3
# Record for 3 seconds while typing
record $term duration 3.0 continue
type "echo Hello from QuikGIF!" enter
wait 1.0
remain
render
What this demonstrates:
- Basic script structure: settings, window setup, record, render
continuekeyword for non-blocking recordingremainto wait for the recording duration to finishclearto start with a clean terminal
git-workflow.qgif
Multi-step git demo with command capture and spotlight effects.
# git-workflow.qgif — Multi-step git demo
# Demonstrates: typing, command capture, spotlight, multi-step recording
set fps 30
set output "git-workflow.gif"
set max-width 800
open "Terminal"
wait 1.0
capture-window app "Terminal" as $term
# Step 1: Show the git log
record $term duration 8.0 continue
type "git log --oneline -5" enter
wait 2.0
# Capture the output for spotlighting
run "git log --oneline -5" as $log
# Highlight the most recent commit
spotlight stdout $log[0] duration 2.0
wait 2.5
clear-fx
# Step 2: Show the diff
type "git diff --stat" enter
wait 2.0
remain
render
What this demonstrates:
runcommand to capture shell output into a variablespotlight stdout $var[N]to highlight specific output linesclear-fxto remove spotlight effects- Multi-step workflow within a single recording segment
multi-window.qgif
Recording across multiple windows with crossfade transitions and mouse interaction.
# multi-window.qgif — Multi-window recording with transitions
# Demonstrates: multiple windows, crossfade transitions, mouse interaction
set fps 30
set output "multi-window.gif"
set max-width 800
set transition 0.5
# Record Terminal
open "Terminal"
wait 1.0
capture-window app "Terminal" as $term
record $term duration 4.0 continue
type "ls -la" enter
wait 2.0
remain
# Switch to Finder
open "Finder"
wait 1.0
capture-window app "Finder" as $finder
record $finder duration 5.0 continue
cursor 200 300
wait 0.5
move 400 250 duration 0.5
click
scroll down 3
wait 1.0
remain
render
What this demonstrates:
- Multiple recording segments from different applications
set transition 0.5for crossfade between segments- Mouse interaction:
cursor(instant move),move(smooth animation),click,scroll - Each segment records independently, then all are stitched together by
render
spotlight-demo.qgif
Visual effects showcase demonstrating spotlight, spotlight-shift, and region highlighting.
# spotlight-demo.qgif — Visual effects showcase
# Demonstrates: spotlight regions, spotlight-shift animation, clear-fx
set fps 30
set output "spotlight-demo.gif"
set max-width 800
open "Terminal"
wait 1.0
capture-window app "Terminal" as $term
record $term duration 10.0 continue
# Run a command and capture output
type "cat /etc/hosts" enter
wait 2.0
run "cat /etc/hosts" as $hosts
# Spotlight the first line
spotlight stdout $hosts[0] duration 2.0
wait 2.5
# Shift spotlight to third line
spotlight-shift stdout $hosts[2] duration 1.5
wait 2.0
# Spotlight a specific region
clear-fx
wait 0.5
spotlight region 50 80 400 60 duration 2.0
wait 2.5
clear-fx
remain
render
What this demonstrates:
spotlight stdout $var[N]to highlight output linesspotlight-shiftto animate the spotlight to a new targetspotlight regionto highlight an arbitrary screen areaclear-fxto remove effects between spotlight sequences
polish-demo.qgif
Timing presets, auto-pacing, keystroke badges, and intro/outro title cards.
# polish-demo.qgif — demonstrates timing + visual polish features
#
# Features used: timing presets, auto-pacing, keystroke badges, intro/outro
set pace demo
set keystroke-badges true
set intro-bg #0d1117
set intro-fg #58a6ff
intro "Git Workflow Demo" subtitle "Using QuikGIF scripting" duration 2
open "Terminal"
capture-window app "Terminal" as $term
resize 800 500
record $term duration 8 continue
type "git status" enter
type "git add ." enter
key cmd+s
wait 1
remain
outro "Created with QuikGIF" duration 1.5
render
What this demonstrates:
set pace demoapplies the demo timing preset (30fps, 0.04s typing, auto-pacing enabled)set keystroke-badges trueshows floating key combo badges (e.g., whenkey cmd+sfires)- Custom title card colors with
intro-bgandintro-fg introandoutrotitle cards with subtitle text- The pace preset enables
auto-pace, which inserts brief pauses after each command during recording
Start with a pace preset and then override individual settings as needed. The demo preset is a good default for most use cases.