ragtime-cli 0.1.0__tar.gz
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.
- ragtime_cli-0.1.0/LICENSE +21 -0
- ragtime_cli-0.1.0/PKG-INFO +220 -0
- ragtime_cli-0.1.0/README.md +190 -0
- ragtime_cli-0.1.0/pyproject.toml +56 -0
- ragtime_cli-0.1.0/ragtime_cli.egg-info/PKG-INFO +220 -0
- ragtime_cli-0.1.0/ragtime_cli.egg-info/SOURCES.txt +24 -0
- ragtime_cli-0.1.0/ragtime_cli.egg-info/dependency_links.txt +1 -0
- ragtime_cli-0.1.0/ragtime_cli.egg-info/entry_points.txt +3 -0
- ragtime_cli-0.1.0/ragtime_cli.egg-info/requires.txt +7 -0
- ragtime_cli-0.1.0/ragtime_cli.egg-info/top_level.txt +1 -0
- ragtime_cli-0.1.0/setup.cfg +4 -0
- ragtime_cli-0.1.0/src/__init__.py +0 -0
- ragtime_cli-0.1.0/src/cli.py +773 -0
- ragtime_cli-0.1.0/src/commands/audit.md +151 -0
- ragtime_cli-0.1.0/src/commands/handoff.md +176 -0
- ragtime_cli-0.1.0/src/commands/pr-graduate.md +187 -0
- ragtime_cli-0.1.0/src/commands/recall.md +175 -0
- ragtime_cli-0.1.0/src/commands/remember.md +168 -0
- ragtime_cli-0.1.0/src/commands/save.md +10 -0
- ragtime_cli-0.1.0/src/commands/start.md +206 -0
- ragtime_cli-0.1.0/src/config.py +101 -0
- ragtime_cli-0.1.0/src/db.py +167 -0
- ragtime_cli-0.1.0/src/indexers/__init__.py +0 -0
- ragtime_cli-0.1.0/src/indexers/docs.py +129 -0
- ragtime_cli-0.1.0/src/mcp_server.py +590 -0
- ragtime_cli-0.1.0/src/memory.py +379 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 bretwardjames
|
|
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.
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ragtime-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local-first memory and RAG system for Claude Code - semantic search over code, docs, and team knowledge
|
|
5
|
+
Author-email: Bret Martineau <bretwardjames@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/bretwardjames/ragtime
|
|
8
|
+
Project-URL: Repository, https://github.com/bretwardjames/ragtime
|
|
9
|
+
Project-URL: Issues, https://github.com/bretwardjames/ragtime/issues
|
|
10
|
+
Keywords: claude,rag,memory,mcp,ai,llm,semantic-search,vector-database
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
19
|
+
Classifier: Topic :: Text Processing :: Indexing
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: chromadb>=0.4.0
|
|
24
|
+
Requires-Dist: pyyaml>=6.0
|
|
25
|
+
Requires-Dist: click>=8.0
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
28
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# ragtime-cli
|
|
32
|
+
|
|
33
|
+
Local-first memory and RAG system for Claude Code. Semantic search over code, docs, and team knowledge.
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- **Memory Storage**: Store structured knowledge with namespaces, types, and metadata
|
|
38
|
+
- **Semantic Search**: Query memories and docs with natural language
|
|
39
|
+
- **Cross-Branch Sync**: Share context with teammates before PRs merge
|
|
40
|
+
- **MCP Server**: Native Claude Code integration
|
|
41
|
+
- **Claude Commands**: Pre-built `/remember`, `/recall`, `/handoff`, `/start` commands
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install ragtime-cli
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Initialize in your project
|
|
53
|
+
ragtime init
|
|
54
|
+
|
|
55
|
+
# Store a memory
|
|
56
|
+
ragtime remember "Auth uses JWT with 15-min expiry" \
|
|
57
|
+
--namespace app \
|
|
58
|
+
--type architecture \
|
|
59
|
+
--component auth
|
|
60
|
+
|
|
61
|
+
# Search memories
|
|
62
|
+
ragtime search "authentication" --namespace app
|
|
63
|
+
|
|
64
|
+
# Install Claude commands
|
|
65
|
+
ragtime install --workspace
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## CLI Commands
|
|
69
|
+
|
|
70
|
+
### Memory Storage
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Store a memory
|
|
74
|
+
ragtime remember "content" --namespace app --type architecture --component auth
|
|
75
|
+
|
|
76
|
+
# List memories
|
|
77
|
+
ragtime memories --namespace app --type decision
|
|
78
|
+
|
|
79
|
+
# Graduate branch memory to app
|
|
80
|
+
ragtime graduate <memory-id>
|
|
81
|
+
|
|
82
|
+
# Delete a memory
|
|
83
|
+
ragtime forget <memory-id>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Search & Indexing
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Index docs
|
|
90
|
+
ragtime index --type docs
|
|
91
|
+
|
|
92
|
+
# Semantic search
|
|
93
|
+
ragtime search "how does auth work" --namespace app --limit 10
|
|
94
|
+
|
|
95
|
+
# Reindex memory files
|
|
96
|
+
ragtime reindex
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Cross-Branch Sync
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Sync teammate's branch memories
|
|
103
|
+
ragtime sync origin/jm/feature-auth
|
|
104
|
+
|
|
105
|
+
# Clean up stale synced folders
|
|
106
|
+
ragtime prune --dry-run
|
|
107
|
+
ragtime prune
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Claude Integration
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Install Claude commands to workspace
|
|
114
|
+
ragtime install --workspace
|
|
115
|
+
|
|
116
|
+
# Install globally
|
|
117
|
+
ragtime install --global
|
|
118
|
+
|
|
119
|
+
# List available commands
|
|
120
|
+
ragtime install --list
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## MCP Server
|
|
124
|
+
|
|
125
|
+
Add to your Claude config (`.mcp.json`):
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"mcpServers": {
|
|
130
|
+
"ragtime": {
|
|
131
|
+
"command": "ragtime-mcp",
|
|
132
|
+
"args": ["--path", "."]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Available tools:
|
|
139
|
+
- `remember` - Store a memory
|
|
140
|
+
- `search` - Semantic search
|
|
141
|
+
- `list_memories` - List with filters
|
|
142
|
+
- `get_memory` - Get by ID
|
|
143
|
+
- `store_doc` - Store document verbatim
|
|
144
|
+
- `forget` - Delete memory
|
|
145
|
+
- `graduate` - Promote branch → app
|
|
146
|
+
- `update_status` - Change memory status
|
|
147
|
+
|
|
148
|
+
## Storage Structure
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
.claude/memory/
|
|
152
|
+
├── app/{component}/ # Graduated app knowledge
|
|
153
|
+
│ └── {id}-{slug}.md
|
|
154
|
+
├── team/ # Team conventions
|
|
155
|
+
│ └── {id}-{slug}.md
|
|
156
|
+
├── users/{username}/ # User preferences
|
|
157
|
+
│ └── {id}-{slug}.md
|
|
158
|
+
└── branches/
|
|
159
|
+
├── {branch-slug}/ # Your branch (tracked in git)
|
|
160
|
+
│ ├── context.md # Session handoff
|
|
161
|
+
│ └── {id}-{slug}.md
|
|
162
|
+
└── {branch}(unmerged)/ # Synced from teammates (gitignored)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Memory Format
|
|
166
|
+
|
|
167
|
+
Memories are markdown files with YAML frontmatter:
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
---
|
|
171
|
+
id: abc123
|
|
172
|
+
namespace: app
|
|
173
|
+
type: architecture
|
|
174
|
+
component: auth
|
|
175
|
+
confidence: high
|
|
176
|
+
status: active
|
|
177
|
+
added: '2026-01-31'
|
|
178
|
+
author: bretwardjames
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
Auth uses JWT tokens with 15-minute expiry for security.
|
|
182
|
+
Sessions are stored in Redis, not cookies.
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Namespaces
|
|
186
|
+
|
|
187
|
+
| Namespace | Purpose |
|
|
188
|
+
|-----------|---------|
|
|
189
|
+
| `app` | How the codebase works (architecture, decisions) |
|
|
190
|
+
| `team` | Team conventions and standards |
|
|
191
|
+
| `user-{name}` | Individual preferences |
|
|
192
|
+
| `branch-{name}` | Work-in-progress context |
|
|
193
|
+
|
|
194
|
+
## Memory Types
|
|
195
|
+
|
|
196
|
+
| Type | Description |
|
|
197
|
+
|------|-------------|
|
|
198
|
+
| `architecture` | System design, patterns |
|
|
199
|
+
| `feature` | How features work |
|
|
200
|
+
| `decision` | Why we chose X over Y |
|
|
201
|
+
| `convention` | Team standards |
|
|
202
|
+
| `pattern` | Reusable approaches |
|
|
203
|
+
| `context` | Session handoff |
|
|
204
|
+
|
|
205
|
+
## Claude Commands
|
|
206
|
+
|
|
207
|
+
After `ragtime install --workspace`:
|
|
208
|
+
|
|
209
|
+
| Command | Purpose |
|
|
210
|
+
|---------|---------|
|
|
211
|
+
| `/remember` | Capture knowledge mid-session |
|
|
212
|
+
| `/recall` | Search memories |
|
|
213
|
+
| `/handoff` | Save session context |
|
|
214
|
+
| `/start` | Resume work on an issue |
|
|
215
|
+
| `/pr-graduate` | Curate branch knowledge after merge |
|
|
216
|
+
| `/audit` | Find duplicates/conflicts |
|
|
217
|
+
|
|
218
|
+
## License
|
|
219
|
+
|
|
220
|
+
MIT
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# ragtime-cli
|
|
2
|
+
|
|
3
|
+
Local-first memory and RAG system for Claude Code. Semantic search over code, docs, and team knowledge.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Memory Storage**: Store structured knowledge with namespaces, types, and metadata
|
|
8
|
+
- **Semantic Search**: Query memories and docs with natural language
|
|
9
|
+
- **Cross-Branch Sync**: Share context with teammates before PRs merge
|
|
10
|
+
- **MCP Server**: Native Claude Code integration
|
|
11
|
+
- **Claude Commands**: Pre-built `/remember`, `/recall`, `/handoff`, `/start` commands
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install ragtime-cli
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Initialize in your project
|
|
23
|
+
ragtime init
|
|
24
|
+
|
|
25
|
+
# Store a memory
|
|
26
|
+
ragtime remember "Auth uses JWT with 15-min expiry" \
|
|
27
|
+
--namespace app \
|
|
28
|
+
--type architecture \
|
|
29
|
+
--component auth
|
|
30
|
+
|
|
31
|
+
# Search memories
|
|
32
|
+
ragtime search "authentication" --namespace app
|
|
33
|
+
|
|
34
|
+
# Install Claude commands
|
|
35
|
+
ragtime install --workspace
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## CLI Commands
|
|
39
|
+
|
|
40
|
+
### Memory Storage
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Store a memory
|
|
44
|
+
ragtime remember "content" --namespace app --type architecture --component auth
|
|
45
|
+
|
|
46
|
+
# List memories
|
|
47
|
+
ragtime memories --namespace app --type decision
|
|
48
|
+
|
|
49
|
+
# Graduate branch memory to app
|
|
50
|
+
ragtime graduate <memory-id>
|
|
51
|
+
|
|
52
|
+
# Delete a memory
|
|
53
|
+
ragtime forget <memory-id>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Search & Indexing
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Index docs
|
|
60
|
+
ragtime index --type docs
|
|
61
|
+
|
|
62
|
+
# Semantic search
|
|
63
|
+
ragtime search "how does auth work" --namespace app --limit 10
|
|
64
|
+
|
|
65
|
+
# Reindex memory files
|
|
66
|
+
ragtime reindex
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Cross-Branch Sync
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Sync teammate's branch memories
|
|
73
|
+
ragtime sync origin/jm/feature-auth
|
|
74
|
+
|
|
75
|
+
# Clean up stale synced folders
|
|
76
|
+
ragtime prune --dry-run
|
|
77
|
+
ragtime prune
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Claude Integration
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Install Claude commands to workspace
|
|
84
|
+
ragtime install --workspace
|
|
85
|
+
|
|
86
|
+
# Install globally
|
|
87
|
+
ragtime install --global
|
|
88
|
+
|
|
89
|
+
# List available commands
|
|
90
|
+
ragtime install --list
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## MCP Server
|
|
94
|
+
|
|
95
|
+
Add to your Claude config (`.mcp.json`):
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"mcpServers": {
|
|
100
|
+
"ragtime": {
|
|
101
|
+
"command": "ragtime-mcp",
|
|
102
|
+
"args": ["--path", "."]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Available tools:
|
|
109
|
+
- `remember` - Store a memory
|
|
110
|
+
- `search` - Semantic search
|
|
111
|
+
- `list_memories` - List with filters
|
|
112
|
+
- `get_memory` - Get by ID
|
|
113
|
+
- `store_doc` - Store document verbatim
|
|
114
|
+
- `forget` - Delete memory
|
|
115
|
+
- `graduate` - Promote branch → app
|
|
116
|
+
- `update_status` - Change memory status
|
|
117
|
+
|
|
118
|
+
## Storage Structure
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
.claude/memory/
|
|
122
|
+
├── app/{component}/ # Graduated app knowledge
|
|
123
|
+
│ └── {id}-{slug}.md
|
|
124
|
+
├── team/ # Team conventions
|
|
125
|
+
│ └── {id}-{slug}.md
|
|
126
|
+
├── users/{username}/ # User preferences
|
|
127
|
+
│ └── {id}-{slug}.md
|
|
128
|
+
└── branches/
|
|
129
|
+
├── {branch-slug}/ # Your branch (tracked in git)
|
|
130
|
+
│ ├── context.md # Session handoff
|
|
131
|
+
│ └── {id}-{slug}.md
|
|
132
|
+
└── {branch}(unmerged)/ # Synced from teammates (gitignored)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Memory Format
|
|
136
|
+
|
|
137
|
+
Memories are markdown files with YAML frontmatter:
|
|
138
|
+
|
|
139
|
+
```markdown
|
|
140
|
+
---
|
|
141
|
+
id: abc123
|
|
142
|
+
namespace: app
|
|
143
|
+
type: architecture
|
|
144
|
+
component: auth
|
|
145
|
+
confidence: high
|
|
146
|
+
status: active
|
|
147
|
+
added: '2026-01-31'
|
|
148
|
+
author: bretwardjames
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
Auth uses JWT tokens with 15-minute expiry for security.
|
|
152
|
+
Sessions are stored in Redis, not cookies.
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Namespaces
|
|
156
|
+
|
|
157
|
+
| Namespace | Purpose |
|
|
158
|
+
|-----------|---------|
|
|
159
|
+
| `app` | How the codebase works (architecture, decisions) |
|
|
160
|
+
| `team` | Team conventions and standards |
|
|
161
|
+
| `user-{name}` | Individual preferences |
|
|
162
|
+
| `branch-{name}` | Work-in-progress context |
|
|
163
|
+
|
|
164
|
+
## Memory Types
|
|
165
|
+
|
|
166
|
+
| Type | Description |
|
|
167
|
+
|------|-------------|
|
|
168
|
+
| `architecture` | System design, patterns |
|
|
169
|
+
| `feature` | How features work |
|
|
170
|
+
| `decision` | Why we chose X over Y |
|
|
171
|
+
| `convention` | Team standards |
|
|
172
|
+
| `pattern` | Reusable approaches |
|
|
173
|
+
| `context` | Session handoff |
|
|
174
|
+
|
|
175
|
+
## Claude Commands
|
|
176
|
+
|
|
177
|
+
After `ragtime install --workspace`:
|
|
178
|
+
|
|
179
|
+
| Command | Purpose |
|
|
180
|
+
|---------|---------|
|
|
181
|
+
| `/remember` | Capture knowledge mid-session |
|
|
182
|
+
| `/recall` | Search memories |
|
|
183
|
+
| `/handoff` | Save session context |
|
|
184
|
+
| `/start` | Resume work on an issue |
|
|
185
|
+
| `/pr-graduate` | Curate branch knowledge after merge |
|
|
186
|
+
| `/audit` | Find duplicates/conflicts |
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
MIT
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "ragtime-cli"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Local-first memory and RAG system for Claude Code - semantic search over code, docs, and team knowledge"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
requires-python = ">=3.11"
|
|
8
|
+
authors = [
|
|
9
|
+
{name = "Bret Martineau", email = "bretwardjames@gmail.com"}
|
|
10
|
+
]
|
|
11
|
+
keywords = ["claude", "rag", "memory", "mcp", "ai", "llm", "semantic-search", "vector-database"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 4 - Beta",
|
|
14
|
+
"Environment :: Console",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Topic :: Software Development :: Documentation",
|
|
21
|
+
"Topic :: Text Processing :: Indexing",
|
|
22
|
+
]
|
|
23
|
+
dependencies = [
|
|
24
|
+
"chromadb>=0.4.0",
|
|
25
|
+
"pyyaml>=6.0",
|
|
26
|
+
"click>=8.0",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.optional-dependencies]
|
|
30
|
+
dev = [
|
|
31
|
+
"pytest>=8.0",
|
|
32
|
+
"ruff>=0.1.0",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://github.com/bretwardjames/ragtime"
|
|
37
|
+
Repository = "https://github.com/bretwardjames/ragtime"
|
|
38
|
+
Issues = "https://github.com/bretwardjames/ragtime/issues"
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
ragtime = "src.cli:main"
|
|
42
|
+
ragtime-mcp = "src.mcp_server:main"
|
|
43
|
+
|
|
44
|
+
[build-system]
|
|
45
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
46
|
+
build-backend = "setuptools.build_meta"
|
|
47
|
+
|
|
48
|
+
[tool.setuptools.packages.find]
|
|
49
|
+
where = ["."]
|
|
50
|
+
include = ["src*"]
|
|
51
|
+
|
|
52
|
+
[tool.setuptools.package-data]
|
|
53
|
+
"src.commands" = ["*.md"]
|
|
54
|
+
|
|
55
|
+
[tool.ruff]
|
|
56
|
+
line-length = 100
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ragtime-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local-first memory and RAG system for Claude Code - semantic search over code, docs, and team knowledge
|
|
5
|
+
Author-email: Bret Martineau <bretwardjames@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/bretwardjames/ragtime
|
|
8
|
+
Project-URL: Repository, https://github.com/bretwardjames/ragtime
|
|
9
|
+
Project-URL: Issues, https://github.com/bretwardjames/ragtime/issues
|
|
10
|
+
Keywords: claude,rag,memory,mcp,ai,llm,semantic-search,vector-database
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
19
|
+
Classifier: Topic :: Text Processing :: Indexing
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: chromadb>=0.4.0
|
|
24
|
+
Requires-Dist: pyyaml>=6.0
|
|
25
|
+
Requires-Dist: click>=8.0
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
28
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# ragtime-cli
|
|
32
|
+
|
|
33
|
+
Local-first memory and RAG system for Claude Code. Semantic search over code, docs, and team knowledge.
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- **Memory Storage**: Store structured knowledge with namespaces, types, and metadata
|
|
38
|
+
- **Semantic Search**: Query memories and docs with natural language
|
|
39
|
+
- **Cross-Branch Sync**: Share context with teammates before PRs merge
|
|
40
|
+
- **MCP Server**: Native Claude Code integration
|
|
41
|
+
- **Claude Commands**: Pre-built `/remember`, `/recall`, `/handoff`, `/start` commands
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install ragtime-cli
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Initialize in your project
|
|
53
|
+
ragtime init
|
|
54
|
+
|
|
55
|
+
# Store a memory
|
|
56
|
+
ragtime remember "Auth uses JWT with 15-min expiry" \
|
|
57
|
+
--namespace app \
|
|
58
|
+
--type architecture \
|
|
59
|
+
--component auth
|
|
60
|
+
|
|
61
|
+
# Search memories
|
|
62
|
+
ragtime search "authentication" --namespace app
|
|
63
|
+
|
|
64
|
+
# Install Claude commands
|
|
65
|
+
ragtime install --workspace
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## CLI Commands
|
|
69
|
+
|
|
70
|
+
### Memory Storage
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Store a memory
|
|
74
|
+
ragtime remember "content" --namespace app --type architecture --component auth
|
|
75
|
+
|
|
76
|
+
# List memories
|
|
77
|
+
ragtime memories --namespace app --type decision
|
|
78
|
+
|
|
79
|
+
# Graduate branch memory to app
|
|
80
|
+
ragtime graduate <memory-id>
|
|
81
|
+
|
|
82
|
+
# Delete a memory
|
|
83
|
+
ragtime forget <memory-id>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Search & Indexing
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Index docs
|
|
90
|
+
ragtime index --type docs
|
|
91
|
+
|
|
92
|
+
# Semantic search
|
|
93
|
+
ragtime search "how does auth work" --namespace app --limit 10
|
|
94
|
+
|
|
95
|
+
# Reindex memory files
|
|
96
|
+
ragtime reindex
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Cross-Branch Sync
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Sync teammate's branch memories
|
|
103
|
+
ragtime sync origin/jm/feature-auth
|
|
104
|
+
|
|
105
|
+
# Clean up stale synced folders
|
|
106
|
+
ragtime prune --dry-run
|
|
107
|
+
ragtime prune
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Claude Integration
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Install Claude commands to workspace
|
|
114
|
+
ragtime install --workspace
|
|
115
|
+
|
|
116
|
+
# Install globally
|
|
117
|
+
ragtime install --global
|
|
118
|
+
|
|
119
|
+
# List available commands
|
|
120
|
+
ragtime install --list
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## MCP Server
|
|
124
|
+
|
|
125
|
+
Add to your Claude config (`.mcp.json`):
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"mcpServers": {
|
|
130
|
+
"ragtime": {
|
|
131
|
+
"command": "ragtime-mcp",
|
|
132
|
+
"args": ["--path", "."]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Available tools:
|
|
139
|
+
- `remember` - Store a memory
|
|
140
|
+
- `search` - Semantic search
|
|
141
|
+
- `list_memories` - List with filters
|
|
142
|
+
- `get_memory` - Get by ID
|
|
143
|
+
- `store_doc` - Store document verbatim
|
|
144
|
+
- `forget` - Delete memory
|
|
145
|
+
- `graduate` - Promote branch → app
|
|
146
|
+
- `update_status` - Change memory status
|
|
147
|
+
|
|
148
|
+
## Storage Structure
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
.claude/memory/
|
|
152
|
+
├── app/{component}/ # Graduated app knowledge
|
|
153
|
+
│ └── {id}-{slug}.md
|
|
154
|
+
├── team/ # Team conventions
|
|
155
|
+
│ └── {id}-{slug}.md
|
|
156
|
+
├── users/{username}/ # User preferences
|
|
157
|
+
│ └── {id}-{slug}.md
|
|
158
|
+
└── branches/
|
|
159
|
+
├── {branch-slug}/ # Your branch (tracked in git)
|
|
160
|
+
│ ├── context.md # Session handoff
|
|
161
|
+
│ └── {id}-{slug}.md
|
|
162
|
+
└── {branch}(unmerged)/ # Synced from teammates (gitignored)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Memory Format
|
|
166
|
+
|
|
167
|
+
Memories are markdown files with YAML frontmatter:
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
---
|
|
171
|
+
id: abc123
|
|
172
|
+
namespace: app
|
|
173
|
+
type: architecture
|
|
174
|
+
component: auth
|
|
175
|
+
confidence: high
|
|
176
|
+
status: active
|
|
177
|
+
added: '2026-01-31'
|
|
178
|
+
author: bretwardjames
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
Auth uses JWT tokens with 15-minute expiry for security.
|
|
182
|
+
Sessions are stored in Redis, not cookies.
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Namespaces
|
|
186
|
+
|
|
187
|
+
| Namespace | Purpose |
|
|
188
|
+
|-----------|---------|
|
|
189
|
+
| `app` | How the codebase works (architecture, decisions) |
|
|
190
|
+
| `team` | Team conventions and standards |
|
|
191
|
+
| `user-{name}` | Individual preferences |
|
|
192
|
+
| `branch-{name}` | Work-in-progress context |
|
|
193
|
+
|
|
194
|
+
## Memory Types
|
|
195
|
+
|
|
196
|
+
| Type | Description |
|
|
197
|
+
|------|-------------|
|
|
198
|
+
| `architecture` | System design, patterns |
|
|
199
|
+
| `feature` | How features work |
|
|
200
|
+
| `decision` | Why we chose X over Y |
|
|
201
|
+
| `convention` | Team standards |
|
|
202
|
+
| `pattern` | Reusable approaches |
|
|
203
|
+
| `context` | Session handoff |
|
|
204
|
+
|
|
205
|
+
## Claude Commands
|
|
206
|
+
|
|
207
|
+
After `ragtime install --workspace`:
|
|
208
|
+
|
|
209
|
+
| Command | Purpose |
|
|
210
|
+
|---------|---------|
|
|
211
|
+
| `/remember` | Capture knowledge mid-session |
|
|
212
|
+
| `/recall` | Search memories |
|
|
213
|
+
| `/handoff` | Save session context |
|
|
214
|
+
| `/start` | Resume work on an issue |
|
|
215
|
+
| `/pr-graduate` | Curate branch knowledge after merge |
|
|
216
|
+
| `/audit` | Find duplicates/conflicts |
|
|
217
|
+
|
|
218
|
+
## License
|
|
219
|
+
|
|
220
|
+
MIT
|