@rangerchaz/aimem 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 +21 -0
- package/README.md +380 -0
- package/dist/cli/commands/git.d.ts +6 -0
- package/dist/cli/commands/git.d.ts.map +1 -0
- package/dist/cli/commands/git.js +298 -0
- package/dist/cli/commands/git.js.map +1 -0
- package/dist/cli/commands/hook-session-end.d.ts +7 -0
- package/dist/cli/commands/hook-session-end.d.ts.map +1 -0
- package/dist/cli/commands/hook-session-end.js +109 -0
- package/dist/cli/commands/hook-session-end.js.map +1 -0
- package/dist/cli/commands/hook-session-start.d.ts +7 -0
- package/dist/cli/commands/hook-session-start.d.ts.map +1 -0
- package/dist/cli/commands/hook-session-start.js +116 -0
- package/dist/cli/commands/hook-session-start.js.map +1 -0
- package/dist/cli/commands/import.d.ts +14 -0
- package/dist/cli/commands/import.d.ts.map +1 -0
- package/dist/cli/commands/import.js +527 -0
- package/dist/cli/commands/import.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +32 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/mcp-serve.d.ts +2 -0
- package/dist/cli/commands/mcp-serve.d.ts.map +1 -0
- package/dist/cli/commands/mcp-serve.js +5 -0
- package/dist/cli/commands/mcp-serve.js.map +1 -0
- package/dist/cli/commands/query.d.ts +8 -0
- package/dist/cli/commands/query.d.ts.map +1 -0
- package/dist/cli/commands/query.js +83 -0
- package/dist/cli/commands/query.js.map +1 -0
- package/dist/cli/commands/setup.d.ts +10 -0
- package/dist/cli/commands/setup.d.ts.map +1 -0
- package/dist/cli/commands/setup.js +504 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/start.d.ts +8 -0
- package/dist/cli/commands/start.d.ts.map +1 -0
- package/dist/cli/commands/start.js +90 -0
- package/dist/cli/commands/start.js.map +1 -0
- package/dist/cli/commands/status.d.ts +2 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +85 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/stop.d.ts +7 -0
- package/dist/cli/commands/stop.d.ts.map +1 -0
- package/dist/cli/commands/stop.js +46 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/commands/visualize.d.ts +8 -0
- package/dist/cli/commands/visualize.d.ts.map +1 -0
- package/dist/cli/commands/visualize.js +96 -0
- package/dist/cli/commands/visualize.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +114 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/db/index.d.ts +55 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +464 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/schema.d.ts +4 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +200 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/extractor/index.d.ts +27 -0
- package/dist/extractor/index.d.ts.map +1 -0
- package/dist/extractor/index.js +227 -0
- package/dist/extractor/index.js.map +1 -0
- package/dist/git/extractor.d.ts +30 -0
- package/dist/git/extractor.d.ts.map +1 -0
- package/dist/git/extractor.js +126 -0
- package/dist/git/extractor.js.map +1 -0
- package/dist/git/hooks.d.ts +36 -0
- package/dist/git/hooks.d.ts.map +1 -0
- package/dist/git/hooks.js +142 -0
- package/dist/git/hooks.js.map +1 -0
- package/dist/git/index.d.ts +69 -0
- package/dist/git/index.d.ts.map +1 -0
- package/dist/git/index.js +250 -0
- package/dist/git/index.js.map +1 -0
- package/dist/indexer/index.d.ts +20 -0
- package/dist/indexer/index.d.ts.map +1 -0
- package/dist/indexer/index.js +173 -0
- package/dist/indexer/index.js.map +1 -0
- package/dist/indexer/parsers/base.d.ts +19 -0
- package/dist/indexer/parsers/base.d.ts.map +1 -0
- package/dist/indexer/parsers/base.js +46 -0
- package/dist/indexer/parsers/base.js.map +1 -0
- package/dist/indexer/parsers/cpp.d.ts +3 -0
- package/dist/indexer/parsers/cpp.d.ts.map +1 -0
- package/dist/indexer/parsers/cpp.js +180 -0
- package/dist/indexer/parsers/cpp.js.map +1 -0
- package/dist/indexer/parsers/go.d.ts +3 -0
- package/dist/indexer/parsers/go.d.ts.map +1 -0
- package/dist/indexer/parsers/go.js +98 -0
- package/dist/indexer/parsers/go.js.map +1 -0
- package/dist/indexer/parsers/java.d.ts +3 -0
- package/dist/indexer/parsers/java.d.ts.map +1 -0
- package/dist/indexer/parsers/java.js +204 -0
- package/dist/indexer/parsers/java.js.map +1 -0
- package/dist/indexer/parsers/javascript.d.ts +3 -0
- package/dist/indexer/parsers/javascript.d.ts.map +1 -0
- package/dist/indexer/parsers/javascript.js +157 -0
- package/dist/indexer/parsers/javascript.js.map +1 -0
- package/dist/indexer/parsers/kotlin.d.ts +3 -0
- package/dist/indexer/parsers/kotlin.d.ts.map +1 -0
- package/dist/indexer/parsers/kotlin.js +182 -0
- package/dist/indexer/parsers/kotlin.js.map +1 -0
- package/dist/indexer/parsers/php.d.ts +3 -0
- package/dist/indexer/parsers/php.d.ts.map +1 -0
- package/dist/indexer/parsers/php.js +190 -0
- package/dist/indexer/parsers/php.js.map +1 -0
- package/dist/indexer/parsers/python.d.ts +3 -0
- package/dist/indexer/parsers/python.d.ts.map +1 -0
- package/dist/indexer/parsers/python.js +101 -0
- package/dist/indexer/parsers/python.js.map +1 -0
- package/dist/indexer/parsers/ruby.d.ts +3 -0
- package/dist/indexer/parsers/ruby.d.ts.map +1 -0
- package/dist/indexer/parsers/ruby.js +92 -0
- package/dist/indexer/parsers/ruby.js.map +1 -0
- package/dist/indexer/parsers/rust.d.ts +3 -0
- package/dist/indexer/parsers/rust.d.ts.map +1 -0
- package/dist/indexer/parsers/rust.js +190 -0
- package/dist/indexer/parsers/rust.js.map +1 -0
- package/dist/indexer/watcher-daemon.d.ts +2 -0
- package/dist/indexer/watcher-daemon.d.ts.map +1 -0
- package/dist/indexer/watcher-daemon.js +27 -0
- package/dist/indexer/watcher-daemon.js.map +1 -0
- package/dist/indexer/watcher.d.ts +7 -0
- package/dist/indexer/watcher.d.ts.map +1 -0
- package/dist/indexer/watcher.js +77 -0
- package/dist/indexer/watcher.js.map +1 -0
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +241 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/proxy/interceptor-mockttp.d.ts +27 -0
- package/dist/proxy/interceptor-mockttp.d.ts.map +1 -0
- package/dist/proxy/interceptor-mockttp.js +274 -0
- package/dist/proxy/interceptor-mockttp.js.map +1 -0
- package/dist/proxy/proxy-daemon.d.ts +5 -0
- package/dist/proxy/proxy-daemon.d.ts.map +1 -0
- package/dist/proxy/proxy-daemon.js +26 -0
- package/dist/proxy/proxy-daemon.js.map +1 -0
- package/dist/query/index.d.ts +32 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +135 -0
- package/dist/query/index.js.map +1 -0
- package/dist/types/index.d.ts +89 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/visualize/index.d.ts +144 -0
- package/dist/visualize/index.d.ts.map +1 -0
- package/dist/visualize/index.js +707 -0
- package/dist/visualize/index.js.map +1 -0
- package/dist/visualize/server.d.ts +7 -0
- package/dist/visualize/server.d.ts.map +1 -0
- package/dist/visualize/server.js +77 -0
- package/dist/visualize/server.js.map +1 -0
- package/dist/visualize/template.d.ts +3 -0
- package/dist/visualize/template.d.ts.map +1 -0
- package/dist/visualize/template.js +3465 -0
- package/dist/visualize/template.js.map +1 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Chad Cox
|
|
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,380 @@
|
|
|
1
|
+
# aimem
|
|
2
|
+
|
|
3
|
+
**Your AI assistant finally remembers.**
|
|
4
|
+
|
|
5
|
+
Every session starts fresh—decisions forgotten, context lost, explanations repeated.
|
|
6
|
+
|
|
7
|
+
aimem fixes this:
|
|
8
|
+
|
|
9
|
+
- Captures LLM conversations via local proxy
|
|
10
|
+
- Extracts decisions automatically
|
|
11
|
+
- Indexes your codebase
|
|
12
|
+
- Searchable via MCP tools or CLI
|
|
13
|
+
|
|
14
|
+
*"Why did we choose Redis?"* → Get the answer from last week's chat.
|
|
15
|
+
|
|
16
|
+
No cloud. No accounts. Everything stays on your machine.
|
|
17
|
+
|
|
18
|
+
## v2.0 - Lean Architecture
|
|
19
|
+
|
|
20
|
+
- **Pure Node.js** - No Python dependencies (mockttp proxy)
|
|
21
|
+
- **Capture-only** - No injection, uses CLAUDE.md for instructions
|
|
22
|
+
- **3 MCP tools** - ~150 tokens overhead
|
|
23
|
+
- **Git integration** - Link decisions to commits
|
|
24
|
+
|
|
25
|
+
## Architecture
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
29
|
+
│ Your AI Tool │
|
|
30
|
+
│ (Claude Code, Cursor, etc.) │
|
|
31
|
+
└──────────────────────────┬──────────────────────────────────────┘
|
|
32
|
+
│ API calls
|
|
33
|
+
▼
|
|
34
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
35
|
+
│ mockttp Proxy (capture-only) │
|
|
36
|
+
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────┐ │
|
|
37
|
+
│ │ Passthrough │ │ Capture Response│ │ Extract │ │
|
|
38
|
+
│ │ (no injection) │ │ (SSE streaming) │ │ Decisions │ │
|
|
39
|
+
│ └─────────────────┘ └─────────────────┘ └─────────────┘ │
|
|
40
|
+
└──────────────────────────┬──────────────────────────────────────┘
|
|
41
|
+
│
|
|
42
|
+
▼
|
|
43
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
44
|
+
│ SQLite Database │
|
|
45
|
+
│ ┌──────────┐ ┌──────────┐ ┌─────────────┐ ┌───────────────┐ │
|
|
46
|
+
│ │ projects │ │ files │ │ structures │ │ conversations │ │
|
|
47
|
+
│ └──────────┘ └──────────┘ └─────────────┘ └───────────────┘ │
|
|
48
|
+
│ ┌──────────┐ ┌──────────┐ ┌─────────────┐ │
|
|
49
|
+
│ │extractions│ │ commits │ │ links │ + FTS5 search │
|
|
50
|
+
│ └──────────┘ └──────────┘ └─────────────┘ │
|
|
51
|
+
└──────────────────────────┬──────────────────────────────────────┘
|
|
52
|
+
│
|
|
53
|
+
┌────────────────┴────────────────┐
|
|
54
|
+
▼ ▼
|
|
55
|
+
┌─────────────────────┐ ┌─────────────────────┐
|
|
56
|
+
│ MCP Server │ │ File Watcher │
|
|
57
|
+
│ (on-demand query) │ │ (live indexing) │
|
|
58
|
+
└─────────────────────┘ └─────────────────────┘
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Components
|
|
62
|
+
|
|
63
|
+
| Component | Location | Purpose |
|
|
64
|
+
|-----------|----------|---------|
|
|
65
|
+
| **CLI** | `src/cli/` | Commands: init, start, stop, query, setup, import, visualize, git |
|
|
66
|
+
| **Database** | `src/db/` | SQLite + FTS5 for storage and search |
|
|
67
|
+
| **Indexer** | `src/indexer/` | Parse code into structures (functions, classes) |
|
|
68
|
+
| **Parsers** | `src/indexer/parsers/` | Language-specific (JS/TS, Python, Ruby, Go) |
|
|
69
|
+
| **Extractor** | `src/extractor/` | Extract decisions/rejections from conversations |
|
|
70
|
+
| **MCP Server** | `src/mcp/` | Model Context Protocol tools for Claude Code |
|
|
71
|
+
| **Proxy** | `src/proxy/` | mockttp-based HTTPS proxy (Node.js) |
|
|
72
|
+
| **Git** | `src/git/` | Git integration: commits, blame, hooks |
|
|
73
|
+
| **Visualize** | `src/visualize/` | Interactive dashboard (Cytoscape.js, D3.js) |
|
|
74
|
+
|
|
75
|
+
### Data Flow
|
|
76
|
+
|
|
77
|
+
1. **Indexing**: `aimem init` parses your codebase → stores structures in SQLite
|
|
78
|
+
2. **Capture**: Proxy intercepts LLM responses → extracts decisions → stores in DB
|
|
79
|
+
3. **Query**: MCP tools search on-demand → return relevant context
|
|
80
|
+
4. **Git**: Link decisions to commits → track who changed what
|
|
81
|
+
|
|
82
|
+
## Installation
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm install -g @rangerchaz/aimem
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Requires Node.js 18+. No Python required.
|
|
89
|
+
|
|
90
|
+
## Quick Start
|
|
91
|
+
|
|
92
|
+
### For Claude Code Users
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# 1. Set up proxy (installs cert + configures shell)
|
|
96
|
+
aimem setup proxy --install
|
|
97
|
+
|
|
98
|
+
# 2. Add MCP tools to Claude Code
|
|
99
|
+
aimem setup claude-code
|
|
100
|
+
|
|
101
|
+
# 3. Index your project
|
|
102
|
+
cd /path/to/your/project
|
|
103
|
+
aimem init
|
|
104
|
+
|
|
105
|
+
# 4. (Optional) Import old conversations
|
|
106
|
+
aimem import
|
|
107
|
+
|
|
108
|
+
# 5. (Optional) Import git history
|
|
109
|
+
aimem git import
|
|
110
|
+
|
|
111
|
+
# 6. Restart your terminal AND Claude Code
|
|
112
|
+
source ~/.bashrc # or ~/.zshrc
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
After restart, Claude Code will have MCP tools available to query your project's memory.
|
|
116
|
+
|
|
117
|
+
### For Claude Desktop Users
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# 1. Index your project
|
|
121
|
+
cd /path/to/your/project
|
|
122
|
+
aimem init
|
|
123
|
+
|
|
124
|
+
# 2. Add MCP server to Claude Desktop config
|
|
125
|
+
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
|
|
126
|
+
# Windows: %APPDATA%\Claude\claude_desktop_config.json
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Add to your config:
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"mcpServers": {
|
|
133
|
+
"aimem": {
|
|
134
|
+
"command": "aimem",
|
|
135
|
+
"args": ["mcp-serve"]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Restart Claude Desktop. The MCP tools will be available for querying your project's memory.
|
|
142
|
+
|
|
143
|
+
> **Note:** Proxy capture may not work with Claude Desktop (depends on Electron proxy settings). MCP query tools work regardless.
|
|
144
|
+
|
|
145
|
+
### For Other Tools (Cursor, Continue.dev, etc.)
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# 1. Set up proxy
|
|
149
|
+
aimem setup proxy --install
|
|
150
|
+
|
|
151
|
+
# 2. Index your project
|
|
152
|
+
cd /path/to/your/project
|
|
153
|
+
aimem init
|
|
154
|
+
|
|
155
|
+
# 3. Restart your terminal
|
|
156
|
+
source ~/.bashrc
|
|
157
|
+
|
|
158
|
+
# 4. Configure your tool's proxy settings
|
|
159
|
+
# Cursor: Set HTTP proxy to http://localhost:8080 in settings
|
|
160
|
+
# Continue.dev: Uses HTTP_PROXY automatically
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## MCP Tools
|
|
164
|
+
|
|
165
|
+
| Tool | Description |
|
|
166
|
+
|------|-------------|
|
|
167
|
+
| `aimem_query` | Search code, conversations, decisions, commits |
|
|
168
|
+
| `aimem_verify` | Check if a function/class/file exists |
|
|
169
|
+
| `aimem_conversations` | Search past conversation history |
|
|
170
|
+
|
|
171
|
+
### aimem_query
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
aimem_query <search> type=<type>
|
|
175
|
+
|
|
176
|
+
Types:
|
|
177
|
+
all - Search everything (default)
|
|
178
|
+
structures - Functions, classes, methods
|
|
179
|
+
conversations - Past AI conversations
|
|
180
|
+
decisions - Extracted decisions/rejections
|
|
181
|
+
commits - Git commit history
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Results include git authorship when available (author, commit hash).
|
|
185
|
+
|
|
186
|
+
## CLI Commands
|
|
187
|
+
|
|
188
|
+
| Command | Description |
|
|
189
|
+
|---------|-------------|
|
|
190
|
+
| `aimem init [path]` | Index a codebase |
|
|
191
|
+
| `aimem setup <tool>` | Configure for an AI tool |
|
|
192
|
+
| `aimem import` | Import old conversations |
|
|
193
|
+
| `aimem start` | Start proxy and watcher |
|
|
194
|
+
| `aimem stop` | Stop services |
|
|
195
|
+
| `aimem status` | Show status and stats |
|
|
196
|
+
| `aimem query <search>` | Search structures and conversations |
|
|
197
|
+
| `aimem visualize` | Generate interactive dashboard |
|
|
198
|
+
| `aimem git <cmd>` | Git integration commands |
|
|
199
|
+
|
|
200
|
+
## Git Integration
|
|
201
|
+
|
|
202
|
+
Track decisions alongside your git history:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Import commit history
|
|
206
|
+
aimem git import [--limit N] [--since DATE]
|
|
207
|
+
|
|
208
|
+
# Link recent decisions to HEAD commit
|
|
209
|
+
aimem git link [--auto]
|
|
210
|
+
|
|
211
|
+
# Install git hooks (auto-link on commit)
|
|
212
|
+
aimem git hooks install
|
|
213
|
+
|
|
214
|
+
# Check installed hooks
|
|
215
|
+
aimem git hooks status
|
|
216
|
+
|
|
217
|
+
# Search commit messages
|
|
218
|
+
aimem git search <query>
|
|
219
|
+
|
|
220
|
+
# Show blame with aimem context
|
|
221
|
+
aimem git blame <file>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
The git integration tracks:
|
|
225
|
+
- Commit history with FTS search on messages
|
|
226
|
+
- Git authorship on code structures (who last modified each function)
|
|
227
|
+
- Links between AI decisions and commits where they were applied
|
|
228
|
+
|
|
229
|
+
### Git Hooks
|
|
230
|
+
|
|
231
|
+
Install post-commit hook to auto-link decisions:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
aimem git hooks install # Install post-commit hook
|
|
235
|
+
aimem git hooks install --all # Install all hooks
|
|
236
|
+
aimem git hooks remove --all # Remove all hooks
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Import Old Conversations
|
|
240
|
+
|
|
241
|
+
Bootstrap with existing conversation history:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
aimem import --dry-run # Preview what would be imported
|
|
245
|
+
aimem import # Import from all sources
|
|
246
|
+
aimem import --source claude # Claude Code only
|
|
247
|
+
aimem import --source aider # Aider only
|
|
248
|
+
aimem import --source continue # Continue.dev only
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Supported sources:**
|
|
252
|
+
|
|
253
|
+
| Tool | Location | Format |
|
|
254
|
+
|------|----------|--------|
|
|
255
|
+
| Claude Code | `~/.claude/projects/` | JSONL |
|
|
256
|
+
| Aider | `.aider.chat.history.md` | Markdown |
|
|
257
|
+
| Continue.dev | `~/.continue/sessions/` | JSON |
|
|
258
|
+
|
|
259
|
+
## Visualization Dashboard
|
|
260
|
+
|
|
261
|
+
Generate an interactive HTML dashboard:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
aimem visualize # Generate dashboard.html
|
|
265
|
+
aimem visualize --output ./viz.html # Custom output path
|
|
266
|
+
aimem visualize --open # Open in browser
|
|
267
|
+
aimem visualize --serve # Start live server
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**Views:** Overview, Call Graph, Dependencies, Classes, Decisions, Code Smells, Hotspots, Gallery, Timeline, Treemap
|
|
271
|
+
|
|
272
|
+
## Teaching Claude to Use aimem
|
|
273
|
+
|
|
274
|
+
Add a `CLAUDE.md` file to your project root:
|
|
275
|
+
|
|
276
|
+
```markdown
|
|
277
|
+
## Memory (aimem)
|
|
278
|
+
|
|
279
|
+
Before claiming something isn't implemented or needs to be built:
|
|
280
|
+
1. Query `aimem_query <topic> type=decisions` to check past decisions
|
|
281
|
+
2. Query `aimem_verify <name>` to check if a function/class exists
|
|
282
|
+
|
|
283
|
+
Available aimem tools:
|
|
284
|
+
- `aimem_query <search>` - Search code, conversations, decisions, commits
|
|
285
|
+
- `aimem_verify <name>` - Does this function/class/file exist?
|
|
286
|
+
- `aimem_conversations <query>` - Search past conversation history
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## Supported LLM APIs
|
|
290
|
+
|
|
291
|
+
| Provider | API Host |
|
|
292
|
+
|----------|----------|
|
|
293
|
+
| Anthropic (Claude) | api.anthropic.com |
|
|
294
|
+
| OpenAI | api.openai.com |
|
|
295
|
+
| Google (Gemini) | generativelanguage.googleapis.com |
|
|
296
|
+
| Mistral | api.mistral.ai |
|
|
297
|
+
| Cohere | api.cohere.ai |
|
|
298
|
+
| Groq | api.groq.com |
|
|
299
|
+
| Together AI | api.together.xyz |
|
|
300
|
+
| Perplexity | api.perplexity.ai |
|
|
301
|
+
| Fireworks | api.fireworks.ai |
|
|
302
|
+
| DeepSeek | api.deepseek.com |
|
|
303
|
+
| Replicate | api.replicate.com |
|
|
304
|
+
|
|
305
|
+
## Supported Languages
|
|
306
|
+
|
|
307
|
+
- JavaScript / TypeScript (`.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.cjs`)
|
|
308
|
+
- Python (`.py`, `.pyw`)
|
|
309
|
+
- Ruby (`.rb`, `.rake`)
|
|
310
|
+
- Go (`.go`)
|
|
311
|
+
- Rust (`.rs`)
|
|
312
|
+
- Java (`.java`)
|
|
313
|
+
- Kotlin (`.kt`, `.kts`)
|
|
314
|
+
- C / C++ (`.c`, `.cpp`, `.cc`, `.cxx`, `.h`, `.hpp`, `.hxx`, `.hh`)
|
|
315
|
+
- PHP (`.php`, `.phtml`, `.php5`, `.php7`, `.php8`)
|
|
316
|
+
|
|
317
|
+
## Data Storage
|
|
318
|
+
|
|
319
|
+
Everything is stored locally in `~/.aimem/`:
|
|
320
|
+
|
|
321
|
+
```
|
|
322
|
+
~/.aimem/
|
|
323
|
+
├── aimem.db # SQLite database
|
|
324
|
+
├── ca-cert.pem # Proxy CA certificate
|
|
325
|
+
├── ca-key.pem # Proxy CA key
|
|
326
|
+
├── proxy.pid # Proxy process ID
|
|
327
|
+
└── watcher.pid # Watcher process ID
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
No cloud. No accounts. Code never leaves your machine.
|
|
331
|
+
|
|
332
|
+
## Database Schema
|
|
333
|
+
|
|
334
|
+
- **projects**: Indexed codebases
|
|
335
|
+
- **files**: Source files with content hashes
|
|
336
|
+
- **structures**: Functions, classes, methods (with git authorship)
|
|
337
|
+
- **conversations**: Stored LLM conversations
|
|
338
|
+
- **extractions**: Decisions, patterns, rejections
|
|
339
|
+
- **commits**: Git commit history with FTS search
|
|
340
|
+
- **commit_links**: Links between commits and structures/extractions
|
|
341
|
+
- **links**: Graph edges connecting entities
|
|
342
|
+
|
|
343
|
+
## Troubleshooting
|
|
344
|
+
|
|
345
|
+
**Proxy not starting?**
|
|
346
|
+
- Check for port conflicts: `lsof -i :8080`
|
|
347
|
+
- Try a different port: `aimem start --port 8081`
|
|
348
|
+
|
|
349
|
+
**Certificate issues?**
|
|
350
|
+
- Run `aimem setup proxy --install` to auto-install
|
|
351
|
+
- Or manually trust `~/.aimem/ca-cert.pem`
|
|
352
|
+
|
|
353
|
+
**MCP not working in Claude Code?**
|
|
354
|
+
- Run `/mcp` to check connection
|
|
355
|
+
- Verify path: `which aimem`
|
|
356
|
+
- Restart Claude Code after setup
|
|
357
|
+
|
|
358
|
+
**No conversations being captured?**
|
|
359
|
+
- Verify proxy is running: `aimem status`
|
|
360
|
+
- Check env vars: `echo $HTTPS_PROXY`
|
|
361
|
+
- Ensure your tool respects HTTPS_PROXY
|
|
362
|
+
|
|
363
|
+
## Development
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
# Install from source
|
|
367
|
+
git clone https://github.com/rangerchaz/aimem.git
|
|
368
|
+
cd aimem
|
|
369
|
+
npm install
|
|
370
|
+
npm run build
|
|
371
|
+
npm link # Install globally from source
|
|
372
|
+
|
|
373
|
+
# Development commands
|
|
374
|
+
npm run dev # Watch mode
|
|
375
|
+
npm test # Run tests
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
## License
|
|
379
|
+
|
|
380
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/git.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,eAAO,MAAM,UAAU,SACmB,CAAC"}
|