Review user prompts for evidence-backed improvement in AI coding collaboration.
Project description
Prompt Diary
Language: English | 简体中文
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 report and prompt-diary
console commands after installation.
Usage
Install Prompt Diary from PyPI as an isolated uv tool:
uv tool install prompt-diary
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 report 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:
report generate
By default, report 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:
report generate --date 2026-05-12 --timezone Asia/Shanghai
report generate --today
report 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, report 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.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prompt_diary-0.2.1.tar.gz.
File metadata
- Download URL: prompt_diary-0.2.1.tar.gz
- Upload date:
- Size: 145.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29967dd605713433d29adf28a74898ca0ffb0527af3162e1792eb55a4cb42b57
|
|
| MD5 |
4cd003dd92fc537924b89b29f59a50e3
|
|
| BLAKE2b-256 |
c6c27507e8ba3e9b2191044dd564363b271b6167f1c420a0b6f09ae2a10e95ff
|
File details
Details for the file prompt_diary-0.2.1-py3-none-any.whl.
File metadata
- Download URL: prompt_diary-0.2.1-py3-none-any.whl
- Upload date:
- Size: 187.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5b3eb9176bf7614d9e7b9eecbe72d67865d1c4316a3f59a1a86fb239366adad
|
|
| MD5 |
e4dd45af668adc26262faf3c28848c98
|
|
| BLAKE2b-256 |
366b2cc62e19a551c81c5e99611dea1c4310a40db1059d2e78ce53ca6588e421
|