Skip to main content

Prompt Diary

Language: English | 简体中文

Documentation: GitHub Pages

CI Publish PyPI Coverage budget

Prompt Diary prepares bounded workspaces from local assistant session history and generates evidenced prompt diary reports that help users review and improve how they collaborate with AI coding agents.

The tool targets Python 3.10 and newer. The package exposes prompt-diary as the primary console command after installation; report is installed as a compatibility alias.

Usage

Quick Start

Install Prompt Diary from PyPI as an isolated uv tool:

uv tool install prompt-diary

Prompt Diary depends on the stable Codex Python SDK for agent-backed report generation.

Configure publishing if you want reports sent to Notion:

prompt-diary config init

Generate the report for the most recent completed day:

prompt-diary generate

If you only want a local report, skip configuration and run prompt-diary generate --no-notion. The command prepares the workspace if needed and writes the report under the default reports root.

Configuration

Configuration is optional for local-only reports. Run prompt-diary config init when you want Notion publishing; it also lets you accept or override the data folder and records the required reporter name:

prompt-diary config init

The setup prompts for the Notion integration token, optional data folder, target database id, and required reporter name for the 汇报人 column. Credentials are validated before they are saved, written to a single config file with 0600 permissions, and never passed on the command line. Use these commands to inspect the stored configuration:

prompt-diary config show   # print the configuration (token masked) and the file location
prompt-diary config path   # print the config file location

Set the language for Codex-generated natural-language report content with:

prompt-diary config language zh-Hans
PROMPT_DIARY_CONTENT_LANGUAGE=zh-Hans prompt-diary generate

The config file lives under the per-user config directory (~/.config/prompt-diary/config.json on Linux; the platform equivalent on macOS and Windows), overridable with PROMPT_DIARY_CONFIG. Environment variables still override stored credentials and settings when present, including NOTION_API_KEY, NOTION_PAGE_ID, PROMPT_DIARY_HOME, and PROMPT_DIARY_CONTENT_LANGUAGE. Content language supports en, zh-Hans, and zh-Hant. It applies to generated natural-language content values; deterministic renderer-owned labels, headings, fallbacks, and Notion metadata banners remain English in this release.

Generate a report

Run the full report workflow directly:

prompt-diary generate

By default, prompt-diary generate first resolves the timezone, then targets the previous calendar day in that timezone: the most recent completed day. It prepares the workspace if it is missing, generates the report, and renders report.md and report.notion.json. The timezone is resolved from --timezone, then PROMPT_DIARY_TIMEZONE, then TZ, then the system timezone, then UTC. Notion publishing is enabled by default when both the Notion token and database id resolve from the stored config or environment. Pass --no-notion to skip publishing, or pass --notion to require publishing and fail if Notion is not configured.

Use explicit targeting when needed:

prompt-diary generate --date 2026-05-12 --timezone Asia/Shanghai
prompt-diary generate --today
prompt-diary generate --date 2026-05-12 --timezone Asia/Shanghai --notion

The reports root is the base folder for prepared workspaces and generated report files. By default it is the per-user data directory (~/.local/share/prompt-diary/ on Linux; the platform equivalent on macOS and Windows). Each run writes under <reports-root>/work/<YYYY-MM-DD>/. Override the location with --reports-root <path>, PROMPT_DIARY_HOME, or the saved data folder. Precedence is --reports-root, then PROMPT_DIARY_HOME, then the saved data folder, then the default per-user data directory. Earlier versions wrote to ./.reports in the current directory; pass --reports-root .reports to keep using an existing local directory.

In an interactive terminal, prompt-diary generate shows live progress. When output is redirected or running in CI, it prints plain log lines. Pass --quiet to suppress the live output and print only the final summary.

Collect a support bundle

Package an existing prepared workspace for support/debug upload:

prompt-diary collect --date 2026-05-12 --timezone Asia/Shanghai
prompt-diary collect --workspace /path/to/prepared-workspace --output support-bundle.zip

collect requires the prepared workspace to already exist. By default it writes a zip under <reports-root>/collections/ and excludes copied raw session transcripts under projects/*/sessions/**. Pass --include-raw-sessions only when the bundle should contain raw assistant transcript content.

Development

This project uses uv for Python version, environment, dependency, build, and release workflows.

Read docs/src/product.md before designing new features, changing report content, or modifying the generation pipeline. It defines the tool's purposes and principles that downstream design must satisfy.

For environment setup, build commands, type checking, testing, coverage, linting, and pre-submit checks, including the optional Ubuntu 24.04 devcontainer, see the Development Guide. For codebase architecture and API design, see Architecture.

Metadata

Release files for prompt-diary 0.2.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prompt-diary 0.2.19
File Size Uploaded Provenance Actions
prompt_diary-0.2.19.tar.gz 188.4 kB Without provenance Details for prompt_diary-0.2.19.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for prompt-diary 0.2.19
File Interpreter ABI Platform Actions
prompt_diary-0.2.19-py3-none-any.whl Python 3 none any Details for prompt_diary-0.2.19-py3-none-any.whl

Total release size: 422.2 kB

Release files / prompt_diary-0.2.19.tar.gz

Download URL prompt_diary-0.2.19.tar.gz
Size 188.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3edee4a842bdb0cf95f38fef2073c3e3d5bc2dcbf1667dbdf5e8f1b785712a59
BLAKE2b-256 checksum
How to use checksums
ecad531f25759fe59605071575c1b08bfa803099fb30f466d40aeb22574444b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / prompt_diary-0.2.19-py3-none-any.whl

Download URL prompt_diary-0.2.19-py3-none-any.whl
Size 233.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96ff4e10a4ffb0e3160745ed326923b8cad57d55c4169f262a1ea10f8422b2c4
BLAKE2b-256 checksum
How to use checksums
a8a3080230c9fb9a868cce263005a0c3982fdb1e1b2b1cc65c4bb9cd01427758
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for prompt-diary 0.2.19

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page