Record browser actions with on-demand screenshots and element highlighting. Generates rerunnable scripts and markdown documentation.
This is an npm workspaces monorepo with three packages:
| Package | Description |
|---|---|
@doc-recorder/cli |
Command-line recorder tool |
@doc-recorder/desktop |
Electron desktop app with GUI |
@doc-recorder/shared |
Shared utilities (script/markdown generation) |
npm installLaunch the Electron desktop app for a graphical recording experience:
npm run desktopFeatures:
- Visual recording controls with start/stop buttons
- URL history and recent recordings sidebar
- Viewport presets (WSXGA+, Full HD, HD, Mobile, Mobile Landscape, Tablet, Tablet Landscape, Custom)
- Screenshots-only mode (skip recording clicks/form inputs)
- Custom CSS injection (hide cookie banners, popups, etc.)
- Refetch screenshots from existing recordings
- Draggable recorder panel (constrained to viewport)
- Built-in markdown editor for recorded documentation
- Slugified markdown filenames based on project title
- Project management (create, edit, delete projects; organize recordings)
- Screenshot editing (blur regions, annotations, reset to original)
- Steps editor: navigate, insert, retake, delete screenshots and edit notes on existing recordings
- Per-project auth state persistence for login-required sites
- Custom titlebar with hamburger menu and sidebar toggle
npm run record <url> [options]Options:
| Option | Description | Default |
|---|---|---|
-o, --output <dir> |
Output directory | ./doc-output |
-v, --viewport <size> |
Viewport (WIDTHxHEIGHT) | 1280x720 |
-t, --title <title> |
Document title (adds YAML front matter) | none |
-s, --separator <sep> |
Screenshot separator in markdown | --- |
--screenshots-only |
Only capture screenshots (skip click/fill recording) | false |
-c, --css <css> |
Custom CSS to inject (hide elements, etc.) | none |
-cf, --css-file <path> |
Path to CSS file to inject | none |
--refetch <dir> |
Refetch screenshots from existing recording | - |
-n, --non-interactive |
Skip interactive prompts (requires URL and title via flags) | false |
-ns, --no-separator |
Disable screenshot separators in markdown | false |
Examples:
npm run record https://example.com
npm run record https://example.com -o ./my-docs -v 1920x1080
npm run record https://example.com -t "Getting Started Guide"
npm run record https://example.com --screenshots-only
npm run record -- --refetch ./doc-outputAlternative (legacy):
node recorder.js <url> [output-dir] [viewport] [title]| Action | Result |
|---|---|
Ctrl+Click |
Highlight clicked element |
Ctrl+Hover |
Preview highlight on element (without locking) |
| Shortcut | Action |
|---|---|
Ctrl+Shift+S |
Take screenshot |
Ctrl+Shift+K |
Screenshot with note (opens markdown editor) |
Ctrl+Shift+F |
Full page screenshot |
Ctrl+Shift+H |
Record hover + toggle highlight |
Ctrl+Shift+X |
Clear highlight |
Ctrl+C |
Stop recording and save |
A shortcuts legend is displayed in the browser during recording and automatically hidden when taking screenshots.
Use Ctrl+Click on any element to highlight it with an orange overlay. The highlight persists across screenshots until cleared with Ctrl+Shift+X.
When using Ctrl+Shift+K, a dialog appears with a markdown toolbar:
- Formatting buttons: B (Bold), I (Italic), H1, H2, β’ (Bullet), 1. (Numbered),
<>(Code), π (Link) Ctrl+Enterto save,Escapeto cancel- Notes are included in
screenshots.mdand printed during replay
After recording, you get:
recorded-script.js- Rerunnable Playwright scriptscreenshots/- All captured screenshots<title>.md- Markdown documentation (filename is slugified title, e.g., "Getting Started" βgetting-started.md)actions.json- Raw action log (includes title, viewport, and actions)
Example screenshots.md with title:
---
title: "Getting Started Guide"
---
## Step 1: Click Login

---node doc-output/recorded-script.jsThis re-executes all actions, regenerates screenshots and markdown, and prints notes to the console.
Regenerate screenshots from an existing recording without re-recording actions:
# CLI
npm run record -- --refetch ./doc-output
# Desktop
# Click "Refetch" button on any recording in the history sidebarThis replays only goto and screenshot actions, useful for updating screenshots after website changes.
Record screenshots without capturing clicks or form inputs. Useful when entering credentials:
npm run record https://example.com --screenshots-onlyIn desktop app, uncheck "Record actions" before starting. A warning reminds you that credentials would be stored in actions.json when recording is enabled.
Inject custom CSS to hide cookie consent banners, popups, or other unwanted elements during recording:
# Inline CSS
npm run record https://example.com -c ".cookie-banner { display: none !important; }"
# From file
npm run record https://example.com -cf ./hide-elements.cssIn the desktop app, check "Inject custom CSS" to reveal a textarea where you can enter CSS rules or load them from a file. CSS is injected on all pages and persists across navigation.
Generate videos from recorded sessions using generate-recording.js:
node generate-recording.js ./doc-output/actions.json
node generate-recording.js ./doc-output/actions.json -f gif -o ./my-recordingOptions:
| Option | Description | Default |
|---|---|---|
-o, --output <dir> |
Output directory | ./recording-output |
-f, --format <fmt> |
Format: mp4, gif, webm | mp4 |
--fps <n> |
Frame rate | 2 |
--width <n> |
Video width | 1280 |
--height <n> |
Video height | 720 |
--note-position <pos> |
Note overlay: top, bottom | bottom |
--action-gifs |
Generate individual GIFs for each action | false |
--gifs-only |
Skip full video, only generate action GIFs | false |
Requires ffmpeg for video encoding.
- Opens a browser with the specified viewport
- Records clicks, form inputs, and navigation automatically
- Use
Ctrl+Clickto highlight any element - Use
Ctrl+Shift+Sto capture screenshots - Use
Ctrl+Shift+Kto add markdown notes with screenshots - Press
Ctrl+Cwhen done - generates replay script and documentation
- Click "+" in the sidebar to start a new recording
- Enter URL, title, and select viewport preset (or custom dimensions)
- Optionally disable "Record actions" for screenshots-only mode
- Click "Start Recording" and interact with the page
- Use keyboard shortcuts or the draggable recorder panel to capture screenshots
- Click "Stop" when done - recordings are saved to the sidebar
- Use "Refetch" to regenerate screenshots from existing recordings
packages/
βββ cli/ # Command-line recorder (@doc-recorder/cli)
βββ desktop/ # Electron app (@doc-recorder/desktop)
βββ shared/ # Shared utilities (@doc-recorder/shared)
# Run CLI
npm run record <url>
# Run desktop app (dev mode)
npm run desktop
# Build desktop app
npm run desktop:build


