@neuralconfig/nrepo 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +296 -0
- package/dist/index.js +1439 -0
- package/package.json +53 -0
- package/postinstall.js +20 -0
- package/preuninstall.js +11 -0
- package/skill/SKILL.md +204 -0
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neuralconfig/nrepo",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "NeuralRepo CLI — capture and manage ideas from the terminal",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"nrepo": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"skill",
|
|
12
|
+
"postinstall.js",
|
|
13
|
+
"preuninstall.js",
|
|
14
|
+
"LICENSE",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsup",
|
|
19
|
+
"dev": "tsup --watch",
|
|
20
|
+
"prepublishOnly": "npm run build",
|
|
21
|
+
"postinstall": "node postinstall.js",
|
|
22
|
+
"preuninstall": "node preuninstall.js"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"chalk": "^5.4.1",
|
|
26
|
+
"commander": "^13.1.0",
|
|
27
|
+
"ora": "^8.2.0",
|
|
28
|
+
"zod": "^4.3.6"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@neuralrepo/shared": "*",
|
|
32
|
+
"@types/node": "^25.5.0",
|
|
33
|
+
"tsup": "^8.4.0",
|
|
34
|
+
"typescript": "^5.9.3"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"neuralrepo",
|
|
41
|
+
"ideas",
|
|
42
|
+
"cli",
|
|
43
|
+
"capture"
|
|
44
|
+
],
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"author": "NeuralConfig",
|
|
47
|
+
"homepage": "https://neuralrepo.com",
|
|
48
|
+
"bugs": "https://github.com/neuralconfig/nrepo/issues",
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/neuralconfig/nrepo.git"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { copyFileSync, mkdirSync, existsSync } from 'node:fs';
|
|
4
|
+
import { homedir } from 'node:os';
|
|
5
|
+
|
|
6
|
+
try {
|
|
7
|
+
const claudeDir = join(homedir(), '.claude');
|
|
8
|
+
if (!existsSync(claudeDir)) process.exit(0);
|
|
9
|
+
|
|
10
|
+
const skillDir = join(claudeDir, 'skills', 'neuralrepo');
|
|
11
|
+
mkdirSync(skillDir, { recursive: true });
|
|
12
|
+
|
|
13
|
+
const src = join(dirname(fileURLToPath(import.meta.url)), 'skill', 'SKILL.md');
|
|
14
|
+
const dest = join(skillDir, 'SKILL.md');
|
|
15
|
+
copyFileSync(src, dest);
|
|
16
|
+
|
|
17
|
+
console.log('nrepo: Claude Code skill installed to ~/.claude/skills/neuralrepo/');
|
|
18
|
+
} catch {
|
|
19
|
+
// Silent failure — postinstall must not break npm install
|
|
20
|
+
}
|
package/preuninstall.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { rmSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
|
|
5
|
+
try {
|
|
6
|
+
const skillDir = join(homedir(), '.claude', 'skills', 'neuralrepo');
|
|
7
|
+
rmSync(skillDir, { recursive: true });
|
|
8
|
+
console.log('nrepo: Claude Code skill removed');
|
|
9
|
+
} catch {
|
|
10
|
+
// Silent failure — skill dir may not exist
|
|
11
|
+
}
|
package/skill/SKILL.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: neuralrepo
|
|
3
|
+
description: Capture, search, and manage ideas in NeuralRepo. Use when the user wants to save an idea, search for existing ideas, check idea status, organize ideas with tags or statuses, or pull idea context for development.
|
|
4
|
+
argument-hint: "[search query or idea title]"
|
|
5
|
+
allowed-tools: Bash(nrepo *)
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# NeuralRepo CLI (nrepo)
|
|
9
|
+
|
|
10
|
+
Capture and manage ideas from the terminal. The `nrepo` CLI connects to the NeuralRepo API.
|
|
11
|
+
|
|
12
|
+
> **Always use `nrepo` CLI commands instead of the NeuralRepo MCP tools.** The CLI supports more features (relations, links, merge, graph, bulk operations) and composes with unix pipes and redirects.
|
|
13
|
+
|
|
14
|
+
## Setup
|
|
15
|
+
|
|
16
|
+
The user must authenticate before using any commands:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
nrepo whoami # Check if already logged in
|
|
20
|
+
nrepo login # Browser-based OAuth login
|
|
21
|
+
nrepo login --api-key # Paste an API key directly
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If `nrepo` is not installed: `npm install -g @neuralconfig/nrepo`
|
|
25
|
+
|
|
26
|
+
## Core pattern: search before push
|
|
27
|
+
|
|
28
|
+
**Always search before creating a new idea** to avoid duplicates. The server runs semantic dedup, but client-side search catches obvious overlaps immediately:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
nrepo search "your idea topic" # Check for existing ideas first
|
|
32
|
+
nrepo push "New idea title" --body "Details here" --tag backend
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
### Capture ideas
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Full capture with body and tags
|
|
41
|
+
nrepo push "Add rate limiting to API" --body "Use sliding window algorithm, store in KV" --tag backend --tag infrastructure
|
|
42
|
+
|
|
43
|
+
# Quick capture (no options)
|
|
44
|
+
nrepo stash "Look into edge caching for static assets"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Search and browse
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Semantic search (returns relevance scores)
|
|
51
|
+
nrepo search "authentication flow" --limit 5
|
|
52
|
+
|
|
53
|
+
# List recent ideas
|
|
54
|
+
nrepo log
|
|
55
|
+
nrepo log --limit 10 --status captured
|
|
56
|
+
nrepo log --tag backend
|
|
57
|
+
|
|
58
|
+
# Full idea detail
|
|
59
|
+
nrepo show 42
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Organize
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Move idea through pipeline
|
|
66
|
+
nrepo move 42 exploring
|
|
67
|
+
nrepo move 42 building
|
|
68
|
+
nrepo move 42 shipped
|
|
69
|
+
|
|
70
|
+
# Bulk move
|
|
71
|
+
nrepo move exploring --ids 42,57,63
|
|
72
|
+
|
|
73
|
+
# Add tags
|
|
74
|
+
nrepo tag 42 frontend urgent
|
|
75
|
+
|
|
76
|
+
# Bulk tag
|
|
77
|
+
nrepo tag add "v2-feature" --ids 42,57,63
|
|
78
|
+
nrepo tag remove "draft" --ids 42,57,63
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Links between ideas
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Create links
|
|
85
|
+
nrepo link 42 57 # default type: related
|
|
86
|
+
nrepo link 42 57 --type blocks # typed link
|
|
87
|
+
nrepo link 42 57 --type inspires --note "Auth redesign sparked this"
|
|
88
|
+
|
|
89
|
+
# View links for an idea
|
|
90
|
+
nrepo links 42
|
|
91
|
+
nrepo links 42 --type blocks
|
|
92
|
+
|
|
93
|
+
# Remove a link
|
|
94
|
+
nrepo unlink 42 57
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Link types: `related`, `blocks`, `inspires`, `supersedes`, `parent`.
|
|
98
|
+
Directional types (blocks, inspires, supersedes, parent) have cycle detection.
|
|
99
|
+
|
|
100
|
+
### Merge ideas
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Merge idea 57 into idea 42 (42 survives, 57 is shelved)
|
|
104
|
+
nrepo merge 42 57
|
|
105
|
+
nrepo merge 42 57 --force # Skip confirmation
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Merging combines bodies, unions tags, transfers relations, and creates a `supersedes` link.
|
|
109
|
+
|
|
110
|
+
### Graph traversal
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Show direct connections
|
|
114
|
+
nrepo graph 42
|
|
115
|
+
|
|
116
|
+
# Show connections up to 2 hops deep
|
|
117
|
+
nrepo graph 42 --depth 2
|
|
118
|
+
|
|
119
|
+
# Only follow specific edge types
|
|
120
|
+
nrepo graph 42 --depth 3 --type blocks
|
|
121
|
+
nrepo graph 42 --type blocks,inspires
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Compare ideas
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
nrepo diff 42 57 # Side-by-side comparison
|
|
128
|
+
nrepo diff 42 # Compare against parent/most related idea
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Pull context for development
|
|
132
|
+
|
|
133
|
+
Export an idea and its related context as local files for development:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
nrepo pull 42 --to ./idea-context
|
|
137
|
+
# Creates: IDEA.md, CONTEXT.md (related ideas), RELATED.md (links), .neuralrepo
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Then read IDEA.md and CONTEXT.md for full project context.
|
|
141
|
+
|
|
142
|
+
### Dashboard
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
nrepo status # Idea counts by status, recent captures, pending duplicates
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## JSON output
|
|
149
|
+
|
|
150
|
+
All commands support `--json` for machine-readable output. Combine with unix tools:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
nrepo search "auth" --json | jq '.results[0].id'
|
|
154
|
+
nrepo show 42 --json
|
|
155
|
+
nrepo log --status captured --json
|
|
156
|
+
nrepo links 42 --json
|
|
157
|
+
nrepo graph 42 --depth 2 --json
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Agentic workflows
|
|
161
|
+
|
|
162
|
+
### Bulk tagging from search
|
|
163
|
+
```bash
|
|
164
|
+
nrepo search "authentication" --json
|
|
165
|
+
# Review results, identify relevant IDs
|
|
166
|
+
nrepo tag add "auth-v2" --ids 42,57,63
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Finding and resolving blockers
|
|
170
|
+
```bash
|
|
171
|
+
nrepo graph 42 --depth 3 --type blocks
|
|
172
|
+
# Identify the root blocker, then update its status
|
|
173
|
+
nrepo move shipped --ids 91
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Identifying duplicates for merge
|
|
177
|
+
```bash
|
|
178
|
+
nrepo diff 42 57
|
|
179
|
+
# If they're duplicates, merge them
|
|
180
|
+
nrepo merge 42 57 --force
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Building connections from search results
|
|
184
|
+
```bash
|
|
185
|
+
nrepo search "API design" --json
|
|
186
|
+
# Review results, then link the relevant ones
|
|
187
|
+
nrepo link 42 57 --type related
|
|
188
|
+
nrepo link 42 63 --type inspires --note "API patterns apply here"
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Statuses
|
|
192
|
+
|
|
193
|
+
Ideas flow through: `captured` → `exploring` → `building` → `shipped` (or `shelved` at any point).
|
|
194
|
+
|
|
195
|
+
## Error handling
|
|
196
|
+
|
|
197
|
+
- **"Run nrepo login to authenticate"** → user needs to log in first
|
|
198
|
+
- **"This feature requires a Pro plan"** → idea limits or feature gating, upgrade needed
|
|
199
|
+
- **"circular blocking chain"** → cycle detected, cannot create this link
|
|
200
|
+
- **Network errors** → check internet connectivity
|
|
201
|
+
|
|
202
|
+
## When $ARGUMENTS is provided
|
|
203
|
+
|
|
204
|
+
Treat it as a search query first, then offer to capture if no match found.
|