@franshjy/dbrief 0.1.0
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.
- package/LICENSE +661 -0
- package/README.md +138 -0
- package/dist/index.cjs +802 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +786 -0
- package/package.json +45 -0
- package/skills/dbrief-note/SKILL.md +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Dbrief
|
|
2
|
+
|
|
3
|
+
Dbrief extracts daily session activity into artifacts for generating Markdown daily notes.
|
|
4
|
+
Currently only support Codex, with Opencode and Claude Code support on the way.
|
|
5
|
+
|
|
6
|
+
## How does Dbrief work?
|
|
7
|
+
|
|
8
|
+
Dbrief obtains your sessions from your coding agents' respective directories and extracts logs based on the selected date.
|
|
9
|
+
You can install the skill to the agent of your choice, and you can either:
|
|
10
|
+
- Edit the skill to modify the location, writing style, or note layout
|
|
11
|
+
- Or just use it directly with the default layout.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @franshjy/dbrief
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
cd ~/your-project
|
|
23
|
+
dbrief install # Install dbrief-note skill
|
|
24
|
+
dbrief extract # Extract today's sessions
|
|
25
|
+
codex "Generate my daily note from dbrief_2026-06-04.json"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The CLI produces the JSON artifact. Codex uses the installed skill to turn that artifact into a portable Markdown note with `Summary`, `Projects`, and `Other` sections.
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
### extract
|
|
33
|
+
|
|
34
|
+
Extract session data for a date or date range.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
dbrief extract # Today -> ./dbrief_YYYY-MM-DD.json
|
|
38
|
+
dbrief extract --date 2026-06-01 # Specific date -> ./dbrief_2026-06-01.json
|
|
39
|
+
dbrief extract --from 2026-05-01 # From date to today
|
|
40
|
+
dbrief extract --to 2026-06-01 # From earliest to date
|
|
41
|
+
dbrief extract --from 2026-05-01 --to 2026-06-01 # Date range -> current directory by default
|
|
42
|
+
dbrief extract --out ./output.json # Custom output path
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Options:**
|
|
46
|
+
- `--date <date>`: Target date (today, yesterday, or YYYY-MM-DD)
|
|
47
|
+
- `--from <date>`: Start date for range extraction
|
|
48
|
+
- `--to <date>`: End date for range extraction
|
|
49
|
+
- `--out <path>`: Output file (single day) or directory (range)
|
|
50
|
+
- `--codex-dir <path>`: Codex data directory (default: ~/.codex)
|
|
51
|
+
|
|
52
|
+
### install
|
|
53
|
+
|
|
54
|
+
Install the dbrief-note skill to `.codex/skills/dbrief-note/` in the current directory. The skill currently writes Markdown only and is currently only installed on Codex, though you can manually install the skill on any coding agent you want.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
dbrief install
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### inspect
|
|
61
|
+
|
|
62
|
+
Inspect a generated artifact. Defaults to pretty-printed JSON. Use `--format summary` for a compact overview.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
dbrief inspect --input ./dbrief_2026-06-04.json
|
|
66
|
+
dbrief inspect --input ./dbrief_2026-06-04.json --format summary
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**`--format summary`** prints a compact breakdown: date, timezone, and per-project thread/message/context counts.
|
|
70
|
+
|
|
71
|
+
**Options:**
|
|
72
|
+
- `--input <path>`: Input artifact file (required)
|
|
73
|
+
- `--format summary`: Print a compact summary instead of full JSON
|
|
74
|
+
|
|
75
|
+
## Artifact Schema
|
|
76
|
+
|
|
77
|
+
Output is minified JSON. Messages are tuples of `["u"|"a", content_string]`.
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"date": "2026-06-04",
|
|
82
|
+
"timezone": "Asia/Bangkok",
|
|
83
|
+
"projects": [
|
|
84
|
+
{
|
|
85
|
+
"project_key": "C:/dev/projects/codex-trails",
|
|
86
|
+
"threads": [
|
|
87
|
+
{
|
|
88
|
+
"title": "How does codex store compressed context?",
|
|
89
|
+
"branch": "master",
|
|
90
|
+
"context": [],
|
|
91
|
+
"messages": [
|
|
92
|
+
["u", "How does codex store compacted context?"],
|
|
93
|
+
["a", "Three compaction paths exist: local, remote v1, remote v2..."],
|
|
94
|
+
["u", "Can I extract the summary from JSONL?"],
|
|
95
|
+
["a", "Only `replacement_history` is persisted. The summary is ephemeral."]
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Extraction modes:**
|
|
105
|
+
- **Full** (no compaction): `context` = `[]`, `messages` = all messages
|
|
106
|
+
- **Hybrid** (compacted): `context` = replacement_history, `messages` = post-compaction messages
|
|
107
|
+
|
|
108
|
+
## Note Writing Contract
|
|
109
|
+
|
|
110
|
+
The primary output of `dbrief extract` is JSON. The final daily note is generated by Codex using the installed `dbrief-note` skill.
|
|
111
|
+
|
|
112
|
+
The default Markdown structure is:
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
# {date}
|
|
116
|
+
|
|
117
|
+
## Summary
|
|
118
|
+
|
|
119
|
+
## Projects
|
|
120
|
+
|
|
121
|
+
## Other
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Dev Setup
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npm install
|
|
128
|
+
npm run build
|
|
129
|
+
npm link (to access the dbrief command)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
This project is licensed under the GNU Affero General Public License v3.0
|
|
135
|
+
(`AGPL-3.0`). See [LICENSE](./LICENSE) for the full text.
|
|
136
|
+
|
|
137
|
+
If you run a modified version of this project as a network service, AGPL
|
|
138
|
+
requires you to make the corresponding source code available to those users.
|