@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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 NeuralConfig LLC
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# @neuralconfig/nrepo
|
|
2
|
+
|
|
3
|
+
CLI for [NeuralRepo](https://neuralrepo.com) — AI-native idea capture and management.
|
|
4
|
+
|
|
5
|
+
Capture ideas, search semantically, organize with tags and statuses, link related ideas, and pull context for development — all from the terminal. Commands mirror git vocabulary (`push`, `log`, `diff`, `branch`, `merge`, `tag`, `stash`) for familiarity to both humans and LLMs. Designed to compose with unix pipes and tools like `jq`.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @neuralconfig/nrepo
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This installs two things:
|
|
14
|
+
|
|
15
|
+
1. **The `nrepo` binary** on your PATH
|
|
16
|
+
2. **A Claude Code skill** at `~/.claude/skills/neuralrepo/SKILL.md` (if Claude Code is installed)
|
|
17
|
+
|
|
18
|
+
The skill teaches Claude Code how to use `nrepo` commands on your behalf — capturing ideas, searching, organizing, and pulling context for development. Claude Code prefers `nrepo` over MCP tools because the CLI supports more features and composes with unix commands.
|
|
19
|
+
|
|
20
|
+
Or use without installing:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @neuralconfig/nrepo search "my topic"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Uninstall
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm uninstall -g @neuralconfig/nrepo
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Note:** npm does not always run the pre-uninstall script for global packages. If the Claude Code skill persists after uninstall, remove it manually:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
rm -rf ~/.claude/skills/neuralrepo
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Authentication
|
|
39
|
+
|
|
40
|
+
### Browser login (default)
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
nrepo login
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Opens your browser to authenticate via GitHub OAuth. On success, an API key is automatically generated (labeled "CLI (auto-generated)") and saved to `~/.config/neuralrepo/config.json`. No manual key management needed.
|
|
47
|
+
|
|
48
|
+
Output defaults to **human-readable** format when logged in via browser.
|
|
49
|
+
|
|
50
|
+
### API key login
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
nrepo login --api-key
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Prompts for an API key, which you can generate at [neuralrepo.com/settings](https://neuralrepo.com/settings). Useful for CI, scripts, or Claude Code environments.
|
|
57
|
+
|
|
58
|
+
Output defaults to **JSON** format when logged in via API key — this is intentional for machine consumption. Claude Code uses this mode so it can parse responses programmatically.
|
|
59
|
+
|
|
60
|
+
### Override output format
|
|
61
|
+
|
|
62
|
+
Any command accepts `--json` or `--human` to override the default:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
nrepo search "auth" --json # Force JSON (e.g., for piping to jq)
|
|
66
|
+
nrepo show 42 --human # Force human-readable
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Check auth status
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
nrepo whoami
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Credentials storage
|
|
76
|
+
|
|
77
|
+
Credentials are stored at `~/.config/neuralrepo/config.json`:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"api_url": "https://neuralrepo.com/api/v1",
|
|
82
|
+
"api_key": "nrp_...",
|
|
83
|
+
"user_id": "...",
|
|
84
|
+
"auth_method": "browser"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Clear with `nrepo logout`.
|
|
89
|
+
|
|
90
|
+
## Commands
|
|
91
|
+
|
|
92
|
+
### Capture ideas
|
|
93
|
+
|
|
94
|
+
Always search before creating to avoid duplicates — the server runs semantic dedup, but searching first catches obvious overlaps immediately.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Full capture with body and tags
|
|
98
|
+
nrepo push "Add rate limiting to API" --body "Sliding window algorithm, store in KV" --tag backend --tag infrastructure
|
|
99
|
+
|
|
100
|
+
# Quick capture (title only)
|
|
101
|
+
nrepo stash "Look into edge caching for static assets"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**push options:** `--body <text>`, `--tag <tag>` (repeatable), `--status <status>`
|
|
105
|
+
|
|
106
|
+
### Search
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Semantic search (returns relevance scores)
|
|
110
|
+
nrepo search "authentication flow"
|
|
111
|
+
nrepo search "auth" --limit 5
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Browse
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# List recent ideas
|
|
118
|
+
nrepo log
|
|
119
|
+
nrepo log --limit 10
|
|
120
|
+
nrepo log --status captured
|
|
121
|
+
nrepo log --tag backend
|
|
122
|
+
|
|
123
|
+
# Full detail for one idea
|
|
124
|
+
nrepo show 42
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Edit
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
nrepo edit 42 --title "New title"
|
|
131
|
+
nrepo edit 42 --body "Updated description"
|
|
132
|
+
nrepo edit 42 --title "New title" --body "New body"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Organize by status
|
|
136
|
+
|
|
137
|
+
Ideas flow through: `captured` → `exploring` → `building` → `shipped` (or `shelved` at any point).
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Move a single idea
|
|
141
|
+
nrepo move 42 exploring
|
|
142
|
+
nrepo move 42 shipped
|
|
143
|
+
|
|
144
|
+
# Bulk move
|
|
145
|
+
nrepo move exploring --ids 42,57,63
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Tags
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Add tags to a single idea
|
|
152
|
+
nrepo tag 42 frontend urgent
|
|
153
|
+
|
|
154
|
+
# Bulk tag operations
|
|
155
|
+
nrepo tag add "v2-feature" --ids 42,57,63
|
|
156
|
+
nrepo tag remove "draft" --ids 42,57,63
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Links between ideas
|
|
160
|
+
|
|
161
|
+
Link types: `related` (default), `blocks`, `inspires`, `supersedes`, `parent`.
|
|
162
|
+
Directional types (blocks, inspires, supersedes, parent) have automatic cycle detection.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Create links
|
|
166
|
+
nrepo link 42 57 # default: related
|
|
167
|
+
nrepo link 42 57 --type blocks # typed link
|
|
168
|
+
nrepo link 42 57 --type inspires --note "Auth redesign sparked this"
|
|
169
|
+
|
|
170
|
+
# View links
|
|
171
|
+
nrepo links 42
|
|
172
|
+
nrepo links 42 --type blocks
|
|
173
|
+
|
|
174
|
+
# Remove a link
|
|
175
|
+
nrepo unlink 42 57
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Merge ideas
|
|
179
|
+
|
|
180
|
+
Merging combines bodies, unions tags, transfers relations, and creates a `supersedes` link. The absorbed idea is shelved.
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
nrepo merge 42 57 # 42 survives, 57 is absorbed
|
|
184
|
+
nrepo merge 42 57 --force # Skip confirmation
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Graph traversal
|
|
188
|
+
|
|
189
|
+
Explore the connection graph from any idea using BFS traversal.
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
nrepo graph 42 # Direct connections
|
|
193
|
+
nrepo graph 42 --depth 2 # Up to 2 hops
|
|
194
|
+
nrepo graph 42 --depth 3 --type blocks # Only follow "blocks" edges
|
|
195
|
+
nrepo graph 42 --type blocks,inspires # Multiple edge types
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Compare ideas
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
nrepo diff 42 57 # Side-by-side comparison of two ideas
|
|
202
|
+
nrepo diff 42 # Compare against parent or most related idea
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Branch (fork)
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
nrepo branch 42 # Fork with same title
|
|
209
|
+
nrepo branch 42 --title "Variant B" # Fork with new title
|
|
210
|
+
nrepo branch 42 --body "Different approach"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Pull context for development
|
|
214
|
+
|
|
215
|
+
Export an idea and its related context as local files:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
nrepo pull 42 --to ./idea-context
|
|
219
|
+
# Creates:
|
|
220
|
+
# IDEA.md — full idea detail
|
|
221
|
+
# CONTEXT.md — related ideas and their details
|
|
222
|
+
# RELATED.md — links and relations
|
|
223
|
+
# .neuralrepo — metadata for nrepo to track the source
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Dashboard
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
nrepo status # Idea counts by status, recent captures, pending duplicates
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### API key management
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
nrepo keys list # List all API keys
|
|
236
|
+
nrepo keys create "CI bot" # Generate a new key (shown once)
|
|
237
|
+
nrepo keys revoke 7 # Revoke a key by ID
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## JSON output and unix composition
|
|
241
|
+
|
|
242
|
+
All commands support `--json`. Combine with standard unix tools:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Extract titles from search results
|
|
246
|
+
nrepo search "auth" --json | jq '.results[].title'
|
|
247
|
+
|
|
248
|
+
# Count ideas by status
|
|
249
|
+
nrepo log --status captured --json | jq length
|
|
250
|
+
|
|
251
|
+
# Get IDs of all exploring ideas
|
|
252
|
+
nrepo log --status exploring --json | jq '.[].id'
|
|
253
|
+
|
|
254
|
+
# Pipe graph output to other tools
|
|
255
|
+
nrepo graph 42 --depth 2 --json | jq '.nodes | length'
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Error format
|
|
259
|
+
|
|
260
|
+
Errors are written to stderr. In JSON mode:
|
|
261
|
+
|
|
262
|
+
```json
|
|
263
|
+
{"error": "message", "code": "http_404", "status": 404}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Error codes: `auth_required`, `http_<status>`, `network_error`, `unknown`.
|
|
267
|
+
|
|
268
|
+
## Claude Code integration
|
|
269
|
+
|
|
270
|
+
Installing `@neuralconfig/nrepo` automatically registers a [Claude Code](https://claude.ai/code) skill. The skill instructs Claude Code to:
|
|
271
|
+
|
|
272
|
+
- Use `nrepo` commands instead of MCP tools (more features, unix composable)
|
|
273
|
+
- Search before capturing to avoid duplicates
|
|
274
|
+
- Use JSON output mode for parsing results
|
|
275
|
+
- Leverage bulk operations, linking, merging, and graph traversal
|
|
276
|
+
|
|
277
|
+
The skill is installed to `~/.claude/skills/neuralrepo/SKILL.md` and auto-discovered by Claude Code on every session.
|
|
278
|
+
|
|
279
|
+
### Claude Code plugin
|
|
280
|
+
|
|
281
|
+
This package is also structured as a [Claude Code plugin](https://code.claude.com/docs/en/plugins). You can load it directly:
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
claude --plugin-dir /path/to/nrepo
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Or install from the plugin directory (once approved).
|
|
288
|
+
|
|
289
|
+
## Requirements
|
|
290
|
+
|
|
291
|
+
- Node.js 18 or later
|
|
292
|
+
- A NeuralRepo account ([neuralrepo.com](https://neuralrepo.com))
|
|
293
|
+
|
|
294
|
+
## License
|
|
295
|
+
|
|
296
|
+
[MIT](LICENSE)
|