dreamloop 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dreamloop-0.1.0/.github/workflows/ci.yml +39 -0
- dreamloop-0.1.0/.github/workflows/publish.yml +44 -0
- dreamloop-0.1.0/.gitignore +9 -0
- dreamloop-0.1.0/CHANGELOG.md +21 -0
- dreamloop-0.1.0/LICENSE +21 -0
- dreamloop-0.1.0/PKG-INFO +252 -0
- dreamloop-0.1.0/README.md +226 -0
- dreamloop-0.1.0/README.zh-CN.md +210 -0
- dreamloop-0.1.0/docs/assets/dashboard-placeholder.svg +31 -0
- dreamloop-0.1.0/docs/assets/dashboard-screenshot.png +0 -0
- dreamloop-0.1.0/docs/assets/hero-dashboard.svg +136 -0
- dreamloop-0.1.0/docs/assets/social-preview.png +0 -0
- dreamloop-0.1.0/docs/demo-recording.md +72 -0
- dreamloop-0.1.0/pyproject.toml +40 -0
- dreamloop-0.1.0/scripts/start-dreamloop.cmd +6 -0
- dreamloop-0.1.0/src/dreamloop/__init__.py +3 -0
- dreamloop-0.1.0/src/dreamloop/analysis.py +406 -0
- dreamloop-0.1.0/src/dreamloop/cli.py +130 -0
- dreamloop-0.1.0/src/dreamloop/core.py +601 -0
- dreamloop-0.1.0/src/dreamloop/static/style.css +1503 -0
- dreamloop-0.1.0/src/dreamloop/templates/detail.html +181 -0
- dreamloop-0.1.0/src/dreamloop/templates/index.html +509 -0
- dreamloop-0.1.0/src/dreamloop/web.py +766 -0
- dreamloop-0.1.0/tests/test_ai_config.py +114 -0
- dreamloop-0.1.0/tests/test_cli.py +25 -0
- dreamloop-0.1.0/tests/test_core_workflow.py +368 -0
- dreamloop-0.1.0/tests/test_packaging_release.py +40 -0
- dreamloop-0.1.0/tests/test_readme_positioning.py +65 -0
- dreamloop-0.1.0/tests/test_web_api.py +569 -0
- dreamloop-0.1.0/uv.lock +3323 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Test and build
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Check out repository
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v5
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.11"
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: uv sync --extra dev
|
|
28
|
+
|
|
29
|
+
- name: Verify console script
|
|
30
|
+
run: uv run dreamloop --help
|
|
31
|
+
|
|
32
|
+
- name: Run tests
|
|
33
|
+
run: uv run --extra dev pytest
|
|
34
|
+
|
|
35
|
+
- name: Build package
|
|
36
|
+
run: uv build
|
|
37
|
+
|
|
38
|
+
- name: Check package metadata
|
|
39
|
+
run: uv run --extra dev twine check dist/*
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
name: Build and publish
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
environment:
|
|
16
|
+
name: pypi
|
|
17
|
+
url: https://pypi.org/p/dreamloop
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
id-token: write
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Check out repository
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v5
|
|
28
|
+
|
|
29
|
+
- name: Set up Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: "3.11"
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: uv sync --extra dev
|
|
36
|
+
|
|
37
|
+
- name: Build package
|
|
38
|
+
run: uv build
|
|
39
|
+
|
|
40
|
+
- name: Check package metadata
|
|
41
|
+
run: uv run --extra dev twine check dist/*
|
|
42
|
+
|
|
43
|
+
- name: Publish package distributions to PyPI
|
|
44
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.1.0 - 2026-06-13
|
|
4
|
+
|
|
5
|
+
DreamLoop's first public release turns the project into a usable local-first dream journal:
|
|
6
|
+
|
|
7
|
+
- Six-page Web loop: Dashboard, Log, Detail, Patterns, Gallery, and Settings.
|
|
8
|
+
- Draft-first dream capture: analyze first, then save locally when the result looks useful.
|
|
9
|
+
- Detailed interpretation reports with optional reflection prompts, multiple hypotheses, reality-grounded questions, and backward-compatible structured output.
|
|
10
|
+
- Local SQLite storage under `.dreamloop/`, automatically ignored by Git.
|
|
11
|
+
- AI providers: Ollama, DeepSeek, OpenAI, custom OpenAI-compatible endpoints, and capture-only mode.
|
|
12
|
+
- Multilingual UI and per-language AI analysis for English and Chinese.
|
|
13
|
+
- Clickable pattern calendar, symbol trends, theme trends, local gallery cards, and detail pages.
|
|
14
|
+
- CLI entry point: `dreamloop init`, `dreamloop add`, `dreamloop web`, AI provider commands, imports, weather sync, and export.
|
|
15
|
+
- English and Chinese README files with privacy-first positioning and Obsidian-oriented roadmap.
|
|
16
|
+
|
|
17
|
+
Release assets:
|
|
18
|
+
|
|
19
|
+
- Real dashboard screenshot in `docs/assets/dashboard-screenshot.png`.
|
|
20
|
+
- Social preview image in `docs/assets/social-preview.png`.
|
|
21
|
+
- Reproducible demo recording guide in `docs/demo-recording.md`.
|
dreamloop-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DreamLoop contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dreamloop-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dreamloop
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A local-first AI dream journal for people who want to notice patterns in their dreams.
|
|
5
|
+
Project-URL: Homepage, https://github.com/saime428/DreamLoop
|
|
6
|
+
Project-URL: Repository, https://github.com/saime428/DreamLoop
|
|
7
|
+
Project-URL: Issues, https://github.com/saime428/DreamLoop/issues
|
|
8
|
+
Author: DreamLoop contributors
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: fastapi>=0.115
|
|
13
|
+
Requires-Dist: httpx>=0.27
|
|
14
|
+
Requires-Dist: jinja2>=3.1
|
|
15
|
+
Requires-Dist: openai>=1.50
|
|
16
|
+
Requires-Dist: python-multipart>=0.0.9
|
|
17
|
+
Requires-Dist: typer>=0.12
|
|
18
|
+
Requires-Dist: uvicorn>=0.30
|
|
19
|
+
Provides-Extra: ai
|
|
20
|
+
Requires-Dist: chromadb>=0.5; extra == 'ai'
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
23
|
+
Requires-Dist: pytest>=8.3; extra == 'dev'
|
|
24
|
+
Requires-Dist: twine>=5.1; extra == 'dev'
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# DreamLoop
|
|
28
|
+
|
|
29
|
+
[English](README.md) | [中文](README.zh-CN.md)
|
|
30
|
+
|
|
31
|
+
[](https://github.com/saime428/DreamLoop/actions/workflows/ci.yml)
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
**Your dreams have patterns. DreamLoop finds them locally.**
|
|
36
|
+
|
|
37
|
+
- Runs fully local. Your data never leaves your machine.
|
|
38
|
+
- Free with Ollama. Optional DeepSeek/OpenAI or custom OpenAI-compatible endpoints.
|
|
39
|
+
- CLI-first, forkable, and built for Obsidian-minded knowledge workers.
|
|
40
|
+
- Detailed dream analysis that favors emotions, real-life context, and multiple verifiable interpretations.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git clone https://github.com/saime428/DreamLoop.git
|
|
44
|
+
cd DreamLoop
|
|
45
|
+
uv sync --extra dev
|
|
46
|
+
uv run dreamloop init
|
|
47
|
+
uv run dreamloop web
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
DreamLoop is a local-first dream journal for people who want fast capture, private storage, and pattern discovery without renting their inner life to another subscription app. The web app follows a six-page loop: Dashboard -> Log -> Detail -> Patterns -> Gallery -> Settings.
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
### Run locally without AI
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git clone https://github.com/saime428/DreamLoop.git
|
|
58
|
+
cd DreamLoop
|
|
59
|
+
uv sync --extra dev
|
|
60
|
+
uv run dreamloop init
|
|
61
|
+
uv run dreamloop add "I found a blue door under the sea."
|
|
62
|
+
uv run dreamloop web
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Expected result:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
DreamLoop stores the entry in .dreamloop/dreamloop.sqlite3.
|
|
69
|
+
The local dashboard starts at http://127.0.0.1:8765.
|
|
70
|
+
AI analysis stays pending until you configure a provider.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Enable local Ollama analysis
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
ollama pull qwen3:8b
|
|
77
|
+
uv run dreamloop ai use ollama --model qwen3:8b
|
|
78
|
+
uv run dreamloop ai test
|
|
79
|
+
uv run dreamloop analyze --pending
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Expected result:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
Ollama is used through http://localhost:11434/v1.
|
|
86
|
+
DreamLoop writes structured analysis back to local SQLite.
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Why This Project
|
|
90
|
+
|
|
91
|
+
Commercial dream apps usually make you pay for analysis and push personal text into a cloud workflow. DreamLoop takes the opposite path: the journal is local, the CLI is the primary interface, and AI is a swappable layer.
|
|
92
|
+
|
|
93
|
+
The default path is zero-cost Ollama. DeepSeek, OpenAI, and custom OpenAI-compatible endpoints are optional for people who want stronger hosted models or their own local gateway. The code is small enough to fork and direct enough to extend.
|
|
94
|
+
|
|
95
|
+
## Demo Assets
|
|
96
|
+
|
|
97
|
+
- Real dashboard screenshot: `docs/assets/dashboard-screenshot.png`
|
|
98
|
+
- Social preview image: `docs/assets/social-preview.png`
|
|
99
|
+
- Reproducible recording guide: `docs/demo-recording.md`
|
|
100
|
+
|
|
101
|
+
The recording guide covers CLI capture, the Dashboard -> Log -> Detail flow, Patterns filtering, Gallery, and Settings without exposing secrets.
|
|
102
|
+
|
|
103
|
+
## CLI Demo
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
$ uv run dreamloop add "A door opened under the sea."
|
|
107
|
+
saved locally -> .dreamloop/dreamloop.sqlite3
|
|
108
|
+
analysis -> pending
|
|
109
|
+
|
|
110
|
+
$ uv run dreamloop ai use ollama --model qwen3:8b
|
|
111
|
+
AI provider set to ollama (qwen3:8b).
|
|
112
|
+
|
|
113
|
+
$ uv run dreamloop analyze --pending
|
|
114
|
+
Analyzed pending dreams when a provider is ready.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Privacy Promise
|
|
118
|
+
|
|
119
|
+
- Dream entries are stored in `.dreamloop/dreamloop.sqlite3`.
|
|
120
|
+
- `.dreamloop/` is automatically ignored by Git.
|
|
121
|
+
- Your dreams are never uploaded by default.
|
|
122
|
+
- Ollama keeps analysis local on your machine.
|
|
123
|
+
- DeepSeek/OpenAI only run after explicit configuration.
|
|
124
|
+
- API keys live in `.dreamloop/secrets.env`; secrets do not belong in commits.
|
|
125
|
+
|
|
126
|
+
## AI Providers
|
|
127
|
+
|
|
128
|
+
DreamLoop supports provider configuration without changing the journal model:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
uv run dreamloop ai status
|
|
132
|
+
uv run dreamloop ai use ollama --model qwen3:8b
|
|
133
|
+
uv run dreamloop ai use deepseek --model deepseek-v4-flash
|
|
134
|
+
uv run dreamloop ai use custom --model local-model --base-url http://localhost:1234/v1
|
|
135
|
+
uv run dreamloop ai test
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Provider defaults:
|
|
139
|
+
|
|
140
|
+
- `ollama`: local, `http://localhost:11434/v1`, model `qwen3:8b`
|
|
141
|
+
- `deepseek`: cloud, `https://api.deepseek.com`, model `deepseek-v4-flash`
|
|
142
|
+
- `openai`: cloud, OpenAI-compatible JSON analysis
|
|
143
|
+
- `custom`: any OpenAI-compatible `/v1` endpoint, including local gateways
|
|
144
|
+
- `none`: capture-only local journal mode
|
|
145
|
+
|
|
146
|
+
## Web App Loop
|
|
147
|
+
|
|
148
|
+
The FastAPI/Jinja dashboard is intentionally lightweight:
|
|
149
|
+
|
|
150
|
+
- Dashboard: README-ready overview with AI Insight, heatmap, stats, and recent dreams
|
|
151
|
+
- Log: draft-first dream capture, optional reflection prompts, and AI analysis before saving
|
|
152
|
+
- Detail: original dream text, detailed interpretation, reality-grounded questions, raw JSON, and an opt-in visual-memory entry point
|
|
153
|
+
- Patterns: clickable calendar, recurring symbols, theme trends, and filters back into Log
|
|
154
|
+
- Gallery: v0.1 local visual cards derived from saved dreams; image generation remains opt-in
|
|
155
|
+
- Settings: provider selection, launch notes, local data directory, and privacy status
|
|
156
|
+
|
|
157
|
+
DreamLoop is currently launched with `uv run dreamloop web` from a checkout or `dreamloop web` after package install. A native desktop app is a later packaging task; v0.1 stays lightweight so the local-first core remains easy to inspect and fork.
|
|
158
|
+
|
|
159
|
+
The same app exposes JSON endpoints:
|
|
160
|
+
|
|
161
|
+
- `POST /api/dreams`
|
|
162
|
+
- `GET /api/dreams`
|
|
163
|
+
- `GET /api/dreams/{id}`
|
|
164
|
+
- `GET /api/dreams/{id}/similar`
|
|
165
|
+
- `POST /api/analyze/pending`
|
|
166
|
+
- `POST /api/import/ics`
|
|
167
|
+
- `POST /api/weather/sync`
|
|
168
|
+
- `GET /api/insights/heatmap`
|
|
169
|
+
- `GET /api/insights/trends`
|
|
170
|
+
|
|
171
|
+
## Local Data Model
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
.dreamloop/
|
|
175
|
+
dreamloop.sqlite3
|
|
176
|
+
config.json
|
|
177
|
+
secrets.env
|
|
178
|
+
chroma/
|
|
179
|
+
exports/
|
|
180
|
+
imports/
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
SQLite stores dreams, analysis results, imported calendar events, and synced weather. ChromaDB remains optional for richer vector search.
|
|
184
|
+
|
|
185
|
+
## PyPI Release Install
|
|
186
|
+
|
|
187
|
+
After the v0.1.0 package is published, install it with:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
pipx install dreamloop
|
|
191
|
+
dreamloop init
|
|
192
|
+
dreamloop add "I was flying above a dark ocean."
|
|
193
|
+
dreamloop web
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Obsidian Roadmap
|
|
197
|
+
|
|
198
|
+
- v0.2: Markdown export for dream entries and analysis summaries.
|
|
199
|
+
- v0.3: Obsidian vault sync with stable frontmatter.
|
|
200
|
+
- v0.4: Community plugin for capture, backlinks, and local dashboard launch.
|
|
201
|
+
|
|
202
|
+
## Roadmap
|
|
203
|
+
|
|
204
|
+
### v0.1
|
|
205
|
+
|
|
206
|
+
- Local CLI and six-page Web loop.
|
|
207
|
+
- SQLite storage.
|
|
208
|
+
- Ollama-first provider settings.
|
|
209
|
+
- Optional DeepSeek/OpenAI/custom structured analysis.
|
|
210
|
+
- Optional reflection prompts and longer reality-grounded interpretation reports.
|
|
211
|
+
- Heatmap, `.ics` import, weather sync.
|
|
212
|
+
- Similar dreams and basic trends.
|
|
213
|
+
- Real screenshot assets, CI, changelog, and public release packaging.
|
|
214
|
+
|
|
215
|
+
### v0.2
|
|
216
|
+
|
|
217
|
+
- Markdown export.
|
|
218
|
+
- CLI GIF/cast release assets.
|
|
219
|
+
- ChromaDB-backed clustering and recurring-theme insights.
|
|
220
|
+
- Backup and restore flows.
|
|
221
|
+
|
|
222
|
+
### v0.3+
|
|
223
|
+
|
|
224
|
+
- Obsidian vault sync.
|
|
225
|
+
- Obsidian community plugin.
|
|
226
|
+
- Generated dream illustrations stored locally as opt-in artifacts.
|
|
227
|
+
|
|
228
|
+
## Contributing
|
|
229
|
+
|
|
230
|
+
DreamLoop is deliberately small and forkable. Good first contributions:
|
|
231
|
+
|
|
232
|
+
- improve local model prompts
|
|
233
|
+
- add `.ics` fixtures
|
|
234
|
+
- polish dashboard accessibility
|
|
235
|
+
- expand Markdown/Obsidian export
|
|
236
|
+
- add terminal demo assets
|
|
237
|
+
|
|
238
|
+
Run tests with:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
uv run --extra dev pytest
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Build the package with:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
uv build
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## License
|
|
251
|
+
|
|
252
|
+
MIT
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# DreamLoop
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
[](https://github.com/saime428/DreamLoop/actions/workflows/ci.yml)
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
**Your dreams have patterns. DreamLoop finds them locally.**
|
|
10
|
+
|
|
11
|
+
- Runs fully local. Your data never leaves your machine.
|
|
12
|
+
- Free with Ollama. Optional DeepSeek/OpenAI or custom OpenAI-compatible endpoints.
|
|
13
|
+
- CLI-first, forkable, and built for Obsidian-minded knowledge workers.
|
|
14
|
+
- Detailed dream analysis that favors emotions, real-life context, and multiple verifiable interpretations.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
git clone https://github.com/saime428/DreamLoop.git
|
|
18
|
+
cd DreamLoop
|
|
19
|
+
uv sync --extra dev
|
|
20
|
+
uv run dreamloop init
|
|
21
|
+
uv run dreamloop web
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
DreamLoop is a local-first dream journal for people who want fast capture, private storage, and pattern discovery without renting their inner life to another subscription app. The web app follows a six-page loop: Dashboard -> Log -> Detail -> Patterns -> Gallery -> Settings.
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
### Run locally without AI
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git clone https://github.com/saime428/DreamLoop.git
|
|
32
|
+
cd DreamLoop
|
|
33
|
+
uv sync --extra dev
|
|
34
|
+
uv run dreamloop init
|
|
35
|
+
uv run dreamloop add "I found a blue door under the sea."
|
|
36
|
+
uv run dreamloop web
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Expected result:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
DreamLoop stores the entry in .dreamloop/dreamloop.sqlite3.
|
|
43
|
+
The local dashboard starts at http://127.0.0.1:8765.
|
|
44
|
+
AI analysis stays pending until you configure a provider.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Enable local Ollama analysis
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
ollama pull qwen3:8b
|
|
51
|
+
uv run dreamloop ai use ollama --model qwen3:8b
|
|
52
|
+
uv run dreamloop ai test
|
|
53
|
+
uv run dreamloop analyze --pending
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Expected result:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
Ollama is used through http://localhost:11434/v1.
|
|
60
|
+
DreamLoop writes structured analysis back to local SQLite.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Why This Project
|
|
64
|
+
|
|
65
|
+
Commercial dream apps usually make you pay for analysis and push personal text into a cloud workflow. DreamLoop takes the opposite path: the journal is local, the CLI is the primary interface, and AI is a swappable layer.
|
|
66
|
+
|
|
67
|
+
The default path is zero-cost Ollama. DeepSeek, OpenAI, and custom OpenAI-compatible endpoints are optional for people who want stronger hosted models or their own local gateway. The code is small enough to fork and direct enough to extend.
|
|
68
|
+
|
|
69
|
+
## Demo Assets
|
|
70
|
+
|
|
71
|
+
- Real dashboard screenshot: `docs/assets/dashboard-screenshot.png`
|
|
72
|
+
- Social preview image: `docs/assets/social-preview.png`
|
|
73
|
+
- Reproducible recording guide: `docs/demo-recording.md`
|
|
74
|
+
|
|
75
|
+
The recording guide covers CLI capture, the Dashboard -> Log -> Detail flow, Patterns filtering, Gallery, and Settings without exposing secrets.
|
|
76
|
+
|
|
77
|
+
## CLI Demo
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
$ uv run dreamloop add "A door opened under the sea."
|
|
81
|
+
saved locally -> .dreamloop/dreamloop.sqlite3
|
|
82
|
+
analysis -> pending
|
|
83
|
+
|
|
84
|
+
$ uv run dreamloop ai use ollama --model qwen3:8b
|
|
85
|
+
AI provider set to ollama (qwen3:8b).
|
|
86
|
+
|
|
87
|
+
$ uv run dreamloop analyze --pending
|
|
88
|
+
Analyzed pending dreams when a provider is ready.
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Privacy Promise
|
|
92
|
+
|
|
93
|
+
- Dream entries are stored in `.dreamloop/dreamloop.sqlite3`.
|
|
94
|
+
- `.dreamloop/` is automatically ignored by Git.
|
|
95
|
+
- Your dreams are never uploaded by default.
|
|
96
|
+
- Ollama keeps analysis local on your machine.
|
|
97
|
+
- DeepSeek/OpenAI only run after explicit configuration.
|
|
98
|
+
- API keys live in `.dreamloop/secrets.env`; secrets do not belong in commits.
|
|
99
|
+
|
|
100
|
+
## AI Providers
|
|
101
|
+
|
|
102
|
+
DreamLoop supports provider configuration without changing the journal model:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
uv run dreamloop ai status
|
|
106
|
+
uv run dreamloop ai use ollama --model qwen3:8b
|
|
107
|
+
uv run dreamloop ai use deepseek --model deepseek-v4-flash
|
|
108
|
+
uv run dreamloop ai use custom --model local-model --base-url http://localhost:1234/v1
|
|
109
|
+
uv run dreamloop ai test
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Provider defaults:
|
|
113
|
+
|
|
114
|
+
- `ollama`: local, `http://localhost:11434/v1`, model `qwen3:8b`
|
|
115
|
+
- `deepseek`: cloud, `https://api.deepseek.com`, model `deepseek-v4-flash`
|
|
116
|
+
- `openai`: cloud, OpenAI-compatible JSON analysis
|
|
117
|
+
- `custom`: any OpenAI-compatible `/v1` endpoint, including local gateways
|
|
118
|
+
- `none`: capture-only local journal mode
|
|
119
|
+
|
|
120
|
+
## Web App Loop
|
|
121
|
+
|
|
122
|
+
The FastAPI/Jinja dashboard is intentionally lightweight:
|
|
123
|
+
|
|
124
|
+
- Dashboard: README-ready overview with AI Insight, heatmap, stats, and recent dreams
|
|
125
|
+
- Log: draft-first dream capture, optional reflection prompts, and AI analysis before saving
|
|
126
|
+
- Detail: original dream text, detailed interpretation, reality-grounded questions, raw JSON, and an opt-in visual-memory entry point
|
|
127
|
+
- Patterns: clickable calendar, recurring symbols, theme trends, and filters back into Log
|
|
128
|
+
- Gallery: v0.1 local visual cards derived from saved dreams; image generation remains opt-in
|
|
129
|
+
- Settings: provider selection, launch notes, local data directory, and privacy status
|
|
130
|
+
|
|
131
|
+
DreamLoop is currently launched with `uv run dreamloop web` from a checkout or `dreamloop web` after package install. A native desktop app is a later packaging task; v0.1 stays lightweight so the local-first core remains easy to inspect and fork.
|
|
132
|
+
|
|
133
|
+
The same app exposes JSON endpoints:
|
|
134
|
+
|
|
135
|
+
- `POST /api/dreams`
|
|
136
|
+
- `GET /api/dreams`
|
|
137
|
+
- `GET /api/dreams/{id}`
|
|
138
|
+
- `GET /api/dreams/{id}/similar`
|
|
139
|
+
- `POST /api/analyze/pending`
|
|
140
|
+
- `POST /api/import/ics`
|
|
141
|
+
- `POST /api/weather/sync`
|
|
142
|
+
- `GET /api/insights/heatmap`
|
|
143
|
+
- `GET /api/insights/trends`
|
|
144
|
+
|
|
145
|
+
## Local Data Model
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
.dreamloop/
|
|
149
|
+
dreamloop.sqlite3
|
|
150
|
+
config.json
|
|
151
|
+
secrets.env
|
|
152
|
+
chroma/
|
|
153
|
+
exports/
|
|
154
|
+
imports/
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
SQLite stores dreams, analysis results, imported calendar events, and synced weather. ChromaDB remains optional for richer vector search.
|
|
158
|
+
|
|
159
|
+
## PyPI Release Install
|
|
160
|
+
|
|
161
|
+
After the v0.1.0 package is published, install it with:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
pipx install dreamloop
|
|
165
|
+
dreamloop init
|
|
166
|
+
dreamloop add "I was flying above a dark ocean."
|
|
167
|
+
dreamloop web
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Obsidian Roadmap
|
|
171
|
+
|
|
172
|
+
- v0.2: Markdown export for dream entries and analysis summaries.
|
|
173
|
+
- v0.3: Obsidian vault sync with stable frontmatter.
|
|
174
|
+
- v0.4: Community plugin for capture, backlinks, and local dashboard launch.
|
|
175
|
+
|
|
176
|
+
## Roadmap
|
|
177
|
+
|
|
178
|
+
### v0.1
|
|
179
|
+
|
|
180
|
+
- Local CLI and six-page Web loop.
|
|
181
|
+
- SQLite storage.
|
|
182
|
+
- Ollama-first provider settings.
|
|
183
|
+
- Optional DeepSeek/OpenAI/custom structured analysis.
|
|
184
|
+
- Optional reflection prompts and longer reality-grounded interpretation reports.
|
|
185
|
+
- Heatmap, `.ics` import, weather sync.
|
|
186
|
+
- Similar dreams and basic trends.
|
|
187
|
+
- Real screenshot assets, CI, changelog, and public release packaging.
|
|
188
|
+
|
|
189
|
+
### v0.2
|
|
190
|
+
|
|
191
|
+
- Markdown export.
|
|
192
|
+
- CLI GIF/cast release assets.
|
|
193
|
+
- ChromaDB-backed clustering and recurring-theme insights.
|
|
194
|
+
- Backup and restore flows.
|
|
195
|
+
|
|
196
|
+
### v0.3+
|
|
197
|
+
|
|
198
|
+
- Obsidian vault sync.
|
|
199
|
+
- Obsidian community plugin.
|
|
200
|
+
- Generated dream illustrations stored locally as opt-in artifacts.
|
|
201
|
+
|
|
202
|
+
## Contributing
|
|
203
|
+
|
|
204
|
+
DreamLoop is deliberately small and forkable. Good first contributions:
|
|
205
|
+
|
|
206
|
+
- improve local model prompts
|
|
207
|
+
- add `.ics` fixtures
|
|
208
|
+
- polish dashboard accessibility
|
|
209
|
+
- expand Markdown/Obsidian export
|
|
210
|
+
- add terminal demo assets
|
|
211
|
+
|
|
212
|
+
Run tests with:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
uv run --extra dev pytest
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Build the package with:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
uv build
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## License
|
|
225
|
+
|
|
226
|
+
MIT
|