@ncukondo/reference-manager 0.3.0 → 0.5.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/README.md +282 -107
- package/dist/chunks/file-watcher-B-SiUw5f.js +1557 -0
- package/dist/chunks/file-watcher-B-SiUw5f.js.map +1 -0
- package/dist/chunks/{search-Be9vzUIH.js → index-DLIGxQaB.js} +399 -89
- package/dist/chunks/index-DLIGxQaB.js.map +1 -0
- package/dist/chunks/loader-DuzyKV70.js +394 -0
- package/dist/chunks/loader-DuzyKV70.js.map +1 -0
- package/dist/cli/commands/add.d.ts +3 -3
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/cite.d.ts +3 -3
- package/dist/cli/commands/cite.d.ts.map +1 -1
- package/dist/cli/commands/fulltext.d.ts +5 -34
- package/dist/cli/commands/fulltext.d.ts.map +1 -1
- package/dist/cli/commands/list.d.ts +3 -3
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/mcp.d.ts +16 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/remove.d.ts +3 -3
- package/dist/cli/commands/remove.d.ts.map +1 -1
- package/dist/cli/commands/search.d.ts +3 -3
- package/dist/cli/commands/search.d.ts.map +1 -1
- package/dist/cli/commands/server.d.ts +2 -0
- package/dist/cli/commands/server.d.ts.map +1 -1
- package/dist/cli/commands/update.d.ts +3 -3
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/execution-context.d.ts +23 -36
- package/dist/cli/execution-context.d.ts.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/server-client.d.ts +24 -40
- package/dist/cli/server-client.d.ts.map +1 -1
- package/dist/cli/server-detection.d.ts +1 -0
- package/dist/cli/server-detection.d.ts.map +1 -1
- package/dist/cli.js +21061 -317
- package/dist/cli.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/schema.d.ts +2 -3
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/core/csl-json/types.d.ts +3 -0
- package/dist/core/csl-json/types.d.ts.map +1 -1
- package/dist/core/library-interface.d.ts +100 -0
- package/dist/core/library-interface.d.ts.map +1 -0
- package/dist/core/library.d.ts +29 -46
- package/dist/core/library.d.ts.map +1 -1
- package/dist/features/operations/add.d.ts +2 -2
- package/dist/features/operations/add.d.ts.map +1 -1
- package/dist/features/operations/cite.d.ts +2 -2
- package/dist/features/operations/cite.d.ts.map +1 -1
- package/dist/features/operations/fulltext/attach.d.ts +47 -0
- package/dist/features/operations/fulltext/attach.d.ts.map +1 -0
- package/dist/features/operations/fulltext/detach.d.ts +38 -0
- package/dist/features/operations/fulltext/detach.d.ts.map +1 -0
- package/dist/features/operations/fulltext/get.d.ts +41 -0
- package/dist/features/operations/fulltext/get.d.ts.map +1 -0
- package/dist/features/operations/fulltext/index.d.ts +9 -0
- package/dist/features/operations/fulltext/index.d.ts.map +1 -0
- package/dist/features/operations/index.d.ts +15 -0
- package/dist/features/operations/index.d.ts.map +1 -0
- package/dist/features/operations/library-operations.d.ts +64 -0
- package/dist/features/operations/library-operations.d.ts.map +1 -0
- package/dist/features/operations/list.d.ts +2 -2
- package/dist/features/operations/list.d.ts.map +1 -1
- package/dist/features/operations/operations-library.d.ts +36 -0
- package/dist/features/operations/operations-library.d.ts.map +1 -0
- package/dist/features/operations/remove.d.ts +4 -4
- package/dist/features/operations/remove.d.ts.map +1 -1
- package/dist/features/operations/search.d.ts +2 -2
- package/dist/features/operations/search.d.ts.map +1 -1
- package/dist/features/operations/update.d.ts +2 -2
- package/dist/features/operations/update.d.ts.map +1 -1
- package/dist/features/search/matcher.d.ts.map +1 -1
- package/dist/features/search/normalizer.d.ts +12 -0
- package/dist/features/search/normalizer.d.ts.map +1 -1
- package/dist/features/search/tokenizer.d.ts.map +1 -1
- package/dist/features/search/types.d.ts +1 -1
- package/dist/features/search/types.d.ts.map +1 -1
- package/dist/features/search/uppercase.d.ts +41 -0
- package/dist/features/search/uppercase.d.ts.map +1 -0
- package/dist/index.js +24 -192
- package/dist/index.js.map +1 -1
- package/dist/mcp/context.d.ts +19 -0
- package/dist/mcp/context.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +20 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/resources/index.d.ts +10 -0
- package/dist/mcp/resources/index.d.ts.map +1 -0
- package/dist/mcp/resources/library.d.ts +26 -0
- package/dist/mcp/resources/library.d.ts.map +1 -0
- package/dist/mcp/tools/add.d.ts +17 -0
- package/dist/mcp/tools/add.d.ts.map +1 -0
- package/dist/mcp/tools/cite.d.ts +15 -0
- package/dist/mcp/tools/cite.d.ts.map +1 -0
- package/dist/mcp/tools/fulltext.d.ts +51 -0
- package/dist/mcp/tools/fulltext.d.ts.map +1 -0
- package/dist/mcp/tools/index.d.ts +12 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/list.d.ts +13 -0
- package/dist/mcp/tools/list.d.ts.map +1 -0
- package/dist/mcp/tools/remove.d.ts +19 -0
- package/dist/mcp/tools/remove.d.ts.map +1 -0
- package/dist/mcp/tools/search.d.ts +13 -0
- package/dist/mcp/tools/search.d.ts.map +1 -0
- package/dist/server/index.d.ts +23 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/routes/references.d.ts.map +1 -1
- package/dist/server.js +5 -271
- package/dist/server.js.map +1 -1
- package/package.json +2 -1
- package/dist/chunks/detector-DHztTaFY.js +0 -619
- package/dist/chunks/detector-DHztTaFY.js.map +0 -1
- package/dist/chunks/loader-mQ25o6cV.js +0 -1054
- package/dist/chunks/loader-mQ25o6cV.js.map +0 -1
- package/dist/chunks/search-Be9vzUIH.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,18 +1,72 @@
|
|
|
1
1
|
# reference-manager
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Automate your literature workflow — from systematic reviews to manuscript writing
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@ncukondo/reference-manager)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[]()
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
9
|
+
A command-line reference management tool designed for automation. Integrates with AI agents (Claude Code, Claude Desktop) via MCP and works seamlessly with shell scripts and Pandoc.
|
|
10
|
+
|
|
11
|
+
## Why reference-manager?
|
|
12
|
+
|
|
13
|
+
Traditional reference managers (Zotero, Mendeley, EndNote) are designed for manual, GUI-based workflows. **reference-manager** takes a different approach:
|
|
14
|
+
|
|
15
|
+
- **Automation-first**: Every operation is available via CLI and MCP — no GUI required
|
|
16
|
+
- **AI-native**: Direct integration with Claude and other AI agents through the Model Context Protocol
|
|
17
|
+
- **Single source of truth**: CSL-JSON format ensures compatibility and transparency
|
|
18
|
+
- **Pandoc-ready**: Generate citations in any style, ready for academic writing
|
|
19
|
+
|
|
20
|
+
## Use Cases
|
|
21
|
+
|
|
22
|
+
### Systematic Review / Scoping Review
|
|
23
|
+
|
|
24
|
+
Automate the tedious parts of literature reviews:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Import references from multiple sources
|
|
28
|
+
ref add pmid:12345678 pmid:23456789
|
|
29
|
+
ref add "10.1234/example.doi"
|
|
30
|
+
ref add exported-from-pubmed.nbib
|
|
31
|
+
|
|
32
|
+
# AI-assisted screening (with Claude Code)
|
|
33
|
+
# "Review the abstracts in my library and flag potentially relevant papers for my review on AI in medical education"
|
|
34
|
+
|
|
35
|
+
# Export for analysis
|
|
36
|
+
ref list --format json > references.json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Manuscript Writing
|
|
40
|
+
|
|
41
|
+
Streamline your writing workflow:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Generate citations
|
|
45
|
+
ref cite smith2024 jones2023 --style apa
|
|
46
|
+
# Output: (Smith, 2024; Jones, 2023)
|
|
47
|
+
|
|
48
|
+
# Attach and manage full-text PDFs
|
|
49
|
+
ref fulltext attach smith2024 ~/papers/smith2024.pdf
|
|
50
|
+
|
|
51
|
+
# Export for Pandoc
|
|
52
|
+
ref list --format json > references.json
|
|
53
|
+
pandoc manuscript.md --bibliography references.json -o manuscript.docx
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### AI-Assisted Research
|
|
57
|
+
|
|
58
|
+
Let Claude help manage your references:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
You: "Find all papers by Smith published after 2020"
|
|
62
|
+
Claude: [uses search tool] Found 3 references...
|
|
63
|
+
|
|
64
|
+
You: "Generate an APA citation for the machine learning paper"
|
|
65
|
+
Claude: [uses cite tool] Smith, J. (2024). Machine learning applications...
|
|
66
|
+
|
|
67
|
+
You: "Add this paper: 10.1234/example"
|
|
68
|
+
Claude: [uses add tool] Added reference: example2024
|
|
69
|
+
```
|
|
16
70
|
|
|
17
71
|
## Installation
|
|
18
72
|
|
|
@@ -20,10 +74,10 @@ A local reference management tool using CSL-JSON as the single source of truth.
|
|
|
20
74
|
|
|
21
75
|
- Node.js 22 or later
|
|
22
76
|
|
|
23
|
-
### From npm
|
|
77
|
+
### From npm
|
|
24
78
|
|
|
25
79
|
```bash
|
|
26
|
-
npm install -g reference-manager
|
|
80
|
+
npm install -g @ncukondo/reference-manager
|
|
27
81
|
```
|
|
28
82
|
|
|
29
83
|
### From source
|
|
@@ -36,92 +90,199 @@ npm run build
|
|
|
36
90
|
npm link
|
|
37
91
|
```
|
|
38
92
|
|
|
39
|
-
##
|
|
93
|
+
## Quick Start
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Initialize (creates default config and empty library)
|
|
97
|
+
ref list
|
|
40
98
|
|
|
41
|
-
|
|
99
|
+
# Add a reference by DOI
|
|
100
|
+
ref add "10.1038/nature12373"
|
|
42
101
|
|
|
43
|
-
|
|
102
|
+
# Add from PubMed
|
|
103
|
+
ref add pmid:25056061
|
|
104
|
+
|
|
105
|
+
# Search your library
|
|
106
|
+
ref search "author:smith machine learning"
|
|
107
|
+
|
|
108
|
+
# Generate a citation
|
|
109
|
+
ref cite smith2024 --style apa
|
|
44
110
|
|
|
45
|
-
```bash
|
|
46
111
|
# List all references
|
|
47
112
|
ref list
|
|
113
|
+
```
|
|
48
114
|
|
|
49
|
-
|
|
50
|
-
ref search "author:smith machine learning"
|
|
115
|
+
## AI Integration (MCP)
|
|
51
116
|
|
|
52
|
-
|
|
53
|
-
ref add reference.json
|
|
117
|
+
reference-manager provides an MCP (Model Context Protocol) server for direct integration with AI agents.
|
|
54
118
|
|
|
55
|
-
|
|
56
|
-
cat reference.json | ref add
|
|
119
|
+
### Claude Code Setup
|
|
57
120
|
|
|
58
|
-
|
|
59
|
-
ref update smith-2020 updates.json
|
|
121
|
+
Add reference-manager as an MCP server (no global installation required):
|
|
60
122
|
|
|
61
|
-
|
|
62
|
-
|
|
123
|
+
```bash
|
|
124
|
+
claude mcp add reference-manager -- npx -y @ncukondo/reference-manager mcp
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Or with a custom library path:
|
|
63
128
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
ref server status
|
|
67
|
-
ref server stop
|
|
129
|
+
```bash
|
|
130
|
+
claude mcp add reference-manager -- npx -y @ncukondo/reference-manager mcp --library ~/my-references.json
|
|
68
131
|
```
|
|
69
132
|
|
|
70
|
-
###
|
|
133
|
+
### Claude Desktop Setup
|
|
71
134
|
|
|
72
|
-
|
|
135
|
+
#### Option 1: MCPB Bundle (Recommended)
|
|
73
136
|
|
|
74
|
-
|
|
75
|
-
# Attach a PDF to a reference
|
|
76
|
-
ref fulltext attach smith-2020 ~/papers/smith-2020.pdf
|
|
137
|
+
Download the `.mcpb` file from the [latest release](https://github.com/ncukondo/reference-manager/releases/latest) and install it via Claude Desktop:
|
|
77
138
|
|
|
78
|
-
|
|
79
|
-
|
|
139
|
+
1. Download `reference-manager.mcpb` from the release page
|
|
140
|
+
2. Open Claude Desktop and go to **Settings** → **Extensions**
|
|
141
|
+
3. Click **Install from file** and select the downloaded `.mcpb` file
|
|
142
|
+
4. Configure the **Config File Path** when prompted (e.g., `~/.reference-manager/config.toml`)
|
|
80
143
|
|
|
81
|
-
|
|
82
|
-
ref fulltext attach smith-2020 --pdf ~/downloads/paper.txt
|
|
144
|
+
The config file should contain at minimum:
|
|
83
145
|
|
|
84
|
-
|
|
85
|
-
|
|
146
|
+
```toml
|
|
147
|
+
library = "~/.reference-manager/csl.library.json"
|
|
148
|
+
```
|
|
86
149
|
|
|
87
|
-
|
|
88
|
-
ref fulltext attach smith-2020 ~/papers/smith-2020-revised.pdf --force
|
|
150
|
+
#### Option 2: Manual Configuration
|
|
89
151
|
|
|
90
|
-
|
|
91
|
-
ref fulltext get smith-2020 --pdf
|
|
152
|
+
Add to your Claude Desktop configuration file:
|
|
92
153
|
|
|
93
|
-
|
|
94
|
-
|
|
154
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
155
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
95
156
|
|
|
96
|
-
|
|
97
|
-
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"mcpServers": {
|
|
160
|
+
"reference-manager": {
|
|
161
|
+
"command": "npx",
|
|
162
|
+
"args": ["-y", "@ncukondo/reference-manager", "mcp"]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
98
167
|
|
|
99
|
-
|
|
100
|
-
|
|
168
|
+
With a custom library:
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"mcpServers": {
|
|
173
|
+
"reference-manager": {
|
|
174
|
+
"command": "npx",
|
|
175
|
+
"args": ["-y", "@ncukondo/reference-manager", "mcp", "--library", "/path/to/library.json"]
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
101
179
|
```
|
|
102
180
|
|
|
103
|
-
###
|
|
181
|
+
### Available Tools
|
|
182
|
+
|
|
183
|
+
| Tool | Description | Parameters |
|
|
184
|
+
|------|-------------|------------|
|
|
185
|
+
| `search` | Search references by query | `query`: Search string (e.g., `"author:smith 2024"`) |
|
|
186
|
+
| `list` | List all references | `format?`: `"json"` \| `"bibtex"` \| `"pretty"` |
|
|
187
|
+
| `add` | Add new reference(s) | `input`: DOI, PMID, BibTeX, RIS, or CSL-JSON |
|
|
188
|
+
| `remove` | Remove a reference | `id`: Reference ID, `force`: must be `true` |
|
|
189
|
+
| `cite` | Generate formatted citation | `ids`: Array of reference IDs, `style?`: Citation style, `format?`: `"text"` \| `"html"` |
|
|
190
|
+
| `fulltext_attach` | Attach PDF/Markdown to reference | `id`: Reference ID, `path`: File path |
|
|
191
|
+
| `fulltext_get` | Get full-text content | `id`: Reference ID |
|
|
192
|
+
| `fulltext_detach` | Detach full-text from reference | `id`: Reference ID |
|
|
193
|
+
|
|
194
|
+
### Available Resources
|
|
195
|
+
|
|
196
|
+
| URI | Description |
|
|
197
|
+
|-----|-------------|
|
|
198
|
+
| `library://references` | All references as CSL-JSON array |
|
|
199
|
+
| `library://reference/{id}` | Single reference by ID |
|
|
200
|
+
| `library://styles` | Available citation styles |
|
|
201
|
+
|
|
202
|
+
## CLI Reference
|
|
203
|
+
|
|
204
|
+
### Basic Commands
|
|
104
205
|
|
|
105
206
|
```bash
|
|
106
|
-
#
|
|
207
|
+
# List all references
|
|
107
208
|
ref list
|
|
108
|
-
|
|
109
|
-
# JSON format
|
|
110
209
|
ref list --format json
|
|
111
|
-
|
|
112
|
-
# BibTeX format
|
|
113
210
|
ref list --format bibtex
|
|
114
211
|
|
|
115
|
-
#
|
|
116
|
-
ref
|
|
212
|
+
# Search references
|
|
213
|
+
ref search "machine learning"
|
|
214
|
+
ref search "author:smith"
|
|
215
|
+
ref search "author:jones year:2024"
|
|
216
|
+
ref search "title:\"deep learning\""
|
|
217
|
+
|
|
218
|
+
# Add references
|
|
219
|
+
ref add paper.json # From CSL-JSON file
|
|
220
|
+
ref add references.bib # From BibTeX
|
|
221
|
+
ref add export.ris # From RIS
|
|
222
|
+
ref add "10.1038/nature12373" # From DOI
|
|
223
|
+
ref add pmid:25056061 # From PubMed ID
|
|
224
|
+
cat references.json | ref add # From stdin
|
|
225
|
+
|
|
226
|
+
# Remove a reference
|
|
227
|
+
ref remove smith2024
|
|
228
|
+
ref remove smith2024 --force # Skip confirmation
|
|
229
|
+
|
|
230
|
+
# Update a reference
|
|
231
|
+
ref update smith2024 updates.json
|
|
232
|
+
ref update smith2024 --set "title=New Title"
|
|
233
|
+
|
|
234
|
+
# Generate citations
|
|
235
|
+
ref cite smith2024
|
|
236
|
+
ref cite smith2024 jones2023 --style apa
|
|
237
|
+
ref cite smith2024 --style chicago-author-date --format html
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Fulltext Management
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Attach files
|
|
244
|
+
ref fulltext attach smith2024 ~/papers/smith2024.pdf
|
|
245
|
+
ref fulltext attach smith2024 ~/notes/smith2024.md
|
|
246
|
+
ref fulltext attach smith2024 paper.pdf --move # Move instead of copy
|
|
247
|
+
ref fulltext attach smith2024 paper.pdf --force # Overwrite existing
|
|
248
|
+
|
|
249
|
+
# Get attached files
|
|
250
|
+
ref fulltext get smith2024 --pdf # Get PDF path
|
|
251
|
+
ref fulltext get smith2024 --md # Get Markdown path
|
|
252
|
+
ref fulltext get smith2024 --pdf --stdout # Output content to stdout
|
|
253
|
+
|
|
254
|
+
# Detach files
|
|
255
|
+
ref fulltext detach smith2024 --pdf
|
|
256
|
+
ref fulltext detach smith2024 --pdf --delete # Also delete the file
|
|
117
257
|
```
|
|
118
258
|
|
|
119
|
-
###
|
|
259
|
+
### Output Formats
|
|
260
|
+
|
|
261
|
+
| Format | Flag | Description |
|
|
262
|
+
|--------|------|-------------|
|
|
263
|
+
| Pretty | (default) | Human-readable format |
|
|
264
|
+
| JSON | `--format json` | CSL-JSON array |
|
|
265
|
+
| BibTeX | `--format bibtex` | BibTeX format |
|
|
266
|
+
| IDs only | `--format ids-only` | One ID per line |
|
|
267
|
+
|
|
268
|
+
### Search Query Syntax
|
|
269
|
+
|
|
270
|
+
- **Simple search**: `machine learning` (matches any field)
|
|
271
|
+
- **Field-specific**: `author:smith`, `title:neural`, `year:2024`
|
|
272
|
+
- **Phrase search**: `"machine learning"` (exact phrase)
|
|
273
|
+
- **Combined**: `author:smith "deep learning" 2024`
|
|
120
274
|
|
|
121
|
-
|
|
275
|
+
Supported field prefixes: `author:`, `title:`, `doi:`, `pmid:`, `pmcid:`, `url:`, `keyword:`, `tag:`
|
|
276
|
+
|
|
277
|
+
## Configuration
|
|
278
|
+
|
|
279
|
+
Configuration file: `~/.reference-manager.config.toml`
|
|
122
280
|
|
|
123
281
|
```toml
|
|
282
|
+
# Path to the library file
|
|
124
283
|
library = "~/references.json"
|
|
284
|
+
|
|
285
|
+
# Logging level: silent, info, debug
|
|
125
286
|
log_level = "info"
|
|
126
287
|
|
|
127
288
|
[backup]
|
|
@@ -129,18 +290,61 @@ enabled = true
|
|
|
129
290
|
max_count = 10
|
|
130
291
|
max_age_days = 30
|
|
131
292
|
|
|
293
|
+
[fulltext]
|
|
294
|
+
directory = "~/references/fulltext"
|
|
295
|
+
|
|
132
296
|
[server]
|
|
133
297
|
auto_start = true
|
|
134
298
|
auto_stop_minutes = 60
|
|
299
|
+
```
|
|
135
300
|
|
|
136
|
-
|
|
137
|
-
|
|
301
|
+
### Environment Variables
|
|
302
|
+
|
|
303
|
+
| Variable | Description |
|
|
304
|
+
|----------|-------------|
|
|
305
|
+
| `REFERENCE_MANAGER_LIBRARY` | Override library file path |
|
|
306
|
+
| `REFERENCE_MANAGER_FULLTEXT_DIR` | Override fulltext directory |
|
|
307
|
+
|
|
308
|
+
## Data Format
|
|
309
|
+
|
|
310
|
+
reference-manager uses [CSL-JSON](https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html) as its native format — the same format used by Pandoc, Zotero, and other academic tools.
|
|
311
|
+
|
|
312
|
+
### Pandoc Integration
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
# Export your library
|
|
316
|
+
ref list --format json > references.json
|
|
317
|
+
|
|
318
|
+
# Use with Pandoc
|
|
319
|
+
pandoc manuscript.md \
|
|
320
|
+
--bibliography references.json \
|
|
321
|
+
--csl apa.csl \
|
|
322
|
+
-o manuscript.docx
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Custom Fields
|
|
326
|
+
|
|
327
|
+
reference-manager extends CSL-JSON with a `custom` object for additional metadata:
|
|
328
|
+
|
|
329
|
+
```json
|
|
330
|
+
{
|
|
331
|
+
"id": "smith2024",
|
|
332
|
+
"type": "article-journal",
|
|
333
|
+
"title": "Example Paper",
|
|
334
|
+
"custom": {
|
|
335
|
+
"uuid": "550e8400-e29b-41d4-a716-446655440000",
|
|
336
|
+
"tags": ["important", "to-read"],
|
|
337
|
+
"fulltext_pdf": "smith2024.pdf",
|
|
338
|
+
"fulltext_md": "smith2024.md"
|
|
339
|
+
}
|
|
340
|
+
}
|
|
138
341
|
```
|
|
139
342
|
|
|
140
|
-
|
|
141
|
-
|
|
343
|
+
## Project Status
|
|
344
|
+
|
|
345
|
+
**Alpha** — This project is under active development. APIs and commands may change between versions.
|
|
142
346
|
|
|
143
|
-
See
|
|
347
|
+
See [ROADMAP.md](./ROADMAP.md) for development progress and planned features.
|
|
144
348
|
|
|
145
349
|
## Development
|
|
146
350
|
|
|
@@ -153,55 +357,26 @@ npm run build
|
|
|
153
357
|
### Test
|
|
154
358
|
|
|
155
359
|
```bash
|
|
156
|
-
# Run all tests
|
|
157
|
-
npm test
|
|
158
|
-
|
|
159
|
-
# Watch mode
|
|
160
|
-
npm run test:watch
|
|
161
|
-
|
|
162
|
-
# Coverage
|
|
163
|
-
npm run test:coverage
|
|
360
|
+
npm test # Run all tests
|
|
361
|
+
npm run test:watch # Watch mode
|
|
362
|
+
npm run test:coverage # Coverage report
|
|
164
363
|
```
|
|
165
364
|
|
|
166
365
|
### Quality Checks
|
|
167
366
|
|
|
168
367
|
```bash
|
|
169
|
-
#
|
|
170
|
-
npm run
|
|
171
|
-
|
|
172
|
-
# Linting
|
|
173
|
-
npm run lint
|
|
174
|
-
|
|
175
|
-
# Format
|
|
176
|
-
npm run format
|
|
368
|
+
npm run typecheck # TypeScript type checking
|
|
369
|
+
npm run lint # Linting
|
|
370
|
+
npm run format # Code formatting
|
|
177
371
|
```
|
|
178
372
|
|
|
179
|
-
## Project Status
|
|
180
|
-
|
|
181
|
-
✅ **All phases completed** (Phase 1-5)
|
|
182
|
-
|
|
183
|
-
- 606 tests passing
|
|
184
|
-
- Full TypeScript type coverage
|
|
185
|
-
- Multi-platform support (Linux, macOS, Windows)
|
|
186
|
-
- Ready for distribution
|
|
187
|
-
|
|
188
|
-
## Architecture
|
|
189
|
-
|
|
190
|
-
The project is organized into modular components:
|
|
191
|
-
|
|
192
|
-
- **Core**: CSL-JSON processing, Reference/Library management, Identifier generation
|
|
193
|
-
- **Features**: Search, Duplicate detection, 3-way merge, File monitoring
|
|
194
|
-
- **CLI**: Command-line interface with Commander.js
|
|
195
|
-
- **Server**: HTTP server with Hono
|
|
196
|
-
- **Utils**: Logging, File operations, Backup management
|
|
197
|
-
- **Config**: TOML-based configuration
|
|
198
|
-
|
|
199
|
-
See `spec/_index.md` for detailed architecture documentation.
|
|
200
|
-
|
|
201
373
|
## License
|
|
202
374
|
|
|
203
375
|
MIT
|
|
204
376
|
|
|
205
|
-
##
|
|
377
|
+
## Links
|
|
206
378
|
|
|
207
|
-
https://github.com/ncukondo/reference-manager
|
|
379
|
+
- [Repository](https://github.com/ncukondo/reference-manager)
|
|
380
|
+
- [npm Package](https://www.npmjs.com/package/@ncukondo/reference-manager)
|
|
381
|
+
- [Issues](https://github.com/ncukondo/reference-manager/issues)
|
|
382
|
+
- [Documentation](./spec/)
|