eagle-mem 2.0.4 → 2.0.6
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/README.md +105 -53
- package/hooks/session-start.sh +34 -0
- package/package.json +1 -1
- package/scripts/install.sh +5 -0
- package/scripts/update.sh +3 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ npm install -g eagle-mem
|
|
|
18
18
|
eagle-mem install
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
**2. Open Claude Code** in any project directory. Eagle Mem activates
|
|
21
|
+
**2. Open Claude Code** in any project directory. Eagle Mem activates and shows what it loaded:
|
|
22
22
|
|
|
23
23
|
```
|
|
24
24
|
█▀▀ ▄▀█ █▀▀ █ █▀▀ █▀▄▀█ █▀▀ █▀▄▀█
|
|
@@ -29,34 +29,116 @@ Sessions: 5 recent | Memories: 3 | Tasks: 2 pending
|
|
|
29
29
|
Last: Added auth middleware with JWT validation
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
- Session summaries captured on every Claude turn
|
|
34
|
-
- Claude's memories, plans, and tasks mirrored into Eagle Mem
|
|
35
|
-
- Full context re-injected after every `/compact`, `/clear`, or new session
|
|
36
|
-
- Past sessions searched on every prompt via FTS5
|
|
32
|
+
From here, everything is automatic. You don't run any commands — Eagle Mem captures session summaries, mirrors Claude's memories and tasks, and re-injects context after every `/compact` or new session.
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
**3. Already have Claude Code history on a project?** Run this inside the project directory:
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
```bash
|
|
37
|
+
cd ~/projects/my-app
|
|
38
|
+
eagle-mem refresh
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This backfills everything into Eagle Mem:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Eagle Mem Refresh
|
|
45
|
+
─────────────────────────────────────
|
|
46
|
+
|
|
47
|
+
Step 1/4: Scanning codebase structure...
|
|
48
|
+
✓ 120 files found
|
|
49
|
+
✓ Languages: TypeScript (15k lines), CSS (2k lines)
|
|
50
|
+
✓ Frameworks: Next.js, React, Tailwind, Prisma
|
|
51
|
+
✓ Scan complete
|
|
52
|
+
|
|
53
|
+
Step 2/4: Indexing source files...
|
|
54
|
+
✓ Index complete
|
|
55
|
+
|
|
56
|
+
Step 3/4: Syncing Claude Code memories, plans, and tasks...
|
|
57
|
+
✓ Memory sync complete
|
|
58
|
+
|
|
59
|
+
Step 4/4: Verifying...
|
|
60
|
+
Sessions: 12
|
|
61
|
+
Code chunks: 340
|
|
62
|
+
Memories: 8
|
|
63
|
+
Tasks: 15
|
|
64
|
+
```
|
|
41
65
|
|
|
42
|
-
|
|
66
|
+
Now open Claude Code in that project — it sees your full history from the start.
|
|
43
67
|
|
|
44
|
-
|
|
45
|
-
|------|-----------|
|
|
46
|
-
| Search past sessions | `eagle-mem search "auth middleware"` |
|
|
47
|
-
| See recent timeline | `eagle-mem search --timeline` |
|
|
48
|
-
| View project overview | `eagle-mem overview` |
|
|
49
|
-
| Set a custom overview | `eagle-mem overview set "..."` |
|
|
50
|
-
| Full re-sync after major changes | `eagle-mem refresh .` |
|
|
51
|
-
| Clean up old data | `eagle-mem prune` |
|
|
68
|
+
## Commands
|
|
52
69
|
|
|
53
|
-
|
|
70
|
+
Eagle Mem gives you terminal commands for when you need to look something up or manage your data outside of Claude Code.
|
|
54
71
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
72
|
+
### Search past sessions
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
eagle-mem search "auth middleware"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Searches across session summaries, Claude memories, and indexed code using FTS5. Use this when you know you worked on something last week but can't remember the details.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
eagle-mem search --timeline
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Shows your most recent sessions in chronological order — useful for catching up after a break.
|
|
85
|
+
|
|
86
|
+
### View or set your project overview
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
eagle-mem overview
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Shows the overview that gets injected into every Claude Code session. This is what Claude reads first to understand your project.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
eagle-mem overview set "My app is a Next.js dashboard for monitoring API health..."
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Set a custom overview. You can also let Claude write one for you by running `/eagle-mem-overview` inside a Claude Code session — it reads your README, entry points, and git history to synthesize one.
|
|
99
|
+
|
|
100
|
+
### Sync everything
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
eagle-mem refresh
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Run this inside a project directory after major changes (new packages, restructured directories, pulling a large branch). It re-scans the codebase, re-indexes source files, and syncs any new Claude Code memories and tasks.
|
|
107
|
+
|
|
108
|
+
### Other commands
|
|
109
|
+
|
|
110
|
+
| Command | When to use it |
|
|
111
|
+
|---------|---------------|
|
|
112
|
+
| `eagle-mem scan` | Re-analyze codebase structure (languages, frameworks, entry points) |
|
|
113
|
+
| `eagle-mem index` | Re-index source files for code search |
|
|
114
|
+
| `eagle-mem memories` | View or sync mirrored Claude Code memories and plans |
|
|
115
|
+
| `eagle-mem tasks` | View mirrored Claude Code tasks |
|
|
116
|
+
| `eagle-mem prune` | Clean up old observations and orphaned code chunks |
|
|
117
|
+
|
|
118
|
+
## Skills (inside Claude Code)
|
|
119
|
+
|
|
120
|
+
Inside a Claude Code session, you have slash commands that let Claude do the work for you:
|
|
121
|
+
|
|
122
|
+
### `/eagle-mem-search`
|
|
123
|
+
|
|
124
|
+
Search past sessions from within Claude Code. Claude interprets results and connects them to your current work — better than raw terminal search when you need context, not just a match.
|
|
125
|
+
|
|
126
|
+
### `/eagle-mem-overview`
|
|
127
|
+
|
|
128
|
+
Build a rich project briefing. Claude reads your README, entry points, recent git history, and current codebase to write a 2-3 paragraph overview that captures what the project *does*, not just its file counts. This overview is injected at every session start.
|
|
129
|
+
|
|
130
|
+
### `/eagle-mem-tasks`
|
|
131
|
+
|
|
132
|
+
Break complex work into tasks that survive `/compact`. Uses Claude Code's native `TaskCreate`/`TaskUpdate` with dependency support. When context fills up and you compact, Eagle Mem re-injects the task state so Claude picks up where it left off.
|
|
133
|
+
|
|
134
|
+
### Other skills
|
|
135
|
+
|
|
136
|
+
| Skill | What it does |
|
|
137
|
+
|-------|-------------|
|
|
138
|
+
| `/eagle-mem-scan` | Analyze codebase structure — languages, frameworks, entry points |
|
|
139
|
+
| `/eagle-mem-index` | Index source files for FTS5 code search |
|
|
140
|
+
| `/eagle-mem-memories` | View, search, and sync Claude Code's mirrored memories and plans |
|
|
141
|
+
| `/eagle-mem-prune` | Database hygiene — graduated cleanup of stale data |
|
|
60
142
|
|
|
61
143
|
## Updating
|
|
62
144
|
|
|
@@ -92,36 +174,6 @@ Data lives in a single SQLite database at `~/.eagle-mem/memory.db` (WAL mode, FT
|
|
|
92
174
|
| claude_plans | Mirror of Claude Code plans |
|
|
93
175
|
| claude_tasks | Mirror of Claude Code tasks |
|
|
94
176
|
|
|
95
|
-
## All commands
|
|
96
|
-
|
|
97
|
-
| Command | What it does |
|
|
98
|
-
|---------|-------------|
|
|
99
|
-
| `eagle-mem install` | First-time setup: hooks, database, skills |
|
|
100
|
-
| `eagle-mem update` | Re-deploy hooks and run pending migrations |
|
|
101
|
-
| `eagle-mem uninstall` | Remove hooks and optionally delete data |
|
|
102
|
-
| `eagle-mem refresh` | Full sync: scan + index + memories in one command |
|
|
103
|
-
| `eagle-mem search <query>` | FTS5 search across summaries, memories, and code |
|
|
104
|
-
| `eagle-mem overview` | View or set the project overview |
|
|
105
|
-
| `eagle-mem scan` | Analyze codebase structure |
|
|
106
|
-
| `eagle-mem index` | Index source files for code search |
|
|
107
|
-
| `eagle-mem memories` | View/sync mirrored Claude Code memories and plans |
|
|
108
|
-
| `eagle-mem tasks` | View mirrored Claude Code tasks |
|
|
109
|
-
| `eagle-mem prune` | Remove old observations and orphaned chunks |
|
|
110
|
-
|
|
111
|
-
## All skills
|
|
112
|
-
|
|
113
|
-
Seven skills available inside Claude Code sessions:
|
|
114
|
-
|
|
115
|
-
| Skill | What it does |
|
|
116
|
-
|-------|-------------|
|
|
117
|
-
| `/eagle-mem-search` | Progressive memory recall — search, expand, drill into sessions |
|
|
118
|
-
| `/eagle-mem-overview` | Build a structured project briefing from code, README, and git history |
|
|
119
|
-
| `/eagle-mem-scan` | Analyze codebase structure — languages, frameworks, entry points |
|
|
120
|
-
| `/eagle-mem-index` | Index source files for FTS5 code search across sessions |
|
|
121
|
-
| `/eagle-mem-memories` | View, search, and sync Claude Code's mirrored memories and plans |
|
|
122
|
-
| `/eagle-mem-tasks` | TaskAware Compact Loop — break work into tasks that survive compaction |
|
|
123
|
-
| `/eagle-mem-prune` | Database hygiene — graduated cleanup of stale data |
|
|
124
|
-
|
|
125
177
|
## Uninstall
|
|
126
178
|
|
|
127
179
|
```bash
|
package/hooks/session-start.sh
CHANGED
|
@@ -38,6 +38,34 @@ eagle_db "UPDATE sessions SET status = 'abandoned'
|
|
|
38
38
|
AND id != '$(eagle_sql_escape "$session_id")'
|
|
39
39
|
AND COALESCE(last_activity_at, started_at) < strftime('%Y-%m-%dT%H:%M:%fZ', 'now', '-7 days');"
|
|
40
40
|
|
|
41
|
+
# ─── Version check (non-blocking) ────────────────────────────
|
|
42
|
+
|
|
43
|
+
update_notice=""
|
|
44
|
+
version_file="$EAGLE_MEM_DIR/.version"
|
|
45
|
+
latest_file="$EAGLE_MEM_DIR/.latest-version"
|
|
46
|
+
|
|
47
|
+
if [ -f "$version_file" ] && [ -s "$version_file" ]; then
|
|
48
|
+
installed_version=$(tr -d '[:space:]' < "$version_file")
|
|
49
|
+
|
|
50
|
+
if [ -f "$latest_file" ] && [ -s "$latest_file" ]; then
|
|
51
|
+
latest_version=$(tr -d '[:space:]' < "$latest_file")
|
|
52
|
+
newest=$(printf '%s\n' "$installed_version" "$latest_version" | sort -V | tail -1)
|
|
53
|
+
if [ "$newest" != "$installed_version" ]; then
|
|
54
|
+
update_notice="Update available: v${installed_version} → v${latest_version} — run: npm update -g eagle-mem && eagle-mem update"
|
|
55
|
+
fi
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
if [ ! -f "$latest_file" ] || [ -n "$(find "$latest_file" -mtime +0 2>/dev/null)" ]; then
|
|
59
|
+
(tmp_latest=$(mktemp)
|
|
60
|
+
npm view eagle-mem version 2>/dev/null | tr -d '[:space:]' > "$tmp_latest"
|
|
61
|
+
if [ -s "$tmp_latest" ]; then
|
|
62
|
+
mv "$tmp_latest" "$latest_file"
|
|
63
|
+
else
|
|
64
|
+
rm -f "$tmp_latest"
|
|
65
|
+
fi) &
|
|
66
|
+
fi
|
|
67
|
+
fi
|
|
68
|
+
|
|
41
69
|
# ─── Build context injection ────────────────────────────────
|
|
42
70
|
|
|
43
71
|
eagle_logo="█▀▀ ▄▀█ █▀▀ █ █▀▀ █▀▄▀█ █▀▀ █▀▄▀█
|
|
@@ -50,6 +78,12 @@ Eagle Mem (https://github.com/eagleisbatman/eagle-mem) is providing persistent m
|
|
|
50
78
|
|
|
51
79
|
"
|
|
52
80
|
|
|
81
|
+
if [ -n "$update_notice" ]; then
|
|
82
|
+
context+="=== EAGLE MEM — $update_notice ===
|
|
83
|
+
|
|
84
|
+
"
|
|
85
|
+
fi
|
|
86
|
+
|
|
53
87
|
# Project overview
|
|
54
88
|
overview=$(eagle_get_overview "$project")
|
|
55
89
|
if [ -n "$overview" ]; then
|
package/package.json
CHANGED
package/scripts/install.sh
CHANGED
|
@@ -242,6 +242,11 @@ else
|
|
|
242
242
|
fi
|
|
243
243
|
fi
|
|
244
244
|
|
|
245
|
+
# ─── Save installed version ───────────────────────────────
|
|
246
|
+
|
|
247
|
+
version=$(jq -r .version "$PACKAGE_DIR/package.json" 2>/dev/null || echo "unknown")
|
|
248
|
+
echo "$version" > "$EAGLE_MEM_DIR/.version"
|
|
249
|
+
|
|
245
250
|
# ─── Summary ───────────────────────────────────────────────
|
|
246
251
|
|
|
247
252
|
eagle_footer "Eagle Mem installed successfully."
|
package/scripts/update.sh
CHANGED
|
@@ -106,7 +106,9 @@ else
|
|
|
106
106
|
eagle_ok "Project names up to date"
|
|
107
107
|
fi
|
|
108
108
|
|
|
109
|
-
# ───
|
|
109
|
+
# ─── Save installed version ───────────────────────────────
|
|
110
110
|
|
|
111
111
|
version=$(jq -r .version "$PACKAGE_DIR/package.json" 2>/dev/null || echo "unknown")
|
|
112
|
+
echo "$version" > "$EAGLE_MEM_DIR/.version"
|
|
113
|
+
|
|
112
114
|
eagle_footer "Eagle Mem updated to v${version}."
|