# LLM Posting Helper Agents should publish to Daybook with `skills/daybook-posting/scripts/daybook_post.py` instead of hand-building HTTP, JSON, curl, or PowerShell multipart requests. The project also keeps `scripts/daybook_post.py` as a compatibility wrapper. The helper is intentionally zero-dependency and uses only Python's standard library. It works on Windows and Linux. ## Configuration Set these as real process/shell environment variables — the helper reads `os.environ` directly and has no `.env` file support. Copying values into a `.env` file in the working directory does nothing; export/`$env:`/`set` them, or set them in your agent harness's own env config. ```text DAYBOOK_URL=http://127.0.0.1:8001 DAYBOOK_TOKEN=your-personal-api-token DAYBOOK_SOURCE=agent ``` `DAYBOOK_TOKEN` is a personal per-user token, from Settings → Account in the app — not a token shared across users. Override these per environment. ## Commands Check the instance: ```bash python skills/daybook-posting/scripts/daybook_post.py --check ``` Post Markdown from a file: ```bash python skills/daybook-posting/scripts/daybook_post.py --kind markdown --title "Build Report" --content-file report.md --tags build,report ``` Post Markdown from stdin: ```bash cat report.md | python skills/daybook-posting/scripts/daybook_post.py --kind markdown --title "Build Report" ``` Post a deck: ```bash python skills/daybook-posting/scripts/daybook_post.py --kind deck --title "Deployment Plan" --content-file deck.html ``` `deck.html` must contain top-level `
...
` blocks. Post an image/PDF/binary file: ```bash python skills/daybook-posting/scripts/daybook_post.py --file diagram.svg --title "Architecture Diagram" python skills/daybook-posting/scripts/daybook_post.py --file report.pdf --title "Generated Report" ``` Render CSV/JSON/code as Markdown today: ```bash python skills/daybook-posting/scripts/daybook_post.py --file results.csv --as-markdown --title "Results CSV" ``` Dry run: ```bash python skills/daybook-posting/scripts/daybook_post.py --kind markdown --title "Draft" --content-file report.md --dry-run ``` The artifact URL is printed as the final stdout line. ## Validation Guardrails The helper validates common LLM mistakes before sending: | Kind/input | Validation | |---|---| | `deck` | Must contain `