OpenParable
Skip to content
← Back to skills

Export Timeline PDF

Documents
export-timeline-pdf

Export Timeline PDF is an Agent Skill for documents published in the rcarmo/piclaw repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Export a chat timeline to a PDF using the internal localhost export endpoint and wkhtmltopdf (currently unsupported in this environment).

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/rcarmo/piclaw/blob/HEAD/skel/.pi/skills/export-timeline-pdf/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/export-timeline-pdf, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Export timeline PDF

⚠️ This skill is currently unsupported here.

Fallback behaviour

If the user asks for a timeline export right now:

  1. Say that PDF export is currently unavailable in this environment.
  2. Offer a fallback instead:
    • gather the requested range with the messages tool
    • write a Markdown or HTML export to the workspace
    • attach that file if the user wants a downloadable artifact
  3. Do not pretend the PDF path worked if the skill is unsupported.

When this skill is supported

Use the script below only when the local skill runtime and wkhtmltopdf are known to work.

Examples

Export the last 50 messages:

bun /workspace/.pi/skills/export-timeline-pdf/export-timeline-pdf.ts --chat web:default --last 50

Export a date range:

bun /workspace/.pi/skills/export-timeline-pdf/export-timeline-pdf.ts --chat web:default \
  --from "2026-03-01T00:00:00Z" --to "2026-03-05T23:59:59Z"

Export a row-id range:

bun /workspace/.pi/skills/export-timeline-pdf/export-timeline-pdf.ts --chat web:default \
  --from-row 1234 --to-row 1300

Dark theme:

bun /workspace/.pi/skills/export-timeline-pdf/export-timeline-pdf.ts --chat web:default --last 20 --theme dark

Options

FlagDescriptionDefault
--chatChat JID to exportweb:default
--fromStart timestamp (ISO 8601)(all)
--toEnd timestamp (ISO 8601)(all)
--from-rowStart message row ID(all)
--to-rowEnd message row ID(all)
--lastExport only the last N messages(all)
--themelight or darklight
--outOutput PDF path/workspace/exports/timeline-<chat>.pdf
--portPiclaw web portauto-detect / 8080
--auth-keyInternal export auth keyenv/config lookup
--html-onlySave HTML sidecar without rendering PDFoff

Auth lookup order

  1. --auth-key
  2. PICLAW_EXPORT_AUTH_KEY
  3. PICLAW_INTERNAL_SECRET
  4. PICLAW_WEB_INTERNAL_SECRET
  5. web.internalSecret from /workspace/.piclaw/config.json

Prerequisites

  • wkhtmltopdf must be installed and on PATH
  • the piclaw web server must be running locally

Notes

  • The script is read-only: it does not modify SQLite or auth/session state.
  • The HTML export endpoint is GET /internal/export/timeline.
  • The script writes an HTML sidecar next to the PDF for inspection.