@mantra-ai/cli 0.1.8 → 0.1.10
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 +46 -22
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The open-source hypothesis generator hooked to Claude Code.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Discover papers across your Zotero library, local PDFs, and the mantra store. Mantra resolves metadata, fetches open-access full text, and normalizes everything into a structured local library backed by SQLite.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -15,38 +15,52 @@ Supports macOS (Apple Silicon & Intel) and Linux (x64 & ARM64).
|
|
|
15
15
|
## Quick start
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
mantra
|
|
19
|
-
mantra
|
|
20
|
-
mantra
|
|
21
|
-
mantra
|
|
22
|
-
mantra discover CRISPR off-target # search library, pick papers to add
|
|
23
|
-
mantra papers # list papers
|
|
24
|
-
mantra search "CRISPR" # full-text search
|
|
18
|
+
mantra init "my-review" # start a project
|
|
19
|
+
mantra discover CRISPR off-target # search all sources, pick papers to add
|
|
20
|
+
mantra discover 10.1038/s41586-024-07487-w # add by DOI directly
|
|
21
|
+
mantra hypothesize # generate hypotheses from project papers
|
|
25
22
|
```
|
|
26
23
|
|
|
27
|
-
###
|
|
24
|
+
### Discover
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
`discover` is the primary way to find and add papers to a project. It searches across all configured sources transparently:
|
|
27
|
+
|
|
28
|
+
- **Mantra store** — papers you've previously added
|
|
29
|
+
- **Zotero catalog** — title and author search in your Zotero library
|
|
30
|
+
- **PDF directories** — indexed PDFs with extracted DOIs
|
|
30
31
|
|
|
31
32
|
```bash
|
|
32
|
-
mantra
|
|
33
|
+
mantra discover genome editing techniques # search all sources
|
|
34
|
+
mantra discover --select all CRISPR # add all matches non-interactively
|
|
35
|
+
mantra discover --select 1,3 protein folding # add specific results
|
|
36
|
+
mantra discover 10.1234/example 2301.07041 # add by DOI or arXiv ID
|
|
33
37
|
```
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
Results from multiple sources are merged by DOI, so a paper in both your Zotero and mantra store appears once. When you select a paper from Zotero or a PDF directory, it's automatically ingested into the mantra store and linked to your project.
|
|
40
|
+
|
|
41
|
+
### Direct ingestion
|
|
42
|
+
|
|
43
|
+
Use `add` to ingest papers directly without a project context:
|
|
36
44
|
|
|
37
45
|
```bash
|
|
38
|
-
mantra add
|
|
46
|
+
mantra add 10.1038/s41586-024-07487-w # add by DOI
|
|
47
|
+
mantra add paper.pdf # add from a local PDF
|
|
39
48
|
```
|
|
40
49
|
|
|
41
|
-
|
|
50
|
+
### Batch ingestion
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
mantra add 10.1038/s41586-024-07487-w 10.1126/science.adg7879 PMC9876543 arXiv:2301.07041
|
|
54
|
+
mantra add --file dois.txt --delay 500 # from file, with rate limiting
|
|
55
|
+
```
|
|
42
56
|
|
|
43
57
|
## Commands
|
|
44
58
|
|
|
45
59
|
| Command | Description |
|
|
46
60
|
|---|---|
|
|
47
|
-
| `add [inputs...]` | Add papers by DOI, PMID, PMCID, arXiv ID, or PDF path |
|
|
48
61
|
| `init <name>` | Initialize a project in the current directory |
|
|
49
|
-
| `discover [inputs...]` | Find papers
|
|
62
|
+
| `discover [inputs...]` | Find papers across all sources and add to current project |
|
|
63
|
+
| `add [inputs...]` | Add papers by DOI, PMID, PMCID, arXiv ID, or PDF path |
|
|
50
64
|
| `papers` | List papers in the library or current project |
|
|
51
65
|
| `show <id>` | Show full details for a paper |
|
|
52
66
|
| `search <query>` | Full-text search with snippets |
|
|
@@ -70,19 +84,18 @@ When you add a paper, Mantra:
|
|
|
70
84
|
|
|
71
85
|
### Supported sources
|
|
72
86
|
|
|
73
|
-
Crossref, OpenAlex, EuropePMC, bioRxiv, medRxiv, arXiv, PLOS.
|
|
87
|
+
Crossref, OpenAlex, EuropePMC, bioRxiv, medRxiv, arXiv, PLOS, Zotero (local).
|
|
74
88
|
|
|
75
89
|
## Projects
|
|
76
90
|
|
|
77
|
-
Mantra organizes papers into per-directory projects
|
|
91
|
+
Mantra organizes papers into per-directory projects. Run `mantra init` to create a project, then use `discover` to find and curate papers from all your sources.
|
|
78
92
|
|
|
79
93
|
```bash
|
|
80
94
|
mkdir my-review && cd my-review
|
|
81
95
|
mantra init "my-review"
|
|
82
|
-
mantra discover
|
|
83
|
-
mantra discover
|
|
84
|
-
mantra
|
|
85
|
-
mantra papers --project # list only this project's papers
|
|
96
|
+
mantra discover protein aggregation # searches Zotero, PDFs, and mantra store
|
|
97
|
+
mantra discover --select all amyloid # add all matches non-interactively
|
|
98
|
+
mantra papers --project # list this project's papers
|
|
86
99
|
```
|
|
87
100
|
|
|
88
101
|
## Configuration
|
|
@@ -93,6 +106,17 @@ mantra config set key val # set a config value
|
|
|
93
106
|
mantra config path # show config file location
|
|
94
107
|
```
|
|
95
108
|
|
|
109
|
+
### Source configuration
|
|
110
|
+
|
|
111
|
+
Configure local sources so `discover` can search across them:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
mantra config set zoteroPath ~/Zotero # Zotero data directory
|
|
115
|
+
mantra config set pdfDirs ~/Papers # PDF directories to index
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
These are auto-detected during `mantra setup` if Zotero is installed.
|
|
119
|
+
|
|
96
120
|
### API keys
|
|
97
121
|
|
|
98
122
|
For PDF-to-structured-text conversion (when JATS XML is unavailable), set a Gemini API key:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantra-ai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "The open-source hypothesis generator hooked to Claude Code",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"bin/mantra"
|
|
11
11
|
],
|
|
12
12
|
"optionalDependencies": {
|
|
13
|
-
"@mantra-ai/cli-darwin-arm64": "0.1.
|
|
14
|
-
"@mantra-ai/cli-darwin-x64": "0.1.
|
|
15
|
-
"@mantra-ai/cli-linux-x64": "0.1.
|
|
16
|
-
"@mantra-ai/cli-linux-arm64": "0.1.
|
|
13
|
+
"@mantra-ai/cli-darwin-arm64": "0.1.10",
|
|
14
|
+
"@mantra-ai/cli-darwin-x64": "0.1.10",
|
|
15
|
+
"@mantra-ai/cli-linux-x64": "0.1.10",
|
|
16
|
+
"@mantra-ai/cli-linux-arm64": "0.1.10"
|
|
17
17
|
}
|
|
18
18
|
}
|