synap 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/.claude/skills/synap-assistant/SKILL.md +476 -0
- package/README.md +200 -0
- package/package.json +50 -0
- package/scripts/postinstall.js +58 -0
- package/src/cli.js +1734 -0
- package/src/deletion-log.js +105 -0
- package/src/preferences.js +175 -0
- package/src/skill-installer.js +175 -0
- package/src/storage.js +803 -0
- package/src/templates/user-preferences-template.md +16 -0
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: synap-assistant
|
|
3
|
+
source: synap-cli
|
|
4
|
+
description: Manage a personal knowledge capture system. Use when the user wants to capture ideas, track todos, organize projects, review their synap, or mentions "synap", "brain dump", "capture this", "add to my list", "what's on my plate", "what should I focus on", or "daily review".
|
|
5
|
+
hash: 9c86041f8c7095822804f47de0b68715
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# synap Assistant
|
|
9
|
+
|
|
10
|
+
A CLI for externalizing your working memory - capture ideas, projects, features, todos, and questions without the overhead of complex tools.
|
|
11
|
+
|
|
12
|
+
## Why?
|
|
13
|
+
|
|
14
|
+
Your brain is for having ideas, not holding them. But sticky notes get lost, notepads pile up unread, and tools like Asana are overkill for personal capture.
|
|
15
|
+
|
|
16
|
+
**synap** solves this by providing:
|
|
17
|
+
- **Zero-friction capture** - dump thoughts in seconds
|
|
18
|
+
- **Structured retrieval** - find anything with search and filters
|
|
19
|
+
- **AI-assisted triage** - agents help you organize, prioritize, and act
|
|
20
|
+
|
|
21
|
+
## Agent Mindset
|
|
22
|
+
|
|
23
|
+
When assisting users with their synap entries:
|
|
24
|
+
|
|
25
|
+
1. **Capture first, organize later** - Never block on classification during fast capture. Get the thought out, refine later.
|
|
26
|
+
|
|
27
|
+
2. **Proactive triage** - Regularly surface raw entries needing processing. Don't let the inbox grow stale.
|
|
28
|
+
|
|
29
|
+
3. **Connect the dots** - Link related entries, identify patterns, consolidate ideas into projects.
|
|
30
|
+
|
|
31
|
+
4. **Reduce cognitive load** - Present summaries and prioritized lists, not exhaustive dumps.
|
|
32
|
+
|
|
33
|
+
5. **Preserve context** - Include enough detail for future recall. A cryptic note is useless later.
|
|
34
|
+
|
|
35
|
+
6. **Respect simplicity** - Simple thoughts don't need tags, priorities, and parents. Don't over-engineer.
|
|
36
|
+
|
|
37
|
+
## User Preferences (Memory)
|
|
38
|
+
|
|
39
|
+
synap stores long-term user preferences at `~/.config/synap/user-preferences.md`.
|
|
40
|
+
|
|
41
|
+
- Read preferences at the start of a session when present.
|
|
42
|
+
- Append stable, reusable preferences with `synap preferences --append "## Section" "..."`.
|
|
43
|
+
- Avoid overwriting user-written content; prefer section-based appends.
|
|
44
|
+
|
|
45
|
+
## Operating Modes
|
|
46
|
+
|
|
47
|
+
Detect user intent and respond appropriately:
|
|
48
|
+
|
|
49
|
+
| Mode | Triggers | Behavior |
|
|
50
|
+
|------|----------|----------|
|
|
51
|
+
| **Capture** | "Add this...", "Remind me...", "I had an idea..." | Fast capture, minimal questions, default to idea type |
|
|
52
|
+
| **Review** | "What's on my plate?", "Daily review", "Show me..." | Stats + prioritized summary, grouped by type |
|
|
53
|
+
| **Triage** | "Process my synap", "Process my brain dump", "What needs attention?" | Surface raw entries, help classify and prioritize |
|
|
54
|
+
| **Focus** | "What should I work on?", "Priority items" | P1 todos + active projects, clear next actions |
|
|
55
|
+
| **Cleanup** | "Archive completed", "Clean up old stuff" | Bulk operations with preview and confirmation |
|
|
56
|
+
|
|
57
|
+
### Volume Modes (Quick vs Deep)
|
|
58
|
+
|
|
59
|
+
| Mode | Trigger | Behavior |
|
|
60
|
+
|------|---------|----------|
|
|
61
|
+
| **Quick** | <10 entries returned | Direct answers, lightweight summaries, minimal batching |
|
|
62
|
+
| **Deep** | 10+ entries returned | Summarize first, propose batches, confirm before bulk actions |
|
|
63
|
+
|
|
64
|
+
## Quick Start
|
|
65
|
+
|
|
66
|
+
| Task | Command |
|
|
67
|
+
|------|---------|
|
|
68
|
+
| Capture idea | `synap add "your thought here"` |
|
|
69
|
+
| Add todo | `synap todo "task description"` |
|
|
70
|
+
| Add question | `synap question "what you're wondering"` |
|
|
71
|
+
| List active | `synap list` |
|
|
72
|
+
| See all | `synap list --all` |
|
|
73
|
+
| Search | `synap search "keyword"` |
|
|
74
|
+
| Show details | `synap show <id>` |
|
|
75
|
+
| Mark done | `synap done <id>` |
|
|
76
|
+
| Get stats | `synap stats` |
|
|
77
|
+
| Setup wizard | `synap setup` |
|
|
78
|
+
| Edit preferences | `synap preferences --edit` |
|
|
79
|
+
|
|
80
|
+
## Pre-flight Check
|
|
81
|
+
|
|
82
|
+
Before operations, verify the tool is ready:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
synap --version # Verify installed
|
|
86
|
+
synap stats # Quick health check
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If `synap: command not found`, the user needs to install: `npm install -g synap`
|
|
90
|
+
|
|
91
|
+
## Command Reference
|
|
92
|
+
|
|
93
|
+
### Capture Commands
|
|
94
|
+
|
|
95
|
+
#### `synap add <content>`
|
|
96
|
+
Quick capture of a thought.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
synap add "What if we used a graph database?"
|
|
100
|
+
synap add "Need to review the API design" --type todo --priority 1
|
|
101
|
+
synap add "Meeting notes from standup" --type note --tags "meetings,weekly"
|
|
102
|
+
synap add --type project --title "Website Redesign" "Complete overhaul of the marketing site..."
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Options**:
|
|
106
|
+
- `--type <type>`: idea, project, feature, todo, question, reference, note (default: idea)
|
|
107
|
+
- `--title <title>`: Short title (auto-extracted from first line if not provided)
|
|
108
|
+
- `--priority <1|2|3>`: 1=high, 2=medium, 3=low
|
|
109
|
+
- `--tags <tags>`: Comma-separated tags
|
|
110
|
+
- `--parent <id>`: Parent entry ID
|
|
111
|
+
- `--json`: JSON output
|
|
112
|
+
|
|
113
|
+
#### `synap todo <content>`
|
|
114
|
+
Shorthand for adding a todo.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
synap todo "Review PR #42"
|
|
118
|
+
# Equivalent to: synap add "Review PR #42" --type todo
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### `synap question <content>`
|
|
122
|
+
Shorthand for adding a question.
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
synap question "Should we migrate to TypeScript?"
|
|
126
|
+
# Equivalent to: synap add "..." --type question
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Query Commands
|
|
130
|
+
|
|
131
|
+
#### `synap list`
|
|
132
|
+
List entries with filtering.
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
synap list # Active + raw (default)
|
|
136
|
+
synap list --all # All except archived
|
|
137
|
+
synap list --type todo # Only todos
|
|
138
|
+
synap list --status raw # Needs triage
|
|
139
|
+
synap list --priority 1 # High priority only
|
|
140
|
+
synap list --tags work,urgent # Has ALL specified tags
|
|
141
|
+
synap list --since 7d # Created in last 7 days
|
|
142
|
+
synap list --json # JSON output for parsing
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Options**:
|
|
146
|
+
- `--type <type>`: Filter by entry type
|
|
147
|
+
- `--status <status>`: raw, active, someday, done, archived (default: raw,active)
|
|
148
|
+
- `--tags <tags>`: Comma-separated, AND logic
|
|
149
|
+
- `--priority <1|2|3>`: Filter by priority
|
|
150
|
+
- `--parent <id>`: Children of specific entry
|
|
151
|
+
- `--orphans`: Only entries without parent
|
|
152
|
+
- `--since <duration>`: e.g., 7d, 24h, 2w
|
|
153
|
+
- `--all`: All statuses except archived
|
|
154
|
+
- `--done`: Include done entries
|
|
155
|
+
- `--archived`: Show only archived
|
|
156
|
+
- `--limit <n>`: Max entries (default: 50)
|
|
157
|
+
- `--sort <field>`: created, updated, priority
|
|
158
|
+
- `--reverse`: Reverse sort order
|
|
159
|
+
- `--json`: JSON output
|
|
160
|
+
|
|
161
|
+
#### `synap show <id>`
|
|
162
|
+
Show full entry details.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
synap show a1b2c3d4
|
|
166
|
+
synap show a1b2c3d4 --with-children
|
|
167
|
+
synap show a1b2c3d4 --with-related
|
|
168
|
+
synap show a1b2c3d4 --json
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
#### `synap search <query>`
|
|
172
|
+
Full-text search across content and titles.
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
synap search "database"
|
|
176
|
+
synap search "meeting" --type note --since 30d
|
|
177
|
+
synap search "API" --json
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Modify Commands
|
|
181
|
+
|
|
182
|
+
#### `synap edit <id>`
|
|
183
|
+
Edit entry content.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
synap edit a1b2c3d4 # Opens $EDITOR
|
|
187
|
+
synap edit a1b2c3d4 --content "New text" # Non-interactive
|
|
188
|
+
synap edit a1b2c3d4 --append "Follow-up" # Add to existing
|
|
189
|
+
synap edit a1b2c3d4 --title "New title"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### `synap set <id>`
|
|
193
|
+
Update entry metadata.
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
synap set a1b2c3d4 --type project
|
|
197
|
+
synap set a1b2c3d4 --status active
|
|
198
|
+
synap set a1b2c3d4 --priority 1
|
|
199
|
+
synap set a1b2c3d4 --tags "work,Q1"
|
|
200
|
+
synap set a1b2c3d4 --add-tags "important"
|
|
201
|
+
synap set a1b2c3d4 --remove-tags "draft"
|
|
202
|
+
synap set a1b2c3d4 --clear-priority
|
|
203
|
+
synap set a1b2c3d4 --parent b2c3d4e5
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
#### `synap link <id1> <id2>`
|
|
207
|
+
Create relationships between entries.
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
synap link a1b2c3d4 b2c3d4e5 # Add to related
|
|
211
|
+
synap link a1b2c3d4 b2c3d4e5 --as-parent # Set hierarchy
|
|
212
|
+
synap link a1b2c3d4 b2c3d4e5 --unlink # Remove relationship
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Bulk Commands
|
|
216
|
+
|
|
217
|
+
#### `synap done <ids...>`
|
|
218
|
+
Mark entries as done.
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
synap done a1b2c3d4
|
|
222
|
+
synap done a1b2c3d4 b2c3d4e5 c3d4e5f6 # Multiple
|
|
223
|
+
synap done --type todo --tags "sprint-1" # By filter
|
|
224
|
+
synap done --dry-run --type todo # Preview first
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
#### `synap archive <ids...>`
|
|
228
|
+
Archive entries (hides from default view).
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
synap archive a1b2c3d4
|
|
232
|
+
synap archive --status done --since 30d # Old completed items
|
|
233
|
+
synap archive --dry-run --status done # Preview
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
#### `synap delete <ids...>`
|
|
237
|
+
Delete entries (logged for undo).
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
synap delete a1b2c3d4
|
|
241
|
+
synap delete a1b2c3d4 b2c3d4e5 --confirm
|
|
242
|
+
synap delete --status archived --since 90d # Permanent cleanup
|
|
243
|
+
synap delete --dry-run --type reference # Preview
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Safety**:
|
|
247
|
+
- All deletions logged to enable restore
|
|
248
|
+
- >10 entries requires `--confirm` or `--force`
|
|
249
|
+
- Entries with children require `--force`
|
|
250
|
+
|
|
251
|
+
#### `synap restore`
|
|
252
|
+
Restore deleted entries.
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
synap restore --last 1 # Most recent
|
|
256
|
+
synap restore --last 5 # Last 5
|
|
257
|
+
synap restore --ids a1b2c3d4,b2c3d4e5 # Specific IDs
|
|
258
|
+
synap restore --list # Show deletion log
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Maintenance Commands
|
|
262
|
+
|
|
263
|
+
#### `synap stats`
|
|
264
|
+
Overview statistics.
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
synap stats
|
|
268
|
+
synap stats --json
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
#### `synap export`
|
|
272
|
+
Export entries.
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
synap export # All to stdout
|
|
276
|
+
synap export --file backup.json # To file
|
|
277
|
+
synap export --type todo --status active # Filtered
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
#### `synap import <file>`
|
|
281
|
+
Import entries.
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
synap import backup.json
|
|
285
|
+
synap import backup.json --dry-run
|
|
286
|
+
synap import backup.json --merge # Update existing + add new
|
|
287
|
+
synap import backup.json --skip-existing # Only add new
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Workflow Patterns
|
|
291
|
+
|
|
292
|
+
### Daily Review
|
|
293
|
+
|
|
294
|
+
Run this each morning to get oriented:
|
|
295
|
+
|
|
296
|
+
1. **Health check**: `synap stats`
|
|
297
|
+
2. **Triage raw entries**: `synap list --status raw`
|
|
298
|
+
3. **Focus list**: `synap list --priority 1 --type todo`
|
|
299
|
+
4. **Help user decide** what to work on first
|
|
300
|
+
|
|
301
|
+
### Weekly Review
|
|
302
|
+
|
|
303
|
+
Run this weekly to maintain hygiene:
|
|
304
|
+
|
|
305
|
+
1. **Celebrate**: `synap list --done --since 7d` - show what was accomplished
|
|
306
|
+
2. **Check stalled**: `synap list --status active --sort updated` - find items not touched
|
|
307
|
+
3. **Review projects**: `synap list --type project` - are they progressing?
|
|
308
|
+
4. **Clean up**: `synap archive --status done --since 7d` - archive completed items
|
|
309
|
+
|
|
310
|
+
### Triage Workflow
|
|
311
|
+
|
|
312
|
+
When user has many raw entries:
|
|
313
|
+
|
|
314
|
+
1. **Fetch**: `synap list --status raw --json`
|
|
315
|
+
2. **For each entry**, determine:
|
|
316
|
+
- Type (idea, todo, project, question, reference, note)
|
|
317
|
+
- Priority (1, 2, 3, or none)
|
|
318
|
+
- Tags (infer from content)
|
|
319
|
+
- Parent (if belongs to existing project/feature)
|
|
320
|
+
3. **Update**: `synap set <id> --type todo --priority 1 --tags "work"`
|
|
321
|
+
4. **If entry is actually multiple items**, split and re-capture
|
|
322
|
+
5. **Mark refined**: `synap set <id> --status active`
|
|
323
|
+
|
|
324
|
+
### Capture Mode
|
|
325
|
+
|
|
326
|
+
When user is dumping thoughts rapidly:
|
|
327
|
+
|
|
328
|
+
1. Just capture with `synap add "..."` - don't interrupt for classification
|
|
329
|
+
2. Use default type (idea) and status (raw)
|
|
330
|
+
3. After the capture session, offer to triage
|
|
331
|
+
|
|
332
|
+
## Classification Rules
|
|
333
|
+
|
|
334
|
+
### Type Detection Heuristics
|
|
335
|
+
|
|
336
|
+
| Indicator | Likely Type |
|
|
337
|
+
|-----------|-------------|
|
|
338
|
+
| Starts with action verb ("Build", "Write", "Fix", "Review") | `todo` |
|
|
339
|
+
| Contains "?" or seeking information | `question` |
|
|
340
|
+
| Multi-step initiative, long-term scope | `project` |
|
|
341
|
+
| Specific capability/enhancement within a project | `feature` |
|
|
342
|
+
| Link, quote, or factual information | `reference` |
|
|
343
|
+
| Observation with no clear action | `note` |
|
|
344
|
+
| Speculative, "what if", creative | `idea` |
|
|
345
|
+
|
|
346
|
+
### Priority Assignment
|
|
347
|
+
|
|
348
|
+
| Priority | Criteria |
|
|
349
|
+
|----------|----------|
|
|
350
|
+
| P1 (high) | Blocking other work, deadline within 48h, explicitly urgent |
|
|
351
|
+
| P2 (medium) | Important but not urgent, this-week scope |
|
|
352
|
+
| P3 (low) | Nice-to-have, someday-maybe, learning/exploration |
|
|
353
|
+
| None | Truly unprioritized, needs triage |
|
|
354
|
+
|
|
355
|
+
## Safety Rules
|
|
356
|
+
|
|
357
|
+
**Non-negotiable constraints**:
|
|
358
|
+
|
|
359
|
+
1. **Never auto-delete** - Always show what will be deleted and confirm
|
|
360
|
+
2. **Preserve context** - Don't summarize away important details during capture
|
|
361
|
+
3. **Log before delete** - All deletions are recoverable via `synap restore`
|
|
362
|
+
4. **Confirm bulk operations** - Operations affecting >10 entries require confirmation
|
|
363
|
+
5. **Don't over-organize** - Simple thoughts don't need tags, priorities, and parents
|
|
364
|
+
|
|
365
|
+
## Proactive Recommendation Patterns
|
|
366
|
+
|
|
367
|
+
- If raw entries are piling up, suggest `synap triage`.
|
|
368
|
+
- If P1 todos exist, suggest `synap focus`.
|
|
369
|
+
- If many stale active items exist, suggest a weekly review.
|
|
370
|
+
- If preferences specify cadence, follow it by default.
|
|
371
|
+
|
|
372
|
+
## Batch Processing Protocols
|
|
373
|
+
|
|
374
|
+
- Filters are for discovery; use IDs for execution.
|
|
375
|
+
- Keep batches small (10-25 items) and confirm between batches.
|
|
376
|
+
- Use `--dry-run` whenever available before bulk changes.
|
|
377
|
+
|
|
378
|
+
## Two-Step Pattern for Bulk Operations
|
|
379
|
+
|
|
380
|
+
Critical for preventing accidental mass changes:
|
|
381
|
+
|
|
382
|
+
1. **Preview**: `synap delete --status archived --since 90d --dry-run`
|
|
383
|
+
2. **Confirm**: Show user what will be affected, get explicit approval
|
|
384
|
+
3. **Execute**: `synap delete --ids "<specific-ids>" --confirm`
|
|
385
|
+
|
|
386
|
+
**Principle**: Filters are for DISCOVERY, IDs are for EXECUTION.
|
|
387
|
+
|
|
388
|
+
## Common Request Patterns
|
|
389
|
+
|
|
390
|
+
| User Says | Interpretation | Action |
|
|
391
|
+
|-----------|----------------|--------|
|
|
392
|
+
| "Add this to my synap" | Fast capture | `synap add "<content>"` |
|
|
393
|
+
| "I need to remember to..." | Todo item | `synap todo "<content>"` |
|
|
394
|
+
| "What's on my plate?" | Need overview | `synap stats` + `synap list --priority 1` |
|
|
395
|
+
| "What should I focus on?" | Need priorities | `synap list --priority 1 --type todo` |
|
|
396
|
+
| "Process my synap" | Triage needed | Run triage workflow on raw entries |
|
|
397
|
+
| "This is done" / "I finished X" | Mark complete | `synap done <id>` |
|
|
398
|
+
| "Archive old stuff" | Cleanup | `synap archive --status done --since 30d` |
|
|
399
|
+
| "What did I do this week?" | Review completions | `synap list --done --since 7d` |
|
|
400
|
+
| "Find anything about X" | Search | `synap search "X"` |
|
|
401
|
+
| "Link these together" | Create relationship | `synap link <id1> <id2>` |
|
|
402
|
+
|
|
403
|
+
## Troubleshooting
|
|
404
|
+
|
|
405
|
+
| Problem | Solution |
|
|
406
|
+
|---------|----------|
|
|
407
|
+
| `synap: command not found` | Run `npm install -g synap` |
|
|
408
|
+
| Empty synap | Start with `synap add "My first thought"` |
|
|
409
|
+
| Too many raw entries | Run triage workflow |
|
|
410
|
+
| Can't find entry | Use `synap search "<keyword>"` |
|
|
411
|
+
| Accidentally deleted | Use `synap restore --last 1` |
|
|
412
|
+
| Wrong type/status | Use `synap set <id> --type <type> --status <status>` |
|
|
413
|
+
|
|
414
|
+
## Testing / Evaluation Scenarios
|
|
415
|
+
|
|
416
|
+
| Scenario | Expected Behavior | Failure Indicator |
|
|
417
|
+
|----------|-------------------|-------------------|
|
|
418
|
+
| User says "capture this" | Immediate `synap add`, no questions | Asking for type/priority during fast capture |
|
|
419
|
+
| User says "what's on my plate" | Stats + prioritized summary | Listing all 50 entries individually |
|
|
420
|
+
| User says "clean up" | Preview + confirmation | Auto-archiving without preview |
|
|
421
|
+
| Large deletion (>10 items) | Show count, ask confirmation | Proceeding without confirmation |
|
|
422
|
+
| User mentions deadline | Suggest P1 priority | Not detecting urgency |
|
|
423
|
+
| User's idea relates to existing project | Suggest linking | Not checking for related entries |
|
|
424
|
+
|
|
425
|
+
## JSON Output Schemas
|
|
426
|
+
|
|
427
|
+
### Entry Object
|
|
428
|
+
|
|
429
|
+
```json
|
|
430
|
+
{
|
|
431
|
+
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
432
|
+
"content": "The full text of the entry",
|
|
433
|
+
"title": "Short title (optional)",
|
|
434
|
+
"type": "idea|project|feature|todo|question|reference|note",
|
|
435
|
+
"status": "raw|active|someday|done|archived",
|
|
436
|
+
"priority": 1|2|3|null,
|
|
437
|
+
"tags": ["tag1", "tag2"],
|
|
438
|
+
"parent": "parent-id|null",
|
|
439
|
+
"related": ["id1", "id2"],
|
|
440
|
+
"createdAt": "2026-01-05T08:30:00.000Z",
|
|
441
|
+
"updatedAt": "2026-01-05T08:30:00.000Z",
|
|
442
|
+
"source": "cli|agent|import"
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
### List Response
|
|
447
|
+
|
|
448
|
+
```json
|
|
449
|
+
{
|
|
450
|
+
"success": true,
|
|
451
|
+
"entries": [...],
|
|
452
|
+
"total": 47,
|
|
453
|
+
"returned": 12,
|
|
454
|
+
"query": {
|
|
455
|
+
"status": ["raw", "active"],
|
|
456
|
+
"limit": 50
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### Error Response
|
|
462
|
+
|
|
463
|
+
```json
|
|
464
|
+
{
|
|
465
|
+
"success": false,
|
|
466
|
+
"error": "Entry not found: a1b2c3d4",
|
|
467
|
+
"code": "ENTRY_NOT_FOUND"
|
|
468
|
+
}
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
## Remember
|
|
472
|
+
|
|
473
|
+
- The goal is to **externalize working memory**, not build a perfect system
|
|
474
|
+
- Capture is king - never block a capture
|
|
475
|
+
- Structure serves retrieval, not organizational perfection
|
|
476
|
+
- The best system is one that gets used
|
package/README.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# synap
|
|
2
|
+
|
|
3
|
+
A CLI for externalizing your working memory - capture ideas, projects, features, todos, and questions.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/synap)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Quick Capture** - Add ideas, todos, projects, and questions with minimal friction
|
|
12
|
+
- **Agent-Ready** - Built-in `--json` flag for AI agent integration
|
|
13
|
+
- **Hierarchical Organization** - Link entries as parent/child relationships
|
|
14
|
+
- **Full-Text Search** - Search content and tags across all entries
|
|
15
|
+
- **Import/Export** - Backup and restore your data in JSON or CSV format
|
|
16
|
+
- **Claude Code Integration** - Bundled skill teaches AI agents how to use the tool
|
|
17
|
+
- **Safe Deletions** - All deletions are logged and reversible with `restore`
|
|
18
|
+
- **User Preferences (Memory)** - Store agent-readable preferences for consistent behavior
|
|
19
|
+
- **Setup Wizard** - Guided first-run experience for new installs
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g synap
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Capture thoughts quickly
|
|
31
|
+
synap add "Research state management options for the new app"
|
|
32
|
+
synap todo "Review PR #42 before standup"
|
|
33
|
+
synap idea "What if we added dark mode?"
|
|
34
|
+
synap question "How does the auth flow work?"
|
|
35
|
+
|
|
36
|
+
# See what needs attention
|
|
37
|
+
synap focus # P1 todos + active projects
|
|
38
|
+
synap list --status raw # Unprocessed entries
|
|
39
|
+
|
|
40
|
+
# Organize and complete
|
|
41
|
+
synap set abc123 --status active --priority 1
|
|
42
|
+
synap done abc123
|
|
43
|
+
|
|
44
|
+
# Search and explore
|
|
45
|
+
synap search "auth"
|
|
46
|
+
synap tree # Hierarchical view
|
|
47
|
+
|
|
48
|
+
# First-run setup
|
|
49
|
+
synap setup
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Commands
|
|
53
|
+
|
|
54
|
+
| Command | Description |
|
|
55
|
+
|---------|-------------|
|
|
56
|
+
| `synap add <text>` | Quick capture (defaults to idea) |
|
|
57
|
+
| `synap todo <text>` | Add a todo |
|
|
58
|
+
| `synap question <text>` | Add a question |
|
|
59
|
+
| `synap idea <text>` | Add an idea |
|
|
60
|
+
| `synap project <text>` | Add a project |
|
|
61
|
+
| `synap feature <text>` | Add a feature |
|
|
62
|
+
| `synap note <text>` | Add a note |
|
|
63
|
+
| `synap ref <text>` | Add a reference |
|
|
64
|
+
| `synap list` | List entries (with filters) |
|
|
65
|
+
| `synap show <id>` | Show entry details |
|
|
66
|
+
| `synap search <query>` | Full-text search |
|
|
67
|
+
| `synap edit <id>` | Edit entry content |
|
|
68
|
+
| `synap set <id>` | Update entry metadata |
|
|
69
|
+
| `synap link <id1> <id2>` | Link entries together |
|
|
70
|
+
| `synap done <id>` | Mark entry as done |
|
|
71
|
+
| `synap archive <id>` | Archive entry |
|
|
72
|
+
| `synap delete <id>` | Delete entry (logged) |
|
|
73
|
+
| `synap restore` | Restore deleted entries |
|
|
74
|
+
| `synap export` | Export entries to file |
|
|
75
|
+
| `synap import <file>` | Import entries from file |
|
|
76
|
+
| `synap stats` | Show statistics |
|
|
77
|
+
| `synap tree [id]` | Hierarchical view |
|
|
78
|
+
| `synap focus` | P1 todos + active projects |
|
|
79
|
+
| `synap review [daily\|weekly]` | Guided review session |
|
|
80
|
+
| `synap triage` | Interactive raw entry processing |
|
|
81
|
+
| `synap config [key] [value]` | View/update configuration |
|
|
82
|
+
| `synap tags` | List all tags with counts |
|
|
83
|
+
| `synap tags rename <old> <new>` | Rename tag across entries |
|
|
84
|
+
| `synap install-skill` | Install Claude Code skill |
|
|
85
|
+
| `synap preferences` | View or update user preferences |
|
|
86
|
+
| `synap setup` | Guided first-run wizard |
|
|
87
|
+
|
|
88
|
+
Run `synap <command> --help` for detailed options.
|
|
89
|
+
|
|
90
|
+
### Filtering Examples
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# By type and status
|
|
94
|
+
synap list --type todo --status active
|
|
95
|
+
synap list --not-type reference
|
|
96
|
+
|
|
97
|
+
# By tags
|
|
98
|
+
synap list --tags work,urgent
|
|
99
|
+
synap list --any-tags work,personal # OR logic
|
|
100
|
+
synap list --not-tags archived
|
|
101
|
+
|
|
102
|
+
# By date
|
|
103
|
+
synap list --since 7d # Last 7 days
|
|
104
|
+
synap list --before 30d # Older than 30 days
|
|
105
|
+
synap list --between 2025-01-01,2025-01-31
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Configuration
|
|
109
|
+
|
|
110
|
+
Configuration is stored at `~/.config/synap/config.json`.
|
|
111
|
+
|
|
112
|
+
| Key | Default | Description |
|
|
113
|
+
|-----|---------|-------------|
|
|
114
|
+
| `defaultType` | `idea` | Default type for `synap add` |
|
|
115
|
+
| `defaultTags` | `[]` | Tags automatically added to new entries |
|
|
116
|
+
| `editor` | `$EDITOR` | Editor for `synap edit` |
|
|
117
|
+
| `dateFormat` | `relative` | Display format: `relative`, `absolute`, or `locale` |
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# View all config
|
|
121
|
+
synap config
|
|
122
|
+
|
|
123
|
+
# Set a value
|
|
124
|
+
synap config defaultType todo
|
|
125
|
+
synap config dateFormat absolute
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Claude Code Integration
|
|
129
|
+
|
|
130
|
+
This CLI includes a skill that teaches Claude Code how to use synap effectively.
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Install the skill
|
|
134
|
+
synap install-skill
|
|
135
|
+
|
|
136
|
+
# Uninstall
|
|
137
|
+
synap install-skill --uninstall
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Once installed, Claude Code can help you:
|
|
141
|
+
- Capture ideas from conversations
|
|
142
|
+
- Review and triage your entries
|
|
143
|
+
- Organize projects hierarchically
|
|
144
|
+
- Generate daily/weekly reviews
|
|
145
|
+
- Follow your saved preferences from `synap preferences`
|
|
146
|
+
|
|
147
|
+
## User Preferences (Memory)
|
|
148
|
+
|
|
149
|
+
Preferences are stored at `~/.config/synap/user-preferences.md` and are readable by agents.
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# View preferences
|
|
153
|
+
synap preferences
|
|
154
|
+
|
|
155
|
+
# Edit in $EDITOR
|
|
156
|
+
synap preferences --edit
|
|
157
|
+
|
|
158
|
+
# Append to a section
|
|
159
|
+
synap preferences --append "## About Me" "I prefer concise summaries."
|
|
160
|
+
|
|
161
|
+
# Reset to template
|
|
162
|
+
synap preferences --reset
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Data Storage
|
|
166
|
+
|
|
167
|
+
All data is stored locally at `~/.config/synap/`:
|
|
168
|
+
|
|
169
|
+
| File | Description |
|
|
170
|
+
|------|-------------|
|
|
171
|
+
| `entries.json` | Active entries |
|
|
172
|
+
| `archive.json` | Archived entries |
|
|
173
|
+
| `deletion-log.json` | Audit log for restore capability |
|
|
174
|
+
| `config.json` | User configuration |
|
|
175
|
+
| `user-preferences.md` | Agent-readable preferences |
|
|
176
|
+
|
|
177
|
+
## Development
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Clone and install
|
|
181
|
+
git clone https://github.com/yourusername/synap-cli.git
|
|
182
|
+
cd synap-cli
|
|
183
|
+
npm install
|
|
184
|
+
|
|
185
|
+
# Run locally
|
|
186
|
+
node src/cli.js <command>
|
|
187
|
+
|
|
188
|
+
# Run tests
|
|
189
|
+
npm test # Watch mode
|
|
190
|
+
npm run test:run # Single run
|
|
191
|
+
|
|
192
|
+
# Link for global use during development
|
|
193
|
+
npm link
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Requirements:** Node.js >= 18.0.0
|
|
197
|
+
|
|
198
|
+
## License
|
|
199
|
+
|
|
200
|
+
MIT
|