BarkDown Preview
Use this skill when the user asks to preview a Markdown, HTML, or text file in this repository, test the BarkDown preview viewer, or make a link they can open on a phone.
Commands
- Use
barkdown <file-or-folder>when the global command is installed. - Use
pnpm preview <file-or-folder>from the repository root when you need the repo-local command. - Use
pnpm install:globalto install or refresh thebarkdowncommand in~/.local/bin.
Both preview commands build @raggle-ai/barkdown, start Vite on all network
interfaces, and print a URL with:
path=<absolute-folder>for the served folderfile=<relative-file>for the selected document, when a file was supplied
Verify
Before you report a preview link:
Check that the command printed a LAN URL.
Check the page:
curl -fsSI --connect-timeout 3 --max-time 5 "http://127.0.0.1:<port>/"Check the document API:
curl -fsS --connect-timeout 3 --max-time 5 "http://127.0.0.1:<port>/api/documents?path=<encoded-folder>"Confirm that
rootis the requested folder and that the expected file is indocuments.
If curl to the LAN address fails on the host computer but 127.0.0.1 works, do
not assume the preview is broken. The LAN URL can still work from a phone on the
same network.
Browser Testing
When the user asks to test in Browser:
- Start the preview command for the requested file or folder.
- Open the localhost URL in Browser.
- Verify visible content,
?file=direct selection, side bar navigation, and the browser console. - Stop only the preview process that this task started.
Output
Return the mobile URL and state that the preview server is running. For LAN links, state that the phone and computer must use the same local network.