claude-prmem 1.0.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 +21 -0
- package/README.md +143 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +2334 -0
- package/dist/cli.js.map +1 -0
- package/dist/web/dist/assets/index-DqPlDf52.js +8 -0
- package/dist/web/dist/index.html +18 -0
- package/package.json +85 -0
- package/templates/.mcp.json +8 -0
- package/templates/prmem/package.json +15 -0
- package/templates/prmem/schema.sql +30 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Daniel Gatis
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<br />
|
|
3
|
+
<br />
|
|
4
|
+
<br />
|
|
5
|
+
<br />
|
|
6
|
+
<img src="logo.png" alt="prmem" />
|
|
7
|
+
<br />
|
|
8
|
+
<br />
|
|
9
|
+
<p>
|
|
10
|
+
Semantic memory for Claude Code - indexes merged PRs with AI summaries and embeddings
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<br />
|
|
15
|
+
<br />
|
|
16
|
+
|
|
17
|
+
<hr />
|
|
18
|
+
|
|
19
|
+
### What?
|
|
20
|
+
|
|
21
|
+
Semantic memory for Claude Code. Automatically indexes your merged Pull Requests with AI-generated summaries and injects relevant context when you need it most.
|
|
22
|
+
|
|
23
|
+
### Why?
|
|
24
|
+
|
|
25
|
+
It's 2 a.m.
|
|
26
|
+
You're fixing a bug you swear you already solved weeks ago.
|
|
27
|
+
|
|
28
|
+
You ask Claude:
|
|
29
|
+
"How did we handle that token refresh race condition again?"
|
|
30
|
+
|
|
31
|
+
Claude has no memory.
|
|
32
|
+
|
|
33
|
+
### How?
|
|
34
|
+
|
|
35
|
+
1. Run `prmem sync` to index your merged PRs:
|
|
36
|
+
- Fetches PR data from GitHub (title, description, commits, files)
|
|
37
|
+
- Creates smart AI summaries of what changed and why
|
|
38
|
+
- Generates semantic embeddings for search
|
|
39
|
+
|
|
40
|
+
2. All that knowledge is saved in your repo's `.prmem/` directory.
|
|
41
|
+
|
|
42
|
+
3. Claude Code automatically searches your history via MCP when it needs context.
|
|
43
|
+
|
|
44
|
+
### Quick Start
|
|
45
|
+
|
|
46
|
+
**Prerequisites:**
|
|
47
|
+
- Node.js 18+
|
|
48
|
+
- GitHub CLI installed and authenticated: `gh auth login`
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install -g claude-prmem
|
|
52
|
+
cd your-project
|
|
53
|
+
prmem install
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
That's it. Claude Code now has memory of your project's PR history.
|
|
57
|
+
|
|
58
|
+
### Commands
|
|
59
|
+
|
|
60
|
+
| Command | Description |
|
|
61
|
+
|---------|-------------|
|
|
62
|
+
| `prmem install` | Set up prmem in current repo (creates `.prmem/`, configures MCP) |
|
|
63
|
+
| `prmem uninstall` | Remove prmem from repo. Use `-f` to skip confirmation |
|
|
64
|
+
| `prmem sync` | Index merged PRs from GitHub |
|
|
65
|
+
| `prmem add <number>` | Add a specific PR to memory |
|
|
66
|
+
| `prmem delete <number>` | Remove a PR from memory |
|
|
67
|
+
| `prmem search <query>` | Search indexed PRs semantically |
|
|
68
|
+
| `prmem status` | Show indexing stats |
|
|
69
|
+
| `prmem ui` | Open web UI for memory management |
|
|
70
|
+
| `prmem doctor` | Check if all dependencies are installed and configured |
|
|
71
|
+
|
|
72
|
+
**Sync Options:**
|
|
73
|
+
```bash
|
|
74
|
+
prmem sync --since 2024-01-01 # Only PRs merged after this date
|
|
75
|
+
prmem sync --limit 100 # Maximum PRs to sync (default: 50)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**UI Options:**
|
|
79
|
+
```bash
|
|
80
|
+
prmem ui --port 8080 # Custom port (default: 3333)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Claude Code Integration
|
|
84
|
+
|
|
85
|
+
After installing prmem, Claude Code gains access to your project's memory through MCP tools.
|
|
86
|
+
|
|
87
|
+
#### Smart Search Strategy
|
|
88
|
+
|
|
89
|
+
When you ask about past work, Claude automatically follows this strategy:
|
|
90
|
+
|
|
91
|
+
1. **Search indexed memory** using `prmem_search`
|
|
92
|
+
2. **Evaluate results** - if similarity >= 80%, use them
|
|
93
|
+
3. **Fallback to GitHub** - if no good results, search GitHub with `prmem_gh_search`
|
|
94
|
+
4. **Index and retry** - add relevant unindexed PRs, then search again
|
|
95
|
+
|
|
96
|
+
#### Available MCP Tools
|
|
97
|
+
|
|
98
|
+
| Tool | Description |
|
|
99
|
+
|------|-------------|
|
|
100
|
+
| `prmem_search` | Semantic search of indexed PRs (returns similarity scores 0-100%) |
|
|
101
|
+
| `prmem_gh_search` | Search GitHub for merged PRs (fallback when indexed results are insufficient) |
|
|
102
|
+
| `prmem_status` | Check memory state: PR count, commits, files, last sync |
|
|
103
|
+
| `prmem_sync` | Sync recent PRs into memory |
|
|
104
|
+
| `prmem_add` | Index a specific PR by number |
|
|
105
|
+
| `prmem_delete` | Remove a PR from memory |
|
|
106
|
+
| `prmem_pr_commits` | Get commits for an indexed PR (paginated) |
|
|
107
|
+
| `prmem_pr_files` | Get changed files for an indexed PR (paginated) |
|
|
108
|
+
| `prmem_doctor` | Check if dependencies are installed and configured correctly |
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
### Web UI
|
|
112
|
+
|
|
113
|
+
Start the web interface to manage your indexed PRs:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
prmem ui
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### How It Works
|
|
120
|
+
|
|
121
|
+
**Summaries**
|
|
122
|
+
Uses your Claude Code CLI to generate intelligent summaries of each PR. No API key needed - it uses your existing Claude Code authentication.
|
|
123
|
+
|
|
124
|
+
**Embeddings**
|
|
125
|
+
Runs HuggingFace's `multilingual-e5-base` model locally for semantic embeddings. Downloads automatically on first sync (~400MB).
|
|
126
|
+
|
|
127
|
+
**Storage**
|
|
128
|
+
SQLite database stored in `.prmem/prmem.db`. Includes:
|
|
129
|
+
- PR metadata (title, link, merge date)
|
|
130
|
+
- AI-generated summaries
|
|
131
|
+
- Semantic embeddings
|
|
132
|
+
- Commit history
|
|
133
|
+
- Changed files
|
|
134
|
+
|
|
135
|
+
## Buy me a coffee
|
|
136
|
+
|
|
137
|
+
If you find this project useful, consider buying me a coffee!
|
|
138
|
+
|
|
139
|
+
[](https://www.buymeacoffee.com/danielgatis)
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
MIT License - see [LICENSE](./LICENSE) file.
|
package/dist/cli.d.ts
ADDED