export-timeline-pdf

Export piclaw chat timelines to PDF via the internal localhost endpoint and wkhtmltopdf.

847|79|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/rcarmo/piclaw --skill export-timeline-pdf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: export-timeline-pdf
Source: https://github.com/rcarmo/piclaw/tree/main/skel/.pi/skills/export-timeline-pdf
Command: npx skills add https://github.com/rcarmo/piclaw --skill export-timeline-pdf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It converts chat conversation history stored in piclaw into a portable, printable PDF document without manually copying messages or touching the SQLite database.

Core Features & Use Cases

  • Flexible Range Selection: Export the last N messages, an ISO 8601 date range, or a specific message row ID range.
  • Theme and Output Control: Choose light or dark themes, custom output paths, and an HTML-only mode that saves a sidecar file for inspection.
  • Read-Only Safety: The script never opens SQLite and never writes auth or session state; it fetches rendered HTML from the localhost-only internal export endpoint.
  • Use Case: Archive a week of agent conversations by exporting messages from March 1-5 into a dark-themed PDF stored under /workspace/exports.

Quick Start

Ask the agent to export the last 50 messages of the default web chat to a PDF using the export-timeline-pdf skill.

Frequently Asked Questions about export-timeline-pdf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I export a chat timeline to PDF in piclaw?

Run the export-timeline-pdf.ts script with bun, passing a chat JID and a range option such as --last 50 or --from/--to ISO timestamps. The script fetches rendered HTML from the internal endpoint and renders it with wkhtmltopdf.

How do I export only a specific date range of chat messages?

Pass --from and --to with ISO 8601 timestamps, for example --from 2026-03-01T00:00:00Z --to 2026-03-05T23:59:59Z. You can also use --from-row and --to-row to select messages by row ID instead.

What dependencies are required for wkhtmltopdf PDF export?

wkhtmltopdf must be installed and available on PATH, and the piclaw web server must be running locally. The script itself uses only Bun built-in modules and has no npm package dependencies.

Why does the export fail with an auth key error?

The internal endpoint requires an auth key resolved from --auth-key, PICLAW_EXPORT_AUTH_KEY, PICLAW_INTERNAL_SECRET, PICLAW_WEB_INTERNAL_SECRET, or web.internalSecret in /workspace/.piclaw/config.json. If none are set, the script exits with an error.

Can I get the HTML output without generating a PDF?

Yes, pass the --html-only flag to write the HTML sidecar and skip PDF rendering. The script always writes an HTML sidecar next to the PDF for inspection even during normal exports.