memorylink 2.1.0 → 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.
Files changed (68) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/README.md +66 -52
  3. package/dist/cli/commands/delete.d.ts +7 -0
  4. package/dist/cli/commands/delete.d.ts.map +1 -0
  5. package/dist/cli/commands/delete.js +106 -0
  6. package/dist/cli/commands/delete.js.map +1 -0
  7. package/dist/cli/commands/gate.d.ts +1 -1
  8. package/dist/cli/commands/gate.d.ts.map +1 -1
  9. package/dist/cli/commands/gate.js +14 -0
  10. package/dist/cli/commands/gate.js.map +1 -1
  11. package/dist/cli/commands/init.d.ts.map +1 -1
  12. package/dist/cli/commands/init.js +17 -75
  13. package/dist/cli/commands/init.js.map +1 -1
  14. package/dist/cli/commands/list.d.ts +7 -0
  15. package/dist/cli/commands/list.d.ts.map +1 -0
  16. package/dist/cli/commands/list.js +129 -0
  17. package/dist/cli/commands/list.js.map +1 -0
  18. package/dist/cli/commands/remember.d.ts +3 -0
  19. package/dist/cli/commands/remember.d.ts.map +1 -0
  20. package/dist/cli/commands/remember.js +61 -0
  21. package/dist/cli/commands/remember.js.map +1 -0
  22. package/dist/cli/commands/retrieve.d.ts +3 -0
  23. package/dist/cli/commands/retrieve.d.ts.map +1 -0
  24. package/dist/cli/commands/retrieve.js +32 -0
  25. package/dist/cli/commands/retrieve.js.map +1 -0
  26. package/dist/cli/commands/scaffold.d.ts +6 -0
  27. package/dist/cli/commands/scaffold.d.ts.map +1 -0
  28. package/dist/cli/commands/scaffold.js +132 -0
  29. package/dist/cli/commands/scaffold.js.map +1 -0
  30. package/dist/cli/index.js +10 -0
  31. package/dist/cli/index.js.map +1 -1
  32. package/dist/core/memory/gates.d.ts +17 -0
  33. package/dist/core/memory/gates.d.ts.map +1 -0
  34. package/dist/core/memory/gates.js +75 -0
  35. package/dist/core/memory/gates.js.map +1 -0
  36. package/dist/core/memory/git.d.ts +9 -0
  37. package/dist/core/memory/git.d.ts.map +1 -0
  38. package/dist/core/memory/git.js +57 -0
  39. package/dist/core/memory/git.js.map +1 -0
  40. package/dist/core/memory/storage.d.ts +11 -0
  41. package/dist/core/memory/storage.d.ts.map +1 -0
  42. package/dist/core/memory/storage.js +63 -0
  43. package/dist/core/memory/storage.js.map +1 -0
  44. package/dist/core/memory/structure.d.ts +10 -0
  45. package/dist/core/memory/structure.d.ts.map +1 -0
  46. package/dist/core/memory/structure.js +51 -0
  47. package/dist/core/memory/structure.js.map +1 -0
  48. package/dist/core/types.d.ts +13 -1
  49. package/dist/core/types.d.ts.map +1 -1
  50. package/dist/gate/rules/valid-syntax.d.ts +16 -0
  51. package/dist/gate/rules/valid-syntax.d.ts.map +1 -0
  52. package/dist/gate/rules/valid-syntax.js +76 -0
  53. package/dist/gate/rules/valid-syntax.js.map +1 -0
  54. package/dist/quarantine/patterns.js +2 -2
  55. package/dist/quarantine/patterns.js.map +1 -1
  56. package/dist/tools/pointer-generator.d.ts.map +1 -1
  57. package/dist/tools/pointer-generator.js +2 -2
  58. package/dist/tools/pointer-generator.js.map +1 -1
  59. package/docs/USER_GUIDE.md +181 -0
  60. package/package.json +3 -3
  61. package/docs/COMPARISONS.md +0 -229
  62. package/docs/FAQ.md +0 -230
  63. package/docs/GETTING_STARTED.md +0 -185
  64. package/docs/PATTERNS.md +0 -206
  65. package/docs/QUICK_REFERENCE.md +0 -209
  66. package/docs/REMEDIATION.md +0 -332
  67. package/docs/THREAT_MODEL.md +0 -279
  68. package/docs/TROUBLESHOOTING.md +0 -280
@@ -0,0 +1,181 @@
1
+ # MemoryLink User Guide
2
+
3
+ > **The Active Gatekeeper for AI Agents**
4
+ > Version 1.7.0
5
+
6
+ ---
7
+
8
+ ## What is MemoryLink?
9
+
10
+ MemoryLink is a **governance layer** for AI coding assistants. It provides:
11
+
12
+ 1. **Memory** - Persistent knowledge that survives across sessions
13
+ 2. **Gates** - Security checks that block dangerous code before commit
14
+
15
+ ### Why You Need This
16
+
17
+ | Problem | Solution |
18
+ |:---|:---|
19
+ | AI forgets fixes after 20 days | `ml capture` stores rules permanently |
20
+ | AI commits API keys accidentally | **Red Gate** blocks secrets |
21
+ | AI writes code with syntax errors | **Blue Gate** blocks broken code |
22
+ | Different AI tools have different rules | `.agent/constitution.md` = single truth |
23
+
24
+ ---
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ npm install -g memorylink
30
+ ```
31
+
32
+ ## Quick Start
33
+
34
+ ```bash
35
+ cd your-project
36
+ ml init # Initialize MemoryLink
37
+ ml scan # Scan for existing secrets
38
+ ml hooks --install # Install Git hooks (blocks bad commits)
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Core Commands
44
+
45
+ ### Memory Commands
46
+
47
+ ```bash
48
+ # Capture a memory
49
+ ml capture -t "api_guidelines" -c "Always use environment variables for API keys"
50
+
51
+ # Query a memory
52
+ ml query -t "api_guidelines"
53
+
54
+ # List all memories
55
+ ml list
56
+ ml list --since 7d # Only recent
57
+ ml list --before 30d # Only old
58
+
59
+ # Delete a memory
60
+ ml delete -t "api_guidelines" -f
61
+ ml delete --id "mem_abc123" -f
62
+ ```
63
+
64
+ ### Gate Commands
65
+
66
+ ```bash
67
+ # Check for secrets (Red Gate)
68
+ ml gate --rule block-quarantined
69
+
70
+ # Check for syntax errors (Blue Gate)
71
+ ml gate --rule valid-syntax
72
+
73
+ # Scan entire project
74
+ ml scan
75
+ ```
76
+
77
+ ### Management Commands
78
+
79
+ ```bash
80
+ ml mode active # Block mode (strict)
81
+ ml mode inactive # Warn mode (permissive)
82
+ ml self-check # Verify installation
83
+ ml doctor # Health check
84
+ ```
85
+
86
+ ---
87
+
88
+ ## How Memory Works
89
+
90
+ **The Recency Rule:** If you have multiple memories for the same topic, the newest one wins.
91
+
92
+ ```bash
93
+ # Day 1
94
+ ml capture -t "framework" -c "Use React Class components"
95
+
96
+ # Day 30
97
+ ml capture -t "framework" -c "Use React Hooks"
98
+
99
+ # Query returns "Use React Hooks" (newer)
100
+ ml query -t "framework"
101
+ ```
102
+
103
+ **Update:** Just capture again with the same topic.
104
+ **Delete:** Use `ml delete -t "topic" -f`
105
+
106
+ ---
107
+
108
+ ## How Gates Work
109
+
110
+ ### Red Gate (Secrets)
111
+ - Detects API keys, passwords, private keys
112
+ - Blocks commits with `ml gate --rule block-quarantined`
113
+ - Installed automatically via `ml hooks --install`
114
+
115
+ ### Blue Gate (Syntax)
116
+ - Detects broken code (parse errors)
117
+ - Blocks commits with `ml gate --rule valid-syntax`
118
+
119
+ ---
120
+
121
+ ## Universal Context (.agent/ folder)
122
+
123
+ Create a `.agent/` folder in your project root:
124
+
125
+ ```
126
+ .agent/
127
+ ├── memory/
128
+ │ └── constitution.md # Project rules (ALL agents read this)
129
+ └── context.md # Current project context
130
+ ```
131
+
132
+ All AI tools (Cursor, Antigravity, VS Code) will read these files automatically.
133
+
134
+ ---
135
+
136
+ ## Time-Based Memory Management
137
+
138
+ ```bash
139
+ # See memories from last week
140
+ ml list --since 7d
141
+
142
+ # Clean up old memories (older than 60 days)
143
+ ml delete --before 60d -f
144
+
145
+ # Delete all memories for old project
146
+ ml delete -t "old_project_name" -f
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Troubleshooting
152
+
153
+ ### "No memories found"
154
+ - Run `ml init` first
155
+ - Check that `.memorylink/` folder exists
156
+
157
+ ### "Gate fails but I want to commit anyway"
158
+ - Use `git commit --no-verify` (emergency bypass)
159
+ - Or run `ml mode inactive` to switch to warn-only mode
160
+
161
+ ### "False positive on secret detection"
162
+ - Run `ml gate --mark-false <id>` to whitelist it
163
+
164
+ ---
165
+
166
+ ## Summary
167
+
168
+ | Command | Purpose |
169
+ |:---|:---|
170
+ | `ml init` | Setup MemoryLink |
171
+ | `ml capture` | Save a memory |
172
+ | `ml query` | Retrieve a memory |
173
+ | `ml list` | Show all memories |
174
+ | `ml delete` | Remove a memory |
175
+ | `ml gate` | Run security checks |
176
+ | `ml scan` | Scan for secrets |
177
+ | `ml mode` | Switch active/inactive |
178
+
179
+ ---
180
+
181
+ **Built with love for the AI-First Developer.** 🚀
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "memorylink",
3
- "version": "2.1.0",
4
- "description": "MemoryLink - Prevent secret leaks in AI-assisted development. 120+ patterns including India-specific (Aadhaar, PAN, UPI).",
3
+ "version": "2.2.0",
4
+ "description": "MemoryLink - Prevent secret leaks in AI-assisted development. 127 patterns including India-specific (Aadhaar, PAN, UPI).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -72,4 +72,4 @@
72
72
  "engines": {
73
73
  "node": ">=18.0.0"
74
74
  }
75
- }
75
+ }
@@ -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
-