memorylink 2.1.1 → 2.2.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/README.md +50 -46
- package/dist/cli/commands/delete.d.ts +7 -0
- package/dist/cli/commands/delete.d.ts.map +1 -0
- package/dist/cli/commands/delete.js +106 -0
- package/dist/cli/commands/delete.js.map +1 -0
- package/dist/cli/commands/gate.d.ts +1 -1
- package/dist/cli/commands/gate.d.ts.map +1 -1
- package/dist/cli/commands/gate.js +14 -0
- package/dist/cli/commands/gate.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +17 -75
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.d.ts +7 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +129 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/remember.d.ts +3 -0
- package/dist/cli/commands/remember.d.ts.map +1 -0
- package/dist/cli/commands/remember.js +61 -0
- package/dist/cli/commands/remember.js.map +1 -0
- package/dist/cli/commands/retrieve.d.ts +3 -0
- package/dist/cli/commands/retrieve.d.ts.map +1 -0
- package/dist/cli/commands/retrieve.js +32 -0
- package/dist/cli/commands/retrieve.js.map +1 -0
- package/dist/cli/commands/scaffold.d.ts +6 -0
- package/dist/cli/commands/scaffold.d.ts.map +1 -0
- package/dist/cli/commands/scaffold.js +132 -0
- package/dist/cli/commands/scaffold.js.map +1 -0
- package/dist/cli/index.js +10 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/memory/gates.d.ts +17 -0
- package/dist/core/memory/gates.d.ts.map +1 -0
- package/dist/core/memory/gates.js +75 -0
- package/dist/core/memory/gates.js.map +1 -0
- package/dist/core/memory/git.d.ts +9 -0
- package/dist/core/memory/git.d.ts.map +1 -0
- package/dist/core/memory/git.js +57 -0
- package/dist/core/memory/git.js.map +1 -0
- package/dist/core/memory/storage.d.ts +11 -0
- package/dist/core/memory/storage.d.ts.map +1 -0
- package/dist/core/memory/storage.js +63 -0
- package/dist/core/memory/storage.js.map +1 -0
- package/dist/core/memory/structure.d.ts +10 -0
- package/dist/core/memory/structure.d.ts.map +1 -0
- package/dist/core/memory/structure.js +51 -0
- package/dist/core/memory/structure.js.map +1 -0
- package/dist/core/types.d.ts +13 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/gate/rules/valid-syntax.d.ts +16 -0
- package/dist/gate/rules/valid-syntax.d.ts.map +1 -0
- package/dist/gate/rules/valid-syntax.js +76 -0
- package/dist/gate/rules/valid-syntax.js.map +1 -0
- package/dist/tools/pointer-generator.d.ts.map +1 -1
- package/dist/tools/pointer-generator.js +2 -2
- package/dist/tools/pointer-generator.js.map +1 -1
- package/docs/USER_GUIDE.md +181 -0
- package/package.json +2 -2
- package/docs/COMPARISONS.md +0 -229
- package/docs/FAQ.md +0 -230
- package/docs/GETTING_STARTED.md +0 -185
- package/docs/PATTERNS.md +0 -206
- package/docs/QUICK_REFERENCE.md +0 -209
- package/docs/REMEDIATION.md +0 -332
- package/docs/THREAT_MODEL.md +0 -279
- package/docs/TROUBLESHOOTING.md +0 -280
package/docs/COMPARISONS.md
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
# MemoryLink vs Alternatives
|
|
2
|
-
|
|
3
|
-
A comprehensive comparison of MemoryLink with similar tools and services.
|
|
4
|
-
|
|
5
|
-
## 🆚 MemoryLink vs GitHub Secret Scanning
|
|
6
|
-
|
|
7
|
-
### GitHub Secret Scanning
|
|
8
|
-
|
|
9
|
-
**What it does**:
|
|
10
|
-
- Scans public repositories automatically
|
|
11
|
-
- Detects secrets in commits
|
|
12
|
-
- Alerts repository owners
|
|
13
|
-
- Integrates with GitHub Actions
|
|
14
|
-
|
|
15
|
-
**Limitations**:
|
|
16
|
-
- ❌ Only works for public repos (or GitHub Advanced Security)
|
|
17
|
-
- ❌ No local/private repo scanning
|
|
18
|
-
- ❌ No memory governance features
|
|
19
|
-
- ❌ No CI/CD blocking (only alerts)
|
|
20
|
-
- ❌ Limited pattern customization
|
|
21
|
-
- ❌ No false positive management
|
|
22
|
-
|
|
23
|
-
### MemoryLink
|
|
24
|
-
|
|
25
|
-
**Advantages**:
|
|
26
|
-
- ✅ Works in **any repository** (public, private, local)
|
|
27
|
-
- ✅ **CI/CD blocking** (gates fail builds)
|
|
28
|
-
- ✅ **Memory governance** (E0/E1/E2 grading)
|
|
29
|
-
- ✅ **69+ patterns** (vs GitHub's ~20)
|
|
30
|
-
- ✅ **Dynamic detection** (catches unknown formats)
|
|
31
|
-
- ✅ **False positive tracking**
|
|
32
|
-
- ✅ **Validity checking** (active/inactive secrets)
|
|
33
|
-
- ✅ **Full audit trail**
|
|
34
|
-
- ✅ **Git hooks** (pre-commit, pre-push)
|
|
35
|
-
- ✅ **Completely free and open source**
|
|
36
|
-
|
|
37
|
-
**Use Case**: MemoryLink is for teams who want **complete control** over secret detection and memory governance, not just alerts.
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## 🆚 MemoryLink vs Mem0
|
|
42
|
-
|
|
43
|
-
### Mem0
|
|
44
|
-
|
|
45
|
-
**What it does**:
|
|
46
|
-
- AI memory management system
|
|
47
|
-
- Stores memories in vector database
|
|
48
|
-
- Semantic search over memories
|
|
49
|
-
- API-based service
|
|
50
|
-
|
|
51
|
-
**Focus**: AI memory storage and retrieval
|
|
52
|
-
|
|
53
|
-
**Limitations**:
|
|
54
|
-
- ❌ No secret detection
|
|
55
|
-
- ❌ No security governance
|
|
56
|
-
- ❌ Cloud-based (requires API)
|
|
57
|
-
- ❌ No CI/CD integration
|
|
58
|
-
- ❌ No audit trail
|
|
59
|
-
- ❌ No policy gates
|
|
60
|
-
|
|
61
|
-
### MemoryLink
|
|
62
|
-
|
|
63
|
-
**Advantages**:
|
|
64
|
-
- ✅ **Repo-native** (no cloud dependency)
|
|
65
|
-
- ✅ **Secret detection** (69+ patterns)
|
|
66
|
-
- ✅ **Security governance** (quarantine, gates)
|
|
67
|
-
- ✅ **CI/CD integration** (blocks bad merges)
|
|
68
|
-
- ✅ **Full audit trail** (tamper-evident)
|
|
69
|
-
- ✅ **Evidence grading** (E0/E1/E2)
|
|
70
|
-
- ✅ **Conflict resolution** (deterministic)
|
|
71
|
-
- ✅ **Git hooks** (automatic protection)
|
|
72
|
-
|
|
73
|
-
**Use Case**: MemoryLink is for teams who need **both** memory management **and** security governance in one tool.
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## 🆚 MemoryLink vs TruffleHog
|
|
78
|
-
|
|
79
|
-
### TruffleHog
|
|
80
|
-
|
|
81
|
-
**What it does**:
|
|
82
|
-
- Secret scanning tool
|
|
83
|
-
- Scans Git history
|
|
84
|
-
- Detects API keys and tokens
|
|
85
|
-
- CI/CD integration
|
|
86
|
-
|
|
87
|
-
**Focus**: Secret detection only
|
|
88
|
-
|
|
89
|
-
**Limitations**:
|
|
90
|
-
- ❌ No memory management
|
|
91
|
-
- ❌ No evidence grading
|
|
92
|
-
- ❌ No conflict resolution
|
|
93
|
-
- ❌ Limited to secret detection
|
|
94
|
-
- ❌ No memory governance
|
|
95
|
-
|
|
96
|
-
### MemoryLink
|
|
97
|
-
|
|
98
|
-
**Advantages**:
|
|
99
|
-
- ✅ **Memory management** (capture, query, promote)
|
|
100
|
-
- ✅ **Evidence grading** (E0/E1/E2)
|
|
101
|
-
- ✅ **Conflict resolution** (deterministic truth)
|
|
102
|
-
- ✅ **69+ patterns** (comprehensive)
|
|
103
|
-
- ✅ **Dynamic detection** (catches unknown formats)
|
|
104
|
-
- ✅ **Validity checking** (active/inactive)
|
|
105
|
-
- ✅ **Full audit trail**
|
|
106
|
-
- ✅ **Memory governance** (constitution protection, team isolation)
|
|
107
|
-
|
|
108
|
-
**Use Case**: MemoryLink is for teams who need **both** secret detection **and** AI memory governance.
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## 🆚 MemoryLink vs GitGuardian
|
|
113
|
-
|
|
114
|
-
### GitGuardian
|
|
115
|
-
|
|
116
|
-
**What it does**:
|
|
117
|
-
- Secret scanning (SaaS)
|
|
118
|
-
- Git history scanning
|
|
119
|
-
- Real-time detection
|
|
120
|
-
- Incident management
|
|
121
|
-
|
|
122
|
-
**Focus**: Enterprise secret detection
|
|
123
|
-
|
|
124
|
-
**Limitations**:
|
|
125
|
-
- ❌ **Paid service** (expensive for small teams)
|
|
126
|
-
- ❌ Cloud-based (requires internet)
|
|
127
|
-
- ❌ No memory management
|
|
128
|
-
- ❌ No local/offline scanning
|
|
129
|
-
- ❌ No memory governance
|
|
130
|
-
|
|
131
|
-
### MemoryLink
|
|
132
|
-
|
|
133
|
-
**Advantages**:
|
|
134
|
-
- ✅ **100% free and open source**
|
|
135
|
-
- ✅ **Works offline** (no cloud dependency)
|
|
136
|
-
- ✅ **Memory management** (capture, query, promote)
|
|
137
|
-
- ✅ **Memory governance** (evidence grading, conflict resolution)
|
|
138
|
-
- ✅ **Self-hosted** (complete control)
|
|
139
|
-
- ✅ **No vendor lock-in**
|
|
140
|
-
|
|
141
|
-
**Use Case**: MemoryLink is for teams who want **enterprise-grade security** without the enterprise price tag.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## 🆚 MemoryLink vs Gitleaks
|
|
146
|
-
|
|
147
|
-
### Gitleaks
|
|
148
|
-
|
|
149
|
-
**What it does**:
|
|
150
|
-
- Secret scanning tool
|
|
151
|
-
- Git history scanning
|
|
152
|
-
- CI/CD integration
|
|
153
|
-
- Pattern-based detection
|
|
154
|
-
|
|
155
|
-
**Focus**: Open-source secret detection
|
|
156
|
-
|
|
157
|
-
**Limitations**:
|
|
158
|
-
- ❌ No memory management
|
|
159
|
-
- ❌ No evidence grading
|
|
160
|
-
- ❌ No conflict resolution
|
|
161
|
-
- ❌ Limited to secret detection
|
|
162
|
-
- ❌ No memory governance
|
|
163
|
-
|
|
164
|
-
### MemoryLink
|
|
165
|
-
|
|
166
|
-
**Advantages**:
|
|
167
|
-
- ✅ **Memory management** (capture, query, promote)
|
|
168
|
-
- ✅ **Evidence grading** (E0/E1/E2)
|
|
169
|
-
- ✅ **Conflict resolution** (deterministic truth)
|
|
170
|
-
- ✅ **69+ patterns** (comprehensive)
|
|
171
|
-
- ✅ **Dynamic detection** (catches unknown formats)
|
|
172
|
-
- ✅ **Validity checking** (active/inactive)
|
|
173
|
-
- ✅ **Full audit trail**
|
|
174
|
-
- ✅ **Memory governance** (constitution protection, team isolation)
|
|
175
|
-
|
|
176
|
-
**Use Case**: MemoryLink is for teams who need **both** secret detection **and** AI memory governance.
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## 📊 Feature Comparison Matrix
|
|
181
|
-
|
|
182
|
-
| Feature | MemoryLink | GitHub Secret Scanning | Mem0 | TruffleHog | GitGuardian | Gitleaks |
|
|
183
|
-
|---------|-----------|------------------------|------|------------|-------------|----------|
|
|
184
|
-
| **Secret Detection** | ✅ 69+ patterns | ✅ ~20 patterns | ❌ | ✅ | ✅ | ✅ |
|
|
185
|
-
| **Memory Management** | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
|
|
186
|
-
| **Evidence Grading** | ✅ E0/E1/E2 | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
187
|
-
| **CI/CD Blocking** | ✅ | ⚠️ Alerts only | ❌ | ✅ | ✅ | ✅ |
|
|
188
|
-
| **Git Hooks** | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ |
|
|
189
|
-
| **Validity Checking** | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ |
|
|
190
|
-
| **Dynamic Detection** | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
191
|
-
| **False Positive Tracking** | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ |
|
|
192
|
-
| **Audit Trail** | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ |
|
|
193
|
-
| **Conflict Resolution** | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
194
|
-
| **Memory Governance** | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
195
|
-
| **Open Source** | ✅ | ❌ | ⚠️ Partial | ✅ | ❌ | ✅ |
|
|
196
|
-
| **Free** | ✅ | ⚠️ Public repos only | ⚠️ Limited | ✅ | ❌ | ✅ |
|
|
197
|
-
| **Works Offline** | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ |
|
|
198
|
-
|
|
199
|
-
## 🎯 When to Use MemoryLink
|
|
200
|
-
|
|
201
|
-
**Choose MemoryLink if you need**:
|
|
202
|
-
- ✅ Both secret detection **and** memory management
|
|
203
|
-
- ✅ Complete control (self-hosted, offline)
|
|
204
|
-
- ✅ Evidence grading and conflict resolution
|
|
205
|
-
- ✅ Memory governance (constitution protection, team isolation)
|
|
206
|
-
- ✅ Free and open source solution
|
|
207
|
-
- ✅ CI/CD blocking (not just alerts)
|
|
208
|
-
- ✅ Comprehensive pattern detection (69+ patterns)
|
|
209
|
-
|
|
210
|
-
**Choose alternatives if you need**:
|
|
211
|
-
- **GitHub Secret Scanning**: Public repo scanning only, GitHub integration
|
|
212
|
-
- **Mem0**: AI memory storage only (no security)
|
|
213
|
-
- **TruffleHog/Gitleaks**: Secret detection only (no memory management)
|
|
214
|
-
- **GitGuardian**: Enterprise SaaS with incident management
|
|
215
|
-
|
|
216
|
-
## 🚀 MemoryLink's Unique Value
|
|
217
|
-
|
|
218
|
-
MemoryLink is the **only tool** that combines:
|
|
219
|
-
1. **Secret Detection** (69+ patterns, dynamic detection)
|
|
220
|
-
2. **Memory Management** (capture, query, promote)
|
|
221
|
-
3. **Memory Governance** (evidence grading, conflict resolution)
|
|
222
|
-
4. **Security Governance** (quarantine, gates, audit trail)
|
|
223
|
-
|
|
224
|
-
**Result**: One tool for both **AI memory** and **security** governance.
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
**Ready to try MemoryLink?** Start with [GETTING_STARTED.md](./GETTING_STARTED.md)
|
|
229
|
-
|
package/docs/FAQ.md
DELETED
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
# Frequently Asked Questions
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## General
|
|
6
|
-
|
|
7
|
-
### What is MemoryLink?
|
|
8
|
-
MemoryLink is a CLI tool that prevents secret leaks in AI-assisted development. It scans your code for API keys, passwords, and personal data before they can be committed to Git or leaked through AI coding assistants like Cursor, Copilot, or Claude Code.
|
|
9
|
-
|
|
10
|
-
### Is MemoryLink free?
|
|
11
|
-
Yes, MemoryLink is 100% free and open source (MIT license).
|
|
12
|
-
|
|
13
|
-
### Does MemoryLink work offline?
|
|
14
|
-
Yes, MemoryLink runs 100% locally. It never sends your code or secrets to any server.
|
|
15
|
-
|
|
16
|
-
### Does MemoryLink have telemetry?
|
|
17
|
-
No. MemoryLink has zero telemetry. All operations are local-only. You can verify this with `ml doctor --network`.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
### What are the requirements?
|
|
24
|
-
- Node.js 18 or higher
|
|
25
|
-
- npm or pnpm
|
|
26
|
-
- Git (for hook integration)
|
|
27
|
-
|
|
28
|
-
### How do I install MemoryLink?
|
|
29
|
-
```bash
|
|
30
|
-
npm install -g memorylink
|
|
31
|
-
cd your-project
|
|
32
|
-
ml init
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Does it work on Windows?
|
|
36
|
-
Yes, MemoryLink supports Windows, macOS, and Linux. On Windows, we recommend using Git Bash for the best experience.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Usage
|
|
41
|
-
|
|
42
|
-
### What mode should I use?
|
|
43
|
-
- **Inactive (default)**: Warns about secrets but allows commits. Good for learning.
|
|
44
|
-
- **Active**: Blocks commits if secrets are found. Recommended for production.
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
ml mode inactive # Warn only
|
|
48
|
-
ml mode active # Block on secrets
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Will it slow down my commits?
|
|
52
|
-
No. Pre-commit hooks only scan staged files (changed files), which typically takes less than 1 second.
|
|
53
|
-
|
|
54
|
-
### How do I handle false positives?
|
|
55
|
-
Three options:
|
|
56
|
-
1. **Inline ignore**: Add `// ml:ignore` at the end of the line
|
|
57
|
-
2. **File ignore**: `ml ignore add --file path/to/file.js`
|
|
58
|
-
3. **Pattern ignore**: `ml ignore add --pattern "pattern-id"`
|
|
59
|
-
|
|
60
|
-
### Can I bypass the hooks temporarily?
|
|
61
|
-
Yes, but use with caution:
|
|
62
|
-
```bash
|
|
63
|
-
git commit --no-verify
|
|
64
|
-
git push --no-verify
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Or for a single command:
|
|
68
|
-
```bash
|
|
69
|
-
ML_MODE=inactive git push
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Security
|
|
75
|
-
|
|
76
|
-
### Where are encryption keys stored?
|
|
77
|
-
Keys are stored in your home directory: `~/.memorylink/keys/`
|
|
78
|
-
|
|
79
|
-
Each project gets a unique key based on its path hash. Keys are never stored in your project directory.
|
|
80
|
-
|
|
81
|
-
### What encryption does MemoryLink use?
|
|
82
|
-
AES-256-GCM (Advanced Encryption Standard with 256-bit key, Galois/Counter Mode). This is industry-standard authenticated encryption.
|
|
83
|
-
|
|
84
|
-
### Are my secrets safe?
|
|
85
|
-
Yes:
|
|
86
|
-
- Secrets are encrypted at rest in quarantine
|
|
87
|
-
- Full secrets are never printed in output (always masked)
|
|
88
|
-
- No data is sent to external servers
|
|
89
|
-
- Keys are stored with 600 permissions (owner-only)
|
|
90
|
-
|
|
91
|
-
### Can other users access my quarantined secrets?
|
|
92
|
-
No. The encryption key is in your home directory with restricted permissions. Without the key, quarantined data cannot be decrypted.
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Patterns
|
|
97
|
-
|
|
98
|
-
### How many patterns does MemoryLink detect?
|
|
99
|
-
112 patterns including:
|
|
100
|
-
- Cloud providers (AWS, Azure, GCP)
|
|
101
|
-
- AI APIs (OpenAI, Claude, HuggingFace)
|
|
102
|
-
- Payment gateways (Stripe, PayPal, Razorpay)
|
|
103
|
-
- Authentication (GitHub, GitLab, Slack, Discord)
|
|
104
|
-
- Personal data (SSN, credit cards, Aadhaar, PAN)
|
|
105
|
-
- Browser leaks (localStorage, cookies, console.log)
|
|
106
|
-
|
|
107
|
-
### Does it support India-specific patterns?
|
|
108
|
-
Yes! MemoryLink includes patterns for:
|
|
109
|
-
- Aadhaar numbers
|
|
110
|
-
- PAN cards
|
|
111
|
-
- GSTIN
|
|
112
|
-
- UPI IDs
|
|
113
|
-
- IFSC codes
|
|
114
|
-
- Razorpay keys
|
|
115
|
-
- Paytm merchant keys
|
|
116
|
-
|
|
117
|
-
### Can I add custom patterns?
|
|
118
|
-
Yes, create a `memorylink.config.js` file:
|
|
119
|
-
```javascript
|
|
120
|
-
module.exports = {
|
|
121
|
-
customPatterns: [
|
|
122
|
-
{
|
|
123
|
-
id: 'my-pattern',
|
|
124
|
-
name: 'My Custom Pattern',
|
|
125
|
-
pattern: /my-secret-[a-z0-9]+/i,
|
|
126
|
-
description: 'Custom secret format'
|
|
127
|
-
}
|
|
128
|
-
]
|
|
129
|
-
};
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## CI/CD
|
|
135
|
-
|
|
136
|
-
### Does it work in CI/CD?
|
|
137
|
-
Yes! MemoryLink auto-detects CI environments and enforces blocking mode automatically.
|
|
138
|
-
|
|
139
|
-
### Which CI systems are supported?
|
|
140
|
-
- GitHub Actions
|
|
141
|
-
- GitLab CI
|
|
142
|
-
- Jenkins
|
|
143
|
-
- CircleCI
|
|
144
|
-
- Travis CI
|
|
145
|
-
- Buildkite
|
|
146
|
-
- Azure Pipelines
|
|
147
|
-
- TeamCity
|
|
148
|
-
- Bitbucket Pipelines
|
|
149
|
-
- Drone CI
|
|
150
|
-
- Vercel
|
|
151
|
-
- Netlify
|
|
152
|
-
- And more...
|
|
153
|
-
|
|
154
|
-
### How do I set it up in GitHub Actions?
|
|
155
|
-
```yaml
|
|
156
|
-
- name: Install MemoryLink
|
|
157
|
-
run: npm install -g memorylink
|
|
158
|
-
|
|
159
|
-
- name: Security Scan
|
|
160
|
-
run: ml gate --enforce
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
|
|
165
|
-
## Comparison
|
|
166
|
-
|
|
167
|
-
### How is MemoryLink different from Gitleaks?
|
|
168
|
-
| Feature | MemoryLink | Gitleaks |
|
|
169
|
-
|---------|------------|----------|
|
|
170
|
-
| AI-focused | ✅ | ❌ |
|
|
171
|
-
| Easy ignore system | ✅ Interactive | ❌ YAML config |
|
|
172
|
-
| Memory governance | ✅ | ❌ |
|
|
173
|
-
| India patterns | ✅ | ❌ |
|
|
174
|
-
|
|
175
|
-
### How is MemoryLink different from TruffleHog?
|
|
176
|
-
| Feature | MemoryLink | TruffleHog |
|
|
177
|
-
|---------|------------|------------|
|
|
178
|
-
| Speed | Fast (<1s hooks) | Slower |
|
|
179
|
-
| Memory usage | Low | High (16GB+) |
|
|
180
|
-
| AI memory layer | ✅ | ❌ |
|
|
181
|
-
| Local-first | ✅ | ✅ |
|
|
182
|
-
|
|
183
|
-
### How is MemoryLink different from Mem0?
|
|
184
|
-
| Feature | MemoryLink | Mem0 |
|
|
185
|
-
|---------|------------|------|
|
|
186
|
-
| Secret scanning | ✅ | ❌ |
|
|
187
|
-
| Zero telemetry | ✅ Provable | ❌ Has telemetry |
|
|
188
|
-
| Local-first | ✅ | ❌ Cloud-hosted |
|
|
189
|
-
| Free | ✅ | Freemium |
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## Troubleshooting
|
|
194
|
-
|
|
195
|
-
### Where can I get help?
|
|
196
|
-
1. Check [TROUBLESHOOTING.md](./TROUBLESHOOTING.md)
|
|
197
|
-
2. Run `ml self-check` for diagnostics
|
|
198
|
-
3. Open an issue on GitHub
|
|
199
|
-
|
|
200
|
-
### How do I report a bug?
|
|
201
|
-
1. Run `ml self-check`
|
|
202
|
-
2. Include the output in your bug report
|
|
203
|
-
3. Open an issue at: [GitHub Issues](https://github.com/memorylink/memorylink/issues)
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Updates
|
|
208
|
-
|
|
209
|
-
### How do I update MemoryLink?
|
|
210
|
-
```bash
|
|
211
|
-
npm update -g memorylink
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
### Where can I see the changelog?
|
|
215
|
-
Check [CHANGELOG.md](../CHANGELOG.md) for version history.
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
## Contributing
|
|
220
|
-
|
|
221
|
-
### Can I contribute?
|
|
222
|
-
Yes! MemoryLink is open source. Check [CONTRIBUTING.md](../CONTRIBUTING.md) for guidelines.
|
|
223
|
-
|
|
224
|
-
### How do I suggest a new pattern?
|
|
225
|
-
Open an issue or PR with:
|
|
226
|
-
- Pattern name
|
|
227
|
-
- Regex
|
|
228
|
-
- Example matches
|
|
229
|
-
- Description
|
|
230
|
-
|
package/docs/GETTING_STARTED.md
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
# Getting Started with MemoryLink
|
|
2
|
-
|
|
3
|
-
Welcome to MemoryLink! This guide will help you get started with MemoryLink in just a few minutes.
|
|
4
|
-
|
|
5
|
-
## 🚀 Quick Start
|
|
6
|
-
|
|
7
|
-
### 1. Installation
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# Install globally
|
|
11
|
-
npm install -g @memorylink/cli
|
|
12
|
-
|
|
13
|
-
# Or install from source
|
|
14
|
-
git clone https://github.com/your-org/memorylink.git
|
|
15
|
-
cd memorylink
|
|
16
|
-
npm install
|
|
17
|
-
npm run build
|
|
18
|
-
npm link
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### 2. Initialize Your Project
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
# Navigate to your project
|
|
25
|
-
cd /path/to/your/project
|
|
26
|
-
|
|
27
|
-
# Initialize MemoryLink (runs automatic security scan)
|
|
28
|
-
ml init
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
The `ml init` command will:
|
|
32
|
-
- ✅ Scan your entire project for secrets and personal data
|
|
33
|
-
- ✅ Create `.memorylink/` directory structure
|
|
34
|
-
- ✅ Generate `AGENTS.md` (universal hub for AI tools)
|
|
35
|
-
- ✅ Create tool pointer files (`.cursorrules`, `CLAUDE.md`, etc.)
|
|
36
|
-
- ✅ Install Git hooks (pre-commit, pre-push)
|
|
37
|
-
|
|
38
|
-
### 3. Your First Memory
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# Capture a memory (E0 = raw, unverified)
|
|
42
|
-
ml capture --topic "project setup" --content "Use TypeScript strict mode"
|
|
43
|
-
|
|
44
|
-
# Query memories
|
|
45
|
-
ml query --topic "project setup"
|
|
46
|
-
|
|
47
|
-
# Promote to E2 (verified) - requires reason
|
|
48
|
-
ml promote --record-id "mem_..." --to E2 --reason "Verified in production"
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## 📚 Core Concepts
|
|
52
|
-
|
|
53
|
-
### Evidence Levels
|
|
54
|
-
|
|
55
|
-
- **E0** (Raw): Just captured, unverified
|
|
56
|
-
- **E1** (Curated): Reviewed, seems valid
|
|
57
|
-
- **E2** (Verified): Proven true, policy-gated - **ONLY via `ml promote`**
|
|
58
|
-
|
|
59
|
-
### Memory Status
|
|
60
|
-
|
|
61
|
-
- **ACTIVE**: Currently in use, eligible for queries
|
|
62
|
-
- **DEPRECATED**: Superseded, excluded from truth queries
|
|
63
|
-
- **QUARANTINED**: Unsafe content detected, never returned in queries
|
|
64
|
-
|
|
65
|
-
### Commands Overview
|
|
66
|
-
|
|
67
|
-
| Command | Purpose | Example |
|
|
68
|
-
|---------|---------|---------|
|
|
69
|
-
| `ml init` | First-time setup | `ml init` |
|
|
70
|
-
| `ml capture` | Capture memory (E0/E1) | `ml capture -t "topic" -c "content"` |
|
|
71
|
-
| `ml query` | Query memories | `ml query -t "topic"` |
|
|
72
|
-
| `ml promote` | Promote to E2 | `ml promote -r "mem_..." --to E2 --reason "..."` |
|
|
73
|
-
| `ml gate` | Policy gate check | `ml gate -r block-quarantined` |
|
|
74
|
-
| `ml audit` | View audit trail | `ml audit --view timeline` |
|
|
75
|
-
| `ml scan` | Scan for secrets | `ml scan` |
|
|
76
|
-
|
|
77
|
-
## 🔒 Security Features
|
|
78
|
-
|
|
79
|
-
### Automatic Secret Detection
|
|
80
|
-
|
|
81
|
-
MemoryLink automatically detects and quarantines:
|
|
82
|
-
- API keys (OpenAI, AWS, GitHub, etc.)
|
|
83
|
-
- Passwords and tokens
|
|
84
|
-
- Personal data (SSN, credit cards, etc.)
|
|
85
|
-
- Browser data leaks (localStorage, console.log)
|
|
86
|
-
- Debug code with secrets
|
|
87
|
-
|
|
88
|
-
### Policy Gates
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
# Check for quarantined content (blocks CI/CD if found)
|
|
92
|
-
ml gate --rule block-quarantined
|
|
93
|
-
|
|
94
|
-
# Check only changed files
|
|
95
|
-
ml gate --rule block-quarantined --diff
|
|
96
|
-
|
|
97
|
-
# Check commit history
|
|
98
|
-
ml gate --rule block-quarantined --history
|
|
99
|
-
|
|
100
|
-
# Check validity (active/inactive secrets)
|
|
101
|
-
ml gate --rule block-quarantined --check-validity
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Git Hooks
|
|
105
|
-
|
|
106
|
-
MemoryLink automatically installs Git hooks:
|
|
107
|
-
- **pre-commit**: Scans changed files before commit
|
|
108
|
-
- **pre-push**: Full repository scan before push
|
|
109
|
-
|
|
110
|
-
## 🎯 Common Workflows
|
|
111
|
-
|
|
112
|
-
### Workflow 1: First-Time Setup
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
# 1. Initialize
|
|
116
|
-
ml init
|
|
117
|
-
|
|
118
|
-
# 2. Review scan results
|
|
119
|
-
# Fix any secrets found
|
|
120
|
-
|
|
121
|
-
# 3. Start capturing memories
|
|
122
|
-
ml capture --topic "architecture" --content "Use microservices pattern"
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Workflow 2: Daily Development
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
# Capture learnings
|
|
129
|
-
ml capture --topic "bug fix" --content "Fixed memory leak in cache"
|
|
130
|
-
|
|
131
|
-
# Query for context
|
|
132
|
-
ml query --topic "bug fix"
|
|
133
|
-
|
|
134
|
-
# Promote verified knowledge
|
|
135
|
-
ml promote --record-id "mem_..." --to E2 --reason "Tested in production"
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Workflow 3: CI/CD Integration
|
|
139
|
-
|
|
140
|
-
```yaml
|
|
141
|
-
# .github/workflows/gate.yml
|
|
142
|
-
- name: MemoryLink Gate
|
|
143
|
-
run: ml gate --rule block-quarantined
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
## 📖 Next Steps
|
|
147
|
-
|
|
148
|
-
- Read [PATTERNS.md](./PATTERNS.md) - All 69+ detection patterns
|
|
149
|
-
- Read [REMEDIATION.md](./REMEDIATION.md) - How to fix detected secrets
|
|
150
|
-
- Read [COMPARISONS.md](./COMPARISONS.md) - MemoryLink vs alternatives
|
|
151
|
-
|
|
152
|
-
## ❓ Troubleshooting
|
|
153
|
-
|
|
154
|
-
### Issue: "Not a Git repository"
|
|
155
|
-
|
|
156
|
-
**Solution**: Initialize Git first:
|
|
157
|
-
```bash
|
|
158
|
-
git init
|
|
159
|
-
ml init
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Issue: "Secret detected" during capture
|
|
163
|
-
|
|
164
|
-
**Solution**: Remove the secret from your content, or use `--approve` if it's intentional:
|
|
165
|
-
```bash
|
|
166
|
-
ml capture --topic "..." --content "..." --approve
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Issue: Gate fails in CI/CD
|
|
170
|
-
|
|
171
|
-
**Solution**: Check for quarantined content:
|
|
172
|
-
```bash
|
|
173
|
-
ml gate --rule block-quarantined --json
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## 🆘 Need Help?
|
|
177
|
-
|
|
178
|
-
- Check the [README.md](../README.md) for full documentation
|
|
179
|
-
- Review [PATTERNS.md](./PATTERNS.md) for all detection patterns
|
|
180
|
-
- See [REMEDIATION.md](./REMEDIATION.md) for fixing issues
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
**Ready to go?** Run `ml init` in your project to get started! 🚀
|
|
185
|
-
|