@ncukondo/reference-manager 0.1.0 → 0.4.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 +278 -80
- package/dist/chunks/{detector-BF8Mcc72.js → file-watcher-B-SiUw5f.js} +469 -327
- package/dist/chunks/file-watcher-B-SiUw5f.js.map +1 -0
- package/dist/chunks/index-DLIGxQaB.js +29851 -0
- 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 +44 -16
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/cite.d.ts +49 -0
- package/dist/cli/commands/cite.d.ts.map +1 -0
- package/dist/cli/commands/fulltext.d.ts +72 -0
- package/dist/cli/commands/fulltext.d.ts.map +1 -0
- package/dist/cli/commands/index.d.ts +14 -10
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/list.d.ts +23 -6
- 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 +47 -12
- package/dist/cli/commands/remove.d.ts.map +1 -1
- package/dist/cli/commands/search.d.ts +24 -7
- 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 +26 -13
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/execution-context.d.ts +47 -0
- package/dist/cli/execution-context.d.ts.map +1 -0
- package/dist/cli/helpers.d.ts +18 -0
- package/dist/cli/helpers.d.ts.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/server-client.d.ts +61 -14
- 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 +21979 -564
- package/dist/cli.js.map +1 -1
- package/dist/config/csl-styles.d.ts +83 -0
- package/dist/config/csl-styles.d.ts.map +1 -0
- package/dist/config/defaults.d.ts +10 -0
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/schema.d.ts +86 -3
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/core/csl-json/types.d.ts +18 -3
- 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 +56 -13
- package/dist/core/library.d.ts.map +1 -1
- package/dist/features/format/bibtex.d.ts +6 -0
- package/dist/features/format/bibtex.d.ts.map +1 -0
- package/dist/features/format/citation-csl.d.ts +41 -0
- package/dist/features/format/citation-csl.d.ts.map +1 -0
- package/dist/features/format/citation-fallback.d.ts +24 -0
- package/dist/features/format/citation-fallback.d.ts.map +1 -0
- package/dist/features/format/index.d.ts +10 -0
- package/dist/features/format/index.d.ts.map +1 -0
- package/dist/features/format/json.d.ts +6 -0
- package/dist/features/format/json.d.ts.map +1 -0
- package/dist/features/format/pretty.d.ts +6 -0
- package/dist/features/format/pretty.d.ts.map +1 -0
- package/dist/features/fulltext/filename.d.ts +17 -0
- package/dist/features/fulltext/filename.d.ts.map +1 -0
- package/dist/features/fulltext/index.d.ts +7 -0
- package/dist/features/fulltext/index.d.ts.map +1 -0
- package/dist/features/fulltext/manager.d.ts +109 -0
- package/dist/features/fulltext/manager.d.ts.map +1 -0
- package/dist/features/fulltext/types.d.ts +12 -0
- package/dist/features/fulltext/types.d.ts.map +1 -0
- package/dist/features/import/cache.d.ts +37 -0
- package/dist/features/import/cache.d.ts.map +1 -0
- package/dist/features/import/detector.d.ts +42 -0
- package/dist/features/import/detector.d.ts.map +1 -0
- package/dist/features/import/fetcher.d.ts +49 -0
- package/dist/features/import/fetcher.d.ts.map +1 -0
- package/dist/features/import/importer.d.ts +61 -0
- package/dist/features/import/importer.d.ts.map +1 -0
- package/dist/features/import/index.d.ts +8 -0
- package/dist/features/import/index.d.ts.map +1 -0
- package/dist/features/import/normalizer.d.ts +15 -0
- package/dist/features/import/normalizer.d.ts.map +1 -0
- package/dist/features/import/parser.d.ts +33 -0
- package/dist/features/import/parser.d.ts.map +1 -0
- package/dist/features/import/rate-limiter.d.ts +45 -0
- package/dist/features/import/rate-limiter.d.ts.map +1 -0
- package/dist/features/operations/add.d.ts +65 -0
- package/dist/features/operations/add.d.ts.map +1 -0
- package/dist/features/operations/cite.d.ts +48 -0
- package/dist/features/operations/cite.d.ts.map +1 -0
- 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 +28 -0
- package/dist/features/operations/list.d.ts.map +1 -0
- 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 +29 -0
- package/dist/features/operations/remove.d.ts.map +1 -0
- package/dist/features/operations/search.d.ts +30 -0
- package/dist/features/operations/search.d.ts.map +1 -0
- package/dist/features/operations/update.d.ts +39 -0
- package/dist/features/operations/update.d.ts.map +1 -0
- 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 +21 -187
- 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 +26 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/routes/add.d.ts +11 -0
- package/dist/server/routes/add.d.ts.map +1 -0
- package/dist/server/routes/cite.d.ts +9 -0
- package/dist/server/routes/cite.d.ts.map +1 -0
- package/dist/server/routes/list.d.ts +25 -0
- package/dist/server/routes/list.d.ts.map +1 -0
- package/dist/server/routes/references.d.ts.map +1 -1
- package/dist/server/routes/search.d.ts +26 -0
- package/dist/server/routes/search.d.ts.map +1 -0
- package/dist/server.js +5 -88
- package/dist/server.js.map +1 -1
- package/package.json +16 -4
- package/dist/chunks/detector-BF8Mcc72.js.map +0 -1
- package/dist/cli/output/bibtex.d.ts +0 -6
- package/dist/cli/output/bibtex.d.ts.map +0 -1
- package/dist/cli/output/index.d.ts +0 -7
- package/dist/cli/output/index.d.ts.map +0 -1
- package/dist/cli/output/json.d.ts +0 -6
- package/dist/cli/output/json.d.ts.map +0 -1
- package/dist/cli/output/pretty.d.ts +0 -6
- package/dist/cli/output/pretty.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,17 +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
|
-
- **
|
|
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
|
+
```
|
|
15
70
|
|
|
16
71
|
## Installation
|
|
17
72
|
|
|
@@ -19,10 +74,10 @@ A local reference management tool using CSL-JSON as the single source of truth.
|
|
|
19
74
|
|
|
20
75
|
- Node.js 22 or later
|
|
21
76
|
|
|
22
|
-
### From npm
|
|
77
|
+
### From npm
|
|
23
78
|
|
|
24
79
|
```bash
|
|
25
|
-
npm install -g reference-manager
|
|
80
|
+
npm install -g @ncukondo/reference-manager
|
|
26
81
|
```
|
|
27
82
|
|
|
28
83
|
### From source
|
|
@@ -35,59 +90,182 @@ npm run build
|
|
|
35
90
|
npm link
|
|
36
91
|
```
|
|
37
92
|
|
|
38
|
-
##
|
|
93
|
+
## Quick Start
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Initialize (creates default config and empty library)
|
|
97
|
+
ref list
|
|
98
|
+
|
|
99
|
+
# Add a reference by DOI
|
|
100
|
+
ref add "10.1038/nature12373"
|
|
101
|
+
|
|
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
|
|
110
|
+
|
|
111
|
+
# List all references
|
|
112
|
+
ref list
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## AI Integration (MCP)
|
|
116
|
+
|
|
117
|
+
reference-manager provides an MCP (Model Context Protocol) server for direct integration with AI agents.
|
|
118
|
+
|
|
119
|
+
### Claude Code Setup
|
|
120
|
+
|
|
121
|
+
Add reference-manager as an MCP server (no global installation required):
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
claude mcp add reference-manager -- npx -y @ncukondo/reference-manager mcp
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Or with a custom library path:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
claude mcp add reference-manager -- npx -y @ncukondo/reference-manager mcp --library ~/my-references.json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Claude Desktop Setup
|
|
134
|
+
|
|
135
|
+
Add to your Claude Desktop configuration file:
|
|
136
|
+
|
|
137
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
138
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"mcpServers": {
|
|
143
|
+
"reference-manager": {
|
|
144
|
+
"command": "npx",
|
|
145
|
+
"args": ["-y", "@ncukondo/reference-manager", "mcp"]
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
With a custom library:
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"mcpServers": {
|
|
156
|
+
"reference-manager": {
|
|
157
|
+
"command": "npx",
|
|
158
|
+
"args": ["-y", "@ncukondo/reference-manager", "mcp", "--library", "/path/to/library.json"]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Available Tools
|
|
165
|
+
|
|
166
|
+
| Tool | Description | Parameters |
|
|
167
|
+
|------|-------------|------------|
|
|
168
|
+
| `search` | Search references by query | `query`: Search string (e.g., `"author:smith 2024"`) |
|
|
169
|
+
| `list` | List all references | `format?`: `"json"` \| `"bibtex"` \| `"pretty"` |
|
|
170
|
+
| `add` | Add new reference(s) | `input`: DOI, PMID, BibTeX, RIS, or CSL-JSON |
|
|
171
|
+
| `remove` | Remove a reference | `id`: Reference ID, `force`: must be `true` |
|
|
172
|
+
| `cite` | Generate formatted citation | `ids`: Array of reference IDs, `style?`: Citation style, `format?`: `"text"` \| `"html"` |
|
|
173
|
+
| `fulltext_attach` | Attach PDF/Markdown to reference | `id`: Reference ID, `path`: File path |
|
|
174
|
+
| `fulltext_get` | Get full-text content | `id`: Reference ID |
|
|
175
|
+
| `fulltext_detach` | Detach full-text from reference | `id`: Reference ID |
|
|
39
176
|
|
|
40
|
-
|
|
177
|
+
### Available Resources
|
|
178
|
+
|
|
179
|
+
| URI | Description |
|
|
180
|
+
|-----|-------------|
|
|
181
|
+
| `library://references` | All references as CSL-JSON array |
|
|
182
|
+
| `library://reference/{id}` | Single reference by ID |
|
|
183
|
+
| `library://styles` | Available citation styles |
|
|
184
|
+
|
|
185
|
+
## CLI Reference
|
|
41
186
|
|
|
42
187
|
### Basic Commands
|
|
43
188
|
|
|
44
189
|
```bash
|
|
45
190
|
# List all references
|
|
46
191
|
ref list
|
|
192
|
+
ref list --format json
|
|
193
|
+
ref list --format bibtex
|
|
47
194
|
|
|
48
195
|
# Search references
|
|
49
|
-
ref search "
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
ref
|
|
196
|
+
ref search "machine learning"
|
|
197
|
+
ref search "author:smith"
|
|
198
|
+
ref search "author:jones year:2024"
|
|
199
|
+
ref search "title:\"deep learning\""
|
|
200
|
+
|
|
201
|
+
# Add references
|
|
202
|
+
ref add paper.json # From CSL-JSON file
|
|
203
|
+
ref add references.bib # From BibTeX
|
|
204
|
+
ref add export.ris # From RIS
|
|
205
|
+
ref add "10.1038/nature12373" # From DOI
|
|
206
|
+
ref add pmid:25056061 # From PubMed ID
|
|
207
|
+
cat references.json | ref add # From stdin
|
|
53
208
|
|
|
54
|
-
#
|
|
55
|
-
|
|
209
|
+
# Remove a reference
|
|
210
|
+
ref remove smith2024
|
|
211
|
+
ref remove smith2024 --force # Skip confirmation
|
|
56
212
|
|
|
57
213
|
# Update a reference
|
|
58
|
-
ref update
|
|
214
|
+
ref update smith2024 updates.json
|
|
215
|
+
ref update smith2024 --set "title=New Title"
|
|
59
216
|
|
|
60
|
-
#
|
|
61
|
-
ref
|
|
217
|
+
# Generate citations
|
|
218
|
+
ref cite smith2024
|
|
219
|
+
ref cite smith2024 jones2023 --style apa
|
|
220
|
+
ref cite smith2024 --style chicago-author-date --format html
|
|
221
|
+
```
|
|
62
222
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
223
|
+
### Fulltext Management
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
# Attach files
|
|
227
|
+
ref fulltext attach smith2024 ~/papers/smith2024.pdf
|
|
228
|
+
ref fulltext attach smith2024 ~/notes/smith2024.md
|
|
229
|
+
ref fulltext attach smith2024 paper.pdf --move # Move instead of copy
|
|
230
|
+
ref fulltext attach smith2024 paper.pdf --force # Overwrite existing
|
|
231
|
+
|
|
232
|
+
# Get attached files
|
|
233
|
+
ref fulltext get smith2024 --pdf # Get PDF path
|
|
234
|
+
ref fulltext get smith2024 --md # Get Markdown path
|
|
235
|
+
ref fulltext get smith2024 --pdf --stdout # Output content to stdout
|
|
236
|
+
|
|
237
|
+
# Detach files
|
|
238
|
+
ref fulltext detach smith2024 --pdf
|
|
239
|
+
ref fulltext detach smith2024 --pdf --delete # Also delete the file
|
|
67
240
|
```
|
|
68
241
|
|
|
69
242
|
### Output Formats
|
|
70
243
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
244
|
+
| Format | Flag | Description |
|
|
245
|
+
|--------|------|-------------|
|
|
246
|
+
| Pretty | (default) | Human-readable format |
|
|
247
|
+
| JSON | `--format json` | CSL-JSON array |
|
|
248
|
+
| BibTeX | `--format bibtex` | BibTeX format |
|
|
249
|
+
| IDs only | `--format ids-only` | One ID per line |
|
|
74
250
|
|
|
75
|
-
|
|
76
|
-
ref list --format json
|
|
251
|
+
### Search Query Syntax
|
|
77
252
|
|
|
78
|
-
|
|
79
|
-
|
|
253
|
+
- **Simple search**: `machine learning` (matches any field)
|
|
254
|
+
- **Field-specific**: `author:smith`, `title:neural`, `year:2024`
|
|
255
|
+
- **Phrase search**: `"machine learning"` (exact phrase)
|
|
256
|
+
- **Combined**: `author:smith "deep learning" 2024`
|
|
80
257
|
|
|
81
|
-
|
|
82
|
-
ref list --format ids-only
|
|
83
|
-
```
|
|
258
|
+
Supported field prefixes: `author:`, `title:`, `doi:`, `pmid:`, `pmcid:`, `url:`, `keyword:`, `tag:`
|
|
84
259
|
|
|
85
|
-
|
|
260
|
+
## Configuration
|
|
86
261
|
|
|
87
|
-
Configuration file:
|
|
262
|
+
Configuration file: `~/.reference-manager.config.toml`
|
|
88
263
|
|
|
89
264
|
```toml
|
|
265
|
+
# Path to the library file
|
|
90
266
|
library = "~/references.json"
|
|
267
|
+
|
|
268
|
+
# Logging level: silent, info, debug
|
|
91
269
|
log_level = "info"
|
|
92
270
|
|
|
93
271
|
[backup]
|
|
@@ -95,73 +273,93 @@ enabled = true
|
|
|
95
273
|
max_count = 10
|
|
96
274
|
max_age_days = 30
|
|
97
275
|
|
|
276
|
+
[fulltext]
|
|
277
|
+
directory = "~/references/fulltext"
|
|
278
|
+
|
|
98
279
|
[server]
|
|
99
280
|
auto_start = true
|
|
100
281
|
auto_stop_minutes = 60
|
|
101
282
|
```
|
|
102
283
|
|
|
103
|
-
|
|
284
|
+
### Environment Variables
|
|
104
285
|
|
|
105
|
-
|
|
286
|
+
| Variable | Description |
|
|
287
|
+
|----------|-------------|
|
|
288
|
+
| `REFERENCE_MANAGER_LIBRARY` | Override library file path |
|
|
289
|
+
| `REFERENCE_MANAGER_FULLTEXT_DIR` | Override fulltext directory |
|
|
106
290
|
|
|
107
|
-
|
|
291
|
+
## Data Format
|
|
108
292
|
|
|
109
|
-
|
|
110
|
-
npm run build
|
|
111
|
-
```
|
|
293
|
+
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.
|
|
112
294
|
|
|
113
|
-
###
|
|
295
|
+
### Pandoc Integration
|
|
114
296
|
|
|
115
297
|
```bash
|
|
116
|
-
#
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
#
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
298
|
+
# Export your library
|
|
299
|
+
ref list --format json > references.json
|
|
300
|
+
|
|
301
|
+
# Use with Pandoc
|
|
302
|
+
pandoc manuscript.md \
|
|
303
|
+
--bibliography references.json \
|
|
304
|
+
--csl apa.csl \
|
|
305
|
+
-o manuscript.docx
|
|
124
306
|
```
|
|
125
307
|
|
|
126
|
-
###
|
|
308
|
+
### Custom Fields
|
|
309
|
+
|
|
310
|
+
reference-manager extends CSL-JSON with a `custom` object for additional metadata:
|
|
311
|
+
|
|
312
|
+
```json
|
|
313
|
+
{
|
|
314
|
+
"id": "smith2024",
|
|
315
|
+
"type": "article-journal",
|
|
316
|
+
"title": "Example Paper",
|
|
317
|
+
"custom": {
|
|
318
|
+
"uuid": "550e8400-e29b-41d4-a716-446655440000",
|
|
319
|
+
"tags": ["important", "to-read"],
|
|
320
|
+
"fulltext_pdf": "smith2024.pdf",
|
|
321
|
+
"fulltext_md": "smith2024.md"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
```
|
|
127
325
|
|
|
128
|
-
|
|
129
|
-
# Type checking
|
|
130
|
-
npm run typecheck
|
|
326
|
+
## Project Status
|
|
131
327
|
|
|
132
|
-
|
|
133
|
-
npm run lint
|
|
328
|
+
**Alpha** — This project is under active development. APIs and commands may change between versions.
|
|
134
329
|
|
|
135
|
-
|
|
136
|
-
npm run format
|
|
137
|
-
```
|
|
330
|
+
See [ROADMAP.md](./ROADMAP.md) for development progress and planned features.
|
|
138
331
|
|
|
139
|
-
##
|
|
332
|
+
## Development
|
|
140
333
|
|
|
141
|
-
|
|
334
|
+
### Build
|
|
142
335
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
- Ready for distribution
|
|
336
|
+
```bash
|
|
337
|
+
npm run build
|
|
338
|
+
```
|
|
147
339
|
|
|
148
|
-
|
|
340
|
+
### Test
|
|
149
341
|
|
|
150
|
-
|
|
342
|
+
```bash
|
|
343
|
+
npm test # Run all tests
|
|
344
|
+
npm run test:watch # Watch mode
|
|
345
|
+
npm run test:coverage # Coverage report
|
|
346
|
+
```
|
|
151
347
|
|
|
152
|
-
|
|
153
|
-
- **Features**: Search, Duplicate detection, 3-way merge, File monitoring
|
|
154
|
-
- **CLI**: Command-line interface with Commander.js
|
|
155
|
-
- **Server**: HTTP server with Hono
|
|
156
|
-
- **Utils**: Logging, File operations, Backup management
|
|
157
|
-
- **Config**: TOML-based configuration
|
|
348
|
+
### Quality Checks
|
|
158
349
|
|
|
159
|
-
|
|
350
|
+
```bash
|
|
351
|
+
npm run typecheck # TypeScript type checking
|
|
352
|
+
npm run lint # Linting
|
|
353
|
+
npm run format # Code formatting
|
|
354
|
+
```
|
|
160
355
|
|
|
161
356
|
## License
|
|
162
357
|
|
|
163
358
|
MIT
|
|
164
359
|
|
|
165
|
-
##
|
|
360
|
+
## Links
|
|
166
361
|
|
|
167
|
-
https://github.com/ncukondo/reference-manager
|
|
362
|
+
- [Repository](https://github.com/ncukondo/reference-manager)
|
|
363
|
+
- [npm Package](https://www.npmjs.com/package/@ncukondo/reference-manager)
|
|
364
|
+
- [Issues](https://github.com/ncukondo/reference-manager/issues)
|
|
365
|
+
- [Documentation](./spec/)
|