dream-cli
Dreaming over your Claude Code sessions. dream reads the sessions that ran in a directory, proposes memory
notes, each with evidence quoted from the transcripts, and writes the ones you tick into .dream/memory/, which your
next sessions read through one line in CLAUDE.md.
- Out of band: one read-only
claudesession reads many sessions at once, so it sees patterns no single session sees: the correction you keep repeating, the failure that recurs, how you like things done. - Checked: every quote it cites is looked up in the transcript line it names; candidates without real evidence are dropped.
- Yours to choose: nothing becomes memory until you tick it, and
dream applywrites exactly what you ticked. The memory is plain Markdown you can read, diff and commit.
"Dreaming" is the name Anthropic's research gives to this kind of offline pass over past transcripts; dream-cli is an independent implementation of it for Claude Code's local sessions.
Install
uv tool install dream-cli # or: pipx install dream-cli, pip install dream-cli
Python 3.11+ and Claude Code (claude on PATH). No other dependency. (The
package is dream-cli; dream on PyPI is an unrelated project.)
From a checkout: uv tool install ., or run ./dream.sh without installing.
Use
cd <your project>
dream list # its sessions, numbered; 'next' marks what a run would take
dream --dry-run # the digest of the last 10 sessions not dreamt yet (no model is called)
dream # dream over them: a headless, read-only claude session (several minutes)
$EDITOR .dream/runs/1/proposal.md # tick [x] what should enter the memory
dream apply # write exactly the ticked notes into .dream/memory/
Then add this line to your project's CLAUDE.md (dream prints it; it never edits CLAUDE.md itself):
@.dream/memory/MEMORY.md
and commit .dream/memory/ when you're happy with it. Run outputs (.dream/runs/) quote your transcripts and stay
out of git.
Choose what to dream over with --last N, --since 2026-11-20, --pick 1,3,5-8 (numbers from dream list) or
--session <id>; --subdirs and --worktrees take in sessions started below the directory or in its other
worktrees. A dream reads a few tens of thousands of tokens of digest plus what it searches in the transcripts:
expect several minutes and millions of cached tokens for ten long sessions.
How it works
The design has the whole of it: how sessions are found, the digest, the dream's session and its safeguards, the checks, the proposal, the memory format and the safety rules.
Develop
uv venv .venv && uv pip install --python .venv/bin/python -r requirements-dev.txt
.venv/bin/pytest -q && ruff check .
The tests never call a model: a fake claude stands in, and the fixture has real Claude Code record shapes with
neutral text.
Releases go through development, a release branch and PyPI's Trusted Publishing: see
releasing.
License
Metadata
Release files for dream-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dream_cli-0.1.0.tar.gz | 39.7 kB | With provenance | Details for dream_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dream_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dream_cli-0.1.0-py3-none-any.whl |
Total release size: 84.7 kB
Release files / dream_cli-0.1.0.tar.gz
| Download URL | dream_cli-0.1.0.tar.gz |
|---|---|
| Size | 39.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0181d01255c111629b1822b6e7f1e31d9420f9ee1a2009916d596a122b5019c1
|
|
BLAKE2b-256 checksum How to use checksums |
bc7cc07d8ada4fc307bdc8230f1298778deceed0bf71b68afaf1b0b9ad23a4a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / dream_cli-0.1.0-py3-none-any.whl
| Download URL | dream_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 45.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d454818b4de0af9221b0f9ab03fe741837073949df6894e12ffd0c189e28ccd
|
|
BLAKE2b-256 checksum How to use checksums |
6f790d23bb4d680b545949f3617bf524a7904bd51094c9afb476f6d52f8c97bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for dream-cli 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dream_cli-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA 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.