litman 1.0.0__tar.gz
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.
- litman-1.0.0/LICENSE +21 -0
- litman-1.0.0/PKG-INFO +274 -0
- litman-1.0.0/README.md +242 -0
- litman-1.0.0/pyproject.toml +101 -0
- litman-1.0.0/setup.cfg +4 -0
- litman-1.0.0/src/litman/__init__.py +3 -0
- litman-1.0.0/src/litman/__main__.py +6 -0
- litman-1.0.0/src/litman/cli.py +637 -0
- litman-1.0.0/src/litman/commands/__init__.py +0 -0
- litman-1.0.0/src/litman/commands/_drift.py +366 -0
- litman-1.0.0/src/litman/commands/_registry_first_time.py +61 -0
- litman-1.0.0/src/litman/commands/add.py +569 -0
- litman-1.0.0/src/litman/commands/code.py +883 -0
- litman-1.0.0/src/litman/commands/config.py +108 -0
- litman-1.0.0/src/litman/commands/drop.py +75 -0
- litman-1.0.0/src/litman/commands/export.py +273 -0
- litman-1.0.0/src/litman/commands/health.py +316 -0
- litman-1.0.0/src/litman/commands/init.py +151 -0
- litman-1.0.0/src/litman/commands/install_completion.py +189 -0
- litman-1.0.0/src/litman/commands/install_skill.py +113 -0
- litman-1.0.0/src/litman/commands/link.py +331 -0
- litman-1.0.0/src/litman/commands/list.py +367 -0
- litman-1.0.0/src/litman/commands/modify.py +636 -0
- litman-1.0.0/src/litman/commands/open.py +133 -0
- litman-1.0.0/src/litman/commands/pdf_text.py +104 -0
- litman-1.0.0/src/litman/commands/project.py +589 -0
- litman-1.0.0/src/litman/commands/promote.py +75 -0
- litman-1.0.0/src/litman/commands/read.py +89 -0
- litman-1.0.0/src/litman/commands/refresh.py +97 -0
- litman-1.0.0/src/litman/commands/related.py +130 -0
- litman-1.0.0/src/litman/commands/rename.py +363 -0
- litman-1.0.0/src/litman/commands/revisit.py +91 -0
- litman-1.0.0/src/litman/commands/rm.py +623 -0
- litman-1.0.0/src/litman/commands/search.py +114 -0
- litman-1.0.0/src/litman/commands/setup.py +321 -0
- litman-1.0.0/src/litman/commands/show.py +110 -0
- litman-1.0.0/src/litman/commands/skim.py +68 -0
- litman-1.0.0/src/litman/commands/sync.py +668 -0
- litman-1.0.0/src/litman/commands/taxonomy.py +765 -0
- litman-1.0.0/src/litman/commands/trash.py +403 -0
- litman-1.0.0/src/litman/commands/vault.py +411 -0
- litman-1.0.0/src/litman/core/__init__.py +0 -0
- litman-1.0.0/src/litman/core/atomic.py +659 -0
- litman-1.0.0/src/litman/core/checks.py +2378 -0
- litman-1.0.0/src/litman/core/code.py +1014 -0
- litman-1.0.0/src/litman/core/code_scan.py +126 -0
- litman-1.0.0/src/litman/core/config.py +243 -0
- litman-1.0.0/src/litman/core/confirm.py +85 -0
- litman-1.0.0/src/litman/core/correctors.py +332 -0
- litman-1.0.0/src/litman/core/dates.py +84 -0
- litman-1.0.0/src/litman/core/dedup.py +187 -0
- litman-1.0.0/src/litman/core/document.py +136 -0
- litman-1.0.0/src/litman/core/id.py +297 -0
- litman-1.0.0/src/litman/core/library.py +258 -0
- litman-1.0.0/src/litman/core/locking.py +137 -0
- litman-1.0.0/src/litman/core/notes.py +149 -0
- litman-1.0.0/src/litman/core/paper_lookup.py +216 -0
- litman-1.0.0/src/litman/core/pdf_text.py +70 -0
- litman-1.0.0/src/litman/core/portable_link.py +165 -0
- litman-1.0.0/src/litman/core/project_link.py +448 -0
- litman-1.0.0/src/litman/core/project_refs.py +274 -0
- litman-1.0.0/src/litman/core/query.py +116 -0
- litman-1.0.0/src/litman/core/related.py +149 -0
- litman-1.0.0/src/litman/core/relations.py +54 -0
- litman-1.0.0/src/litman/core/search.py +87 -0
- litman-1.0.0/src/litman/core/seeds.py +127 -0
- litman-1.0.0/src/litman/core/skill.py +226 -0
- litman-1.0.0/src/litman/core/sync.py +650 -0
- litman-1.0.0/src/litman/core/taxonomy.py +189 -0
- litman-1.0.0/src/litman/core/trash.py +736 -0
- litman-1.0.0/src/litman/core/vault_registry.py +501 -0
- litman-1.0.0/src/litman/core/viewer.py +218 -0
- litman-1.0.0/src/litman/core/views.py +329 -0
- litman-1.0.0/src/litman/exceptions.py +163 -0
- litman-1.0.0/src/litman/exporters/__init__.py +8 -0
- litman-1.0.0/src/litman/exporters/bibtex.py +255 -0
- litman-1.0.0/src/litman/importers/__init__.py +21 -0
- litman-1.0.0/src/litman/importers/crossref.py +158 -0
- litman-1.0.0/src/litman/importers/llm.py +248 -0
- litman-1.0.0/src/litman/skills/__init__.py +6 -0
- litman-1.0.0/src/litman/skills/lit-library/SKILL.md +496 -0
- litman-1.0.0/src/litman/skills/lit-reading/SKILL.md +370 -0
- litman-1.0.0/src/litman.egg-info/PKG-INFO +274 -0
- litman-1.0.0/src/litman.egg-info/SOURCES.txt +87 -0
- litman-1.0.0/src/litman.egg-info/dependency_links.txt +1 -0
- litman-1.0.0/src/litman.egg-info/entry_points.txt +2 -0
- litman-1.0.0/src/litman.egg-info/requires.txt +13 -0
- litman-1.0.0/src/litman.egg-info/top_level.txt +1 -0
- litman-1.0.0/tests/test_smoke.py +80 -0
litman-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Wangq
|
|
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.
|
litman-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: litman
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Local-first, AI-augmented literature management CLI
|
|
5
|
+
Author-email: Qingxin Wang <qingxinwong1999@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: literature,bibliography,reference-manager,papers,bibtex,knowledge-management,cli,local-first,claude-code,ai-agent
|
|
8
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering
|
|
16
|
+
Requires-Python: >=3.12
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: click<9,>=8.1
|
|
20
|
+
Requires-Dist: ruamel.yaml>=0.18
|
|
21
|
+
Requires-Dist: httpx>=0.27
|
|
22
|
+
Requires-Dist: pypdf>=4.0
|
|
23
|
+
Requires-Dist: pydantic>=2.5
|
|
24
|
+
Requires-Dist: rich>=13.0
|
|
25
|
+
Requires-Dist: platformdirs>=4.0
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
29
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
30
|
+
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
<h1>LITerature MANager <img src="assets/logo1.png" width="120" align="right"/></h1>
|
|
34
|
+
|
|
35
|
+
<br clear="all"/>
|
|
36
|
+
|
|
37
|
+
<div align="center">
|
|
38
|
+
|
|
39
|
+
<img src="assets/logo2.svg" width="58%" alt="LITMAN"/>
|
|
40
|
+
|
|
41
|
+
<p>
|
|
42
|
+
<img src="https://img.shields.io/badge/python-3.12%2B-3776AB?logo=python&logoColor=white" alt="Python 3.12+"/>
|
|
43
|
+
<img src="https://img.shields.io/badge/license-MIT-green" alt="License: MIT"/>
|
|
44
|
+
<img src="https://img.shields.io/badge/AI--native-Claude%20Code-D97757?logo=anthropic&logoColor=white" alt="AI-native: Claude Code"/>
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
<p><b>English</b> | <a href="README-CN.md">中文</a></p>
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
**Local-first, AI-augmented literature management CLI.**
|
|
52
|
+
|
|
53
|
+
A local knowledge base for research papers, stored as plain files on your
|
|
54
|
+
disk. Papers link explicitly to projects, code repositories, and each other
|
|
55
|
+
through structured metadata and symlinks. Bundled Claude Code skills let an
|
|
56
|
+
AI agent operate the CLI on your behalf; every command works equally well
|
|
57
|
+
typed by hand.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Know before you use
|
|
62
|
+
|
|
63
|
+
A few things worth knowing up front:
|
|
64
|
+
|
|
65
|
+
1. **Don't move a vault or project folder by hand.** Links (symlinks, project
|
|
66
|
+
bridges, the registry) are path-based and will break. If you must move one,
|
|
67
|
+
run `lit health-check` afterwards to find and repair what broke.
|
|
68
|
+
2. **Figure/table reading needs a multimodal model.** A text-only model falls
|
|
69
|
+
back to plain-text extraction (pypdf) and cannot see figures or
|
|
70
|
+
image-based tables — don't ask it "what does Fig./Table N show?" without a
|
|
71
|
+
vision or OCR backend attached.
|
|
72
|
+
3. **Don't edit metadata by hand.** Use `lit` commands to modify papers,
|
|
73
|
+
taxonomy, and config — or ask an AI agent if you're unsure which command
|
|
74
|
+
to use.
|
|
75
|
+
4. **Windows users.** Symlink-based features (browsing views, project bridges)
|
|
76
|
+
require administrator privileges; all other commands work regardless.
|
|
77
|
+
[WSL](https://learn.microsoft.com/en-us/windows/wsl/) is recommended.
|
|
78
|
+
|
|
79
|
+
## Key Features
|
|
80
|
+
|
|
81
|
+
1. **Long-term reliable local knowledge vault.** Everything is plain
|
|
82
|
+
text on your filesystem — YAML metadata, markdown notes, original
|
|
83
|
+
PDFs. No cloud database, no proprietary container format. Back it up
|
|
84
|
+
anywhere, read every file as plain text, `grep` the whole library.
|
|
85
|
+
|
|
86
|
+
2. **Consistent by design.** Topics, methods, projects, and data
|
|
87
|
+
sources are governed by a shared `TAXONOMY.md` controlled vocabulary.
|
|
88
|
+
Atomic operations keep cross-references clean as the library grows,
|
|
89
|
+
and `lit health-check` catches any drift before it accumulates.
|
|
90
|
+
|
|
91
|
+
3. **Paper ↔ project ↔ code triangle.** One paper can be bound to
|
|
92
|
+
multiple projects without duplication; each project gets its own
|
|
93
|
+
symlinked working folder and an auto-generated `REFERENCES.md`. Each
|
|
94
|
+
paper can also be bound to its official code repository, cloned
|
|
95
|
+
inside the vault. Metadata fields and symlinks together form an
|
|
96
|
+
explicit, navigable knowledge graph — no manual upkeep required.
|
|
97
|
+
|
|
98
|
+
4. **AI-native CLI.** Two bundled Claude Code skills (`lit-library` for
|
|
99
|
+
ingestion and retrieval, `lit-reading` for reading assistance) teach
|
|
100
|
+
an agent how to navigate the vault and operate the CLI on your
|
|
101
|
+
behalf. The agent emits structured JSON; the CLI validates and
|
|
102
|
+
writes the data — your library stays correct even when the model
|
|
103
|
+
isn't perfect.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Install
|
|
108
|
+
|
|
109
|
+
litman is a Python CLI tool. Install with **pipx** so `lit` is permanently
|
|
110
|
+
available in every shell, isolated from your other Python environments.
|
|
111
|
+
Don't have pipx? See [pipx.pypa.io](https://pipx.pypa.io).
|
|
112
|
+
|
|
113
|
+
**From PyPI** (recommended):
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
pipx install litman # first install
|
|
117
|
+
pipx upgrade litman # update
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**From a local clone** (development):
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# first install
|
|
124
|
+
git clone https://github.com/wqx1999/litman.git
|
|
125
|
+
cd litman
|
|
126
|
+
pipx install .
|
|
127
|
+
|
|
128
|
+
# update (pull latest code first)
|
|
129
|
+
git pull
|
|
130
|
+
pipx install --force .
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Then run the one-shot setup wizard:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
lit setup # interactive wizard: shell completion → Claude Code skill → vault setup → (optional) cloud sync
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Quick start
|
|
140
|
+
|
|
141
|
+
### With an AI agent
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
Create a new vault at /work/me/.
|
|
145
|
+
Add ~/Downloads/attention_is_all_you_need.pdf to my vault.
|
|
146
|
+
Show me all papers tagged with topic: transformer.
|
|
147
|
+
Tag 2017_Vaswani_Attention with topic: attention.
|
|
148
|
+
Link 2017_Vaswani_Attention to project MyResearchProject.
|
|
149
|
+
Remove 2017_Vaswani_Attention from my vault.
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### CLI
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# create a vault (pass the parent dir; CLI creates the subdir and registers it)
|
|
156
|
+
lit init /work/me/
|
|
157
|
+
|
|
158
|
+
# add a paper
|
|
159
|
+
lit add ~/Downloads/attention_is_all_you_need.pdf --doi 10.48550/arXiv.1706.03762
|
|
160
|
+
|
|
161
|
+
# browse
|
|
162
|
+
lit list
|
|
163
|
+
lit show 2017_Vaswani_Attention
|
|
164
|
+
|
|
165
|
+
# tag
|
|
166
|
+
lit taxonomy add topics transformer
|
|
167
|
+
lit modify 2017_Vaswani_Attention --add-tag topics=transformer
|
|
168
|
+
|
|
169
|
+
# link to a project
|
|
170
|
+
lit link 2017_Vaswani_Attention --project MyResearchProject
|
|
171
|
+
|
|
172
|
+
# remove
|
|
173
|
+
lit rm 2017_Vaswani_Attention
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Agent model benchmark
|
|
180
|
+
|
|
181
|
+
litman's agent layer (the bundled `lit-library` and `lit-reading` skills) is
|
|
182
|
+
meant to work with whatever model you point Claude Code at, not only Anthropic's.
|
|
183
|
+
To see how well different models drive it, we ran each one as the Claude Code
|
|
184
|
+
backend and had it operate litman through the skills, over **22 everyday-workflow
|
|
185
|
+
tasks** (add, read, tag, modify, link, export, taxonomy edits, health checks,
|
|
186
|
+
...), 3 rounds each, on the **litman 1.0.0** codebase ([commit 876d11c](https://github.com/wqx1999/litman/commit/876d11c), June 2026).
|
|
187
|
+
|
|
188
|
+
**What the score is.** Each task is a **single-turn prompt in a clean context**:
|
|
189
|
+
a fresh agent gets one natural-language instruction and must complete it in that
|
|
190
|
+
one turn, with no prior conversation and no follow-up. **TRR** (task-completion
|
|
191
|
+
rate) is the fraction of tasks the resulting vault state passed; **RA** (routing
|
|
192
|
+
accuracy) is how often the agent picked the correct skill for a request.
|
|
193
|
+
|
|
194
|
+
**A low score does not mean the model cannot operate litman.** It means the model
|
|
195
|
+
less often *one-shots* the task from a cold start. With more guidance (a more
|
|
196
|
+
detailed request, or a few follow-up turns) a lower-scoring model can still do the
|
|
197
|
+
same work. This is a deliberately hard zero-shot floor, not a ceiling.
|
|
198
|
+
|
|
199
|
+
| Model | Task completion (TRR) | Routing (RA) |
|
|
200
|
+
|:---|---:|---:|
|
|
201
|
+
| [Claude Sonnet 4.6](https://www.anthropic.com) | 97% | 100% |
|
|
202
|
+
| [Claude Haiku 4.5](https://www.anthropic.com) | 97% | 79% |
|
|
203
|
+
| [DeepSeek-V4 Flash](https://www.deepseek.com) | 80% | 71% |
|
|
204
|
+
| [DeepSeek-V4 Pro](https://www.deepseek.com) | 76% | 57% |
|
|
205
|
+
| [MiniMax-M3](https://www.minimax.io) | 71% | 75% |
|
|
206
|
+
| [GLM-5.1](https://z.ai/model-api) | 58% | 64% |
|
|
207
|
+
| [MiMo-V2.5 Pro](https://mimo.mi.com/) | 26% | 0% |
|
|
208
|
+
| [MiMo-V2.5](https://mimo.mi.com/) | 21% | 0% |
|
|
209
|
+
|
|
210
|
+
TRR is the mean over the 22 auto-scored tasks across 3 rounds; network-dependent
|
|
211
|
+
and multi-turn scenarios (code cloning, cloud sync, a multi-turn recovery case)
|
|
212
|
+
are excluded from this single-turn score. Whatever the model scores, the data
|
|
213
|
+
layer validates every write — a wrong command fails loudly rather than writing
|
|
214
|
+
bad data into the vault, so a lower-scoring model needs more turns but never
|
|
215
|
+
corrupts the library.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Documentation
|
|
220
|
+
|
|
221
|
+
Full documentation lives under [`docs/`](docs/). New to litman? The
|
|
222
|
+
[tutorial](docs/5-tutorial.md) covers about 80% of everyday use; for anything
|
|
223
|
+
else, ask the agent or check the command reference. [docs/0-readme.md](docs/0-readme.md)
|
|
224
|
+
maps out the whole set.
|
|
225
|
+
|
|
226
|
+
| Topic | File |
|
|
227
|
+
|---|---|
|
|
228
|
+
| Start here — docs map | [docs/0-readme.md](docs/0-readme.md) |
|
|
229
|
+
| Design philosophy | [docs/1-philosophy.md](docs/1-philosophy.md) |
|
|
230
|
+
| Four-layer architecture | [docs/2-architecture.md](docs/2-architecture.md) |
|
|
231
|
+
| Concepts and field reference (`metadata.yaml`, `lit-config.yaml`, `TAXONOMY.md`) | [docs/3-concepts.md](docs/3-concepts.md) |
|
|
232
|
+
| Command reference | [docs/4-commands.md](docs/4-commands.md) |
|
|
233
|
+
| Tutorial | [docs/5-tutorial.md](docs/5-tutorial.md) |
|
|
234
|
+
|
|
235
|
+
Local-preview the docs as a static site:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
pip install mkdocs mkdocs-material
|
|
239
|
+
mkdocs serve
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Acknowledgments
|
|
243
|
+
|
|
244
|
+
This tool was developed in the [Süssmuth Lab](https://www.tu.berlin/en/biochemie/research/research-in-suessmuth-group), Technische Universität Berlin. Development was carried out with access to the [TU Berlin HPC cluster](https://www.tu.berlin/en/hpc-cluster/introduction-slurm-version).
|
|
245
|
+
|
|
246
|
+
This project was built with the help of AI-powered development tools:
|
|
247
|
+
|
|
248
|
+
[](https://claude.ai/code)
|
|
249
|
+
[](https://cursor.sh)
|
|
250
|
+
|
|
251
|
+
Core dependencies that make litman possible:
|
|
252
|
+
|
|
253
|
+
[](https://click.palletsprojects.com/)
|
|
254
|
+
[](https://pypi.org/project/ruamel.yaml/)
|
|
255
|
+
[](https://pypdf.readthedocs.io/)
|
|
256
|
+
[](https://docs.pydantic.dev/)
|
|
257
|
+
[](https://rich.readthedocs.io/)
|
|
258
|
+
[](https://www.python-httpx.org/)
|
|
259
|
+
|
|
260
|
+
Cloud sync (`lit sync`) is powered by [rclone](https://rclone.org/), the external
|
|
261
|
+
CLI that mirrors the vault to any cloud backend it supports — the backbone of how
|
|
262
|
+
a vault gets backed up and moved between machines:
|
|
263
|
+
|
|
264
|
+
[](https://rclone.org/)
|
|
265
|
+
|
|
266
|
+
Octopus mascot generated with [Doubao](https://www.doubao.com/) (AI image generation).
|
|
267
|
+
|
|
268
|
+
## License
|
|
269
|
+
|
|
270
|
+
MIT. See [`LICENSE`](LICENSE).
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
<sub>AI agents: a condensed, link-dense map of this project lives in [README-Agent.md](README-Agent.md).</sub>
|
litman-1.0.0/README.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
<h1>LITerature MANager <img src="assets/logo1.png" width="120" align="right"/></h1>
|
|
2
|
+
|
|
3
|
+
<br clear="all"/>
|
|
4
|
+
|
|
5
|
+
<div align="center">
|
|
6
|
+
|
|
7
|
+
<img src="assets/logo2.svg" width="58%" alt="LITMAN"/>
|
|
8
|
+
|
|
9
|
+
<p>
|
|
10
|
+
<img src="https://img.shields.io/badge/python-3.12%2B-3776AB?logo=python&logoColor=white" alt="Python 3.12+"/>
|
|
11
|
+
<img src="https://img.shields.io/badge/license-MIT-green" alt="License: MIT"/>
|
|
12
|
+
<img src="https://img.shields.io/badge/AI--native-Claude%20Code-D97757?logo=anthropic&logoColor=white" alt="AI-native: Claude Code"/>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p><b>English</b> | <a href="README-CN.md">中文</a></p>
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
**Local-first, AI-augmented literature management CLI.**
|
|
20
|
+
|
|
21
|
+
A local knowledge base for research papers, stored as plain files on your
|
|
22
|
+
disk. Papers link explicitly to projects, code repositories, and each other
|
|
23
|
+
through structured metadata and symlinks. Bundled Claude Code skills let an
|
|
24
|
+
AI agent operate the CLI on your behalf; every command works equally well
|
|
25
|
+
typed by hand.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Know before you use
|
|
30
|
+
|
|
31
|
+
A few things worth knowing up front:
|
|
32
|
+
|
|
33
|
+
1. **Don't move a vault or project folder by hand.** Links (symlinks, project
|
|
34
|
+
bridges, the registry) are path-based and will break. If you must move one,
|
|
35
|
+
run `lit health-check` afterwards to find and repair what broke.
|
|
36
|
+
2. **Figure/table reading needs a multimodal model.** A text-only model falls
|
|
37
|
+
back to plain-text extraction (pypdf) and cannot see figures or
|
|
38
|
+
image-based tables — don't ask it "what does Fig./Table N show?" without a
|
|
39
|
+
vision or OCR backend attached.
|
|
40
|
+
3. **Don't edit metadata by hand.** Use `lit` commands to modify papers,
|
|
41
|
+
taxonomy, and config — or ask an AI agent if you're unsure which command
|
|
42
|
+
to use.
|
|
43
|
+
4. **Windows users.** Symlink-based features (browsing views, project bridges)
|
|
44
|
+
require administrator privileges; all other commands work regardless.
|
|
45
|
+
[WSL](https://learn.microsoft.com/en-us/windows/wsl/) is recommended.
|
|
46
|
+
|
|
47
|
+
## Key Features
|
|
48
|
+
|
|
49
|
+
1. **Long-term reliable local knowledge vault.** Everything is plain
|
|
50
|
+
text on your filesystem — YAML metadata, markdown notes, original
|
|
51
|
+
PDFs. No cloud database, no proprietary container format. Back it up
|
|
52
|
+
anywhere, read every file as plain text, `grep` the whole library.
|
|
53
|
+
|
|
54
|
+
2. **Consistent by design.** Topics, methods, projects, and data
|
|
55
|
+
sources are governed by a shared `TAXONOMY.md` controlled vocabulary.
|
|
56
|
+
Atomic operations keep cross-references clean as the library grows,
|
|
57
|
+
and `lit health-check` catches any drift before it accumulates.
|
|
58
|
+
|
|
59
|
+
3. **Paper ↔ project ↔ code triangle.** One paper can be bound to
|
|
60
|
+
multiple projects without duplication; each project gets its own
|
|
61
|
+
symlinked working folder and an auto-generated `REFERENCES.md`. Each
|
|
62
|
+
paper can also be bound to its official code repository, cloned
|
|
63
|
+
inside the vault. Metadata fields and symlinks together form an
|
|
64
|
+
explicit, navigable knowledge graph — no manual upkeep required.
|
|
65
|
+
|
|
66
|
+
4. **AI-native CLI.** Two bundled Claude Code skills (`lit-library` for
|
|
67
|
+
ingestion and retrieval, `lit-reading` for reading assistance) teach
|
|
68
|
+
an agent how to navigate the vault and operate the CLI on your
|
|
69
|
+
behalf. The agent emits structured JSON; the CLI validates and
|
|
70
|
+
writes the data — your library stays correct even when the model
|
|
71
|
+
isn't perfect.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Install
|
|
76
|
+
|
|
77
|
+
litman is a Python CLI tool. Install with **pipx** so `lit` is permanently
|
|
78
|
+
available in every shell, isolated from your other Python environments.
|
|
79
|
+
Don't have pipx? See [pipx.pypa.io](https://pipx.pypa.io).
|
|
80
|
+
|
|
81
|
+
**From PyPI** (recommended):
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pipx install litman # first install
|
|
85
|
+
pipx upgrade litman # update
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**From a local clone** (development):
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# first install
|
|
92
|
+
git clone https://github.com/wqx1999/litman.git
|
|
93
|
+
cd litman
|
|
94
|
+
pipx install .
|
|
95
|
+
|
|
96
|
+
# update (pull latest code first)
|
|
97
|
+
git pull
|
|
98
|
+
pipx install --force .
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Then run the one-shot setup wizard:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
lit setup # interactive wizard: shell completion → Claude Code skill → vault setup → (optional) cloud sync
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Quick start
|
|
108
|
+
|
|
109
|
+
### With an AI agent
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
Create a new vault at /work/me/.
|
|
113
|
+
Add ~/Downloads/attention_is_all_you_need.pdf to my vault.
|
|
114
|
+
Show me all papers tagged with topic: transformer.
|
|
115
|
+
Tag 2017_Vaswani_Attention with topic: attention.
|
|
116
|
+
Link 2017_Vaswani_Attention to project MyResearchProject.
|
|
117
|
+
Remove 2017_Vaswani_Attention from my vault.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### CLI
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# create a vault (pass the parent dir; CLI creates the subdir and registers it)
|
|
124
|
+
lit init /work/me/
|
|
125
|
+
|
|
126
|
+
# add a paper
|
|
127
|
+
lit add ~/Downloads/attention_is_all_you_need.pdf --doi 10.48550/arXiv.1706.03762
|
|
128
|
+
|
|
129
|
+
# browse
|
|
130
|
+
lit list
|
|
131
|
+
lit show 2017_Vaswani_Attention
|
|
132
|
+
|
|
133
|
+
# tag
|
|
134
|
+
lit taxonomy add topics transformer
|
|
135
|
+
lit modify 2017_Vaswani_Attention --add-tag topics=transformer
|
|
136
|
+
|
|
137
|
+
# link to a project
|
|
138
|
+
lit link 2017_Vaswani_Attention --project MyResearchProject
|
|
139
|
+
|
|
140
|
+
# remove
|
|
141
|
+
lit rm 2017_Vaswani_Attention
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Agent model benchmark
|
|
148
|
+
|
|
149
|
+
litman's agent layer (the bundled `lit-library` and `lit-reading` skills) is
|
|
150
|
+
meant to work with whatever model you point Claude Code at, not only Anthropic's.
|
|
151
|
+
To see how well different models drive it, we ran each one as the Claude Code
|
|
152
|
+
backend and had it operate litman through the skills, over **22 everyday-workflow
|
|
153
|
+
tasks** (add, read, tag, modify, link, export, taxonomy edits, health checks,
|
|
154
|
+
...), 3 rounds each, on the **litman 1.0.0** codebase ([commit 876d11c](https://github.com/wqx1999/litman/commit/876d11c), June 2026).
|
|
155
|
+
|
|
156
|
+
**What the score is.** Each task is a **single-turn prompt in a clean context**:
|
|
157
|
+
a fresh agent gets one natural-language instruction and must complete it in that
|
|
158
|
+
one turn, with no prior conversation and no follow-up. **TRR** (task-completion
|
|
159
|
+
rate) is the fraction of tasks the resulting vault state passed; **RA** (routing
|
|
160
|
+
accuracy) is how often the agent picked the correct skill for a request.
|
|
161
|
+
|
|
162
|
+
**A low score does not mean the model cannot operate litman.** It means the model
|
|
163
|
+
less often *one-shots* the task from a cold start. With more guidance (a more
|
|
164
|
+
detailed request, or a few follow-up turns) a lower-scoring model can still do the
|
|
165
|
+
same work. This is a deliberately hard zero-shot floor, not a ceiling.
|
|
166
|
+
|
|
167
|
+
| Model | Task completion (TRR) | Routing (RA) |
|
|
168
|
+
|:---|---:|---:|
|
|
169
|
+
| [Claude Sonnet 4.6](https://www.anthropic.com) | 97% | 100% |
|
|
170
|
+
| [Claude Haiku 4.5](https://www.anthropic.com) | 97% | 79% |
|
|
171
|
+
| [DeepSeek-V4 Flash](https://www.deepseek.com) | 80% | 71% |
|
|
172
|
+
| [DeepSeek-V4 Pro](https://www.deepseek.com) | 76% | 57% |
|
|
173
|
+
| [MiniMax-M3](https://www.minimax.io) | 71% | 75% |
|
|
174
|
+
| [GLM-5.1](https://z.ai/model-api) | 58% | 64% |
|
|
175
|
+
| [MiMo-V2.5 Pro](https://mimo.mi.com/) | 26% | 0% |
|
|
176
|
+
| [MiMo-V2.5](https://mimo.mi.com/) | 21% | 0% |
|
|
177
|
+
|
|
178
|
+
TRR is the mean over the 22 auto-scored tasks across 3 rounds; network-dependent
|
|
179
|
+
and multi-turn scenarios (code cloning, cloud sync, a multi-turn recovery case)
|
|
180
|
+
are excluded from this single-turn score. Whatever the model scores, the data
|
|
181
|
+
layer validates every write — a wrong command fails loudly rather than writing
|
|
182
|
+
bad data into the vault, so a lower-scoring model needs more turns but never
|
|
183
|
+
corrupts the library.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Documentation
|
|
188
|
+
|
|
189
|
+
Full documentation lives under [`docs/`](docs/). New to litman? The
|
|
190
|
+
[tutorial](docs/5-tutorial.md) covers about 80% of everyday use; for anything
|
|
191
|
+
else, ask the agent or check the command reference. [docs/0-readme.md](docs/0-readme.md)
|
|
192
|
+
maps out the whole set.
|
|
193
|
+
|
|
194
|
+
| Topic | File |
|
|
195
|
+
|---|---|
|
|
196
|
+
| Start here — docs map | [docs/0-readme.md](docs/0-readme.md) |
|
|
197
|
+
| Design philosophy | [docs/1-philosophy.md](docs/1-philosophy.md) |
|
|
198
|
+
| Four-layer architecture | [docs/2-architecture.md](docs/2-architecture.md) |
|
|
199
|
+
| Concepts and field reference (`metadata.yaml`, `lit-config.yaml`, `TAXONOMY.md`) | [docs/3-concepts.md](docs/3-concepts.md) |
|
|
200
|
+
| Command reference | [docs/4-commands.md](docs/4-commands.md) |
|
|
201
|
+
| Tutorial | [docs/5-tutorial.md](docs/5-tutorial.md) |
|
|
202
|
+
|
|
203
|
+
Local-preview the docs as a static site:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
pip install mkdocs mkdocs-material
|
|
207
|
+
mkdocs serve
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Acknowledgments
|
|
211
|
+
|
|
212
|
+
This tool was developed in the [Süssmuth Lab](https://www.tu.berlin/en/biochemie/research/research-in-suessmuth-group), Technische Universität Berlin. Development was carried out with access to the [TU Berlin HPC cluster](https://www.tu.berlin/en/hpc-cluster/introduction-slurm-version).
|
|
213
|
+
|
|
214
|
+
This project was built with the help of AI-powered development tools:
|
|
215
|
+
|
|
216
|
+
[](https://claude.ai/code)
|
|
217
|
+
[](https://cursor.sh)
|
|
218
|
+
|
|
219
|
+
Core dependencies that make litman possible:
|
|
220
|
+
|
|
221
|
+
[](https://click.palletsprojects.com/)
|
|
222
|
+
[](https://pypi.org/project/ruamel.yaml/)
|
|
223
|
+
[](https://pypdf.readthedocs.io/)
|
|
224
|
+
[](https://docs.pydantic.dev/)
|
|
225
|
+
[](https://rich.readthedocs.io/)
|
|
226
|
+
[](https://www.python-httpx.org/)
|
|
227
|
+
|
|
228
|
+
Cloud sync (`lit sync`) is powered by [rclone](https://rclone.org/), the external
|
|
229
|
+
CLI that mirrors the vault to any cloud backend it supports — the backbone of how
|
|
230
|
+
a vault gets backed up and moved between machines:
|
|
231
|
+
|
|
232
|
+
[](https://rclone.org/)
|
|
233
|
+
|
|
234
|
+
Octopus mascot generated with [Doubao](https://www.doubao.com/) (AI image generation).
|
|
235
|
+
|
|
236
|
+
## License
|
|
237
|
+
|
|
238
|
+
MIT. See [`LICENSE`](LICENSE).
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
<sub>AI agents: a condensed, link-dense map of this project lives in [README-Agent.md](README-Agent.md).</sub>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "litman"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Local-first, AI-augmented literature management CLI"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Qingxin Wang", email = "qingxinwong1999@gmail.com" },
|
|
15
|
+
]
|
|
16
|
+
keywords = [
|
|
17
|
+
"literature", "bibliography", "reference-manager", "papers", "bibtex",
|
|
18
|
+
"knowledge-management", "cli", "local-first", "claude-code", "ai-agent",
|
|
19
|
+
]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Development Status :: 5 - Production/Stable",
|
|
22
|
+
"Environment :: Console",
|
|
23
|
+
"Intended Audience :: Science/Research",
|
|
24
|
+
"Operating System :: POSIX :: Linux",
|
|
25
|
+
"Operating System :: MacOS",
|
|
26
|
+
"Programming Language :: Python :: 3",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Topic :: Scientific/Engineering",
|
|
29
|
+
]
|
|
30
|
+
dependencies = [
|
|
31
|
+
"click>=8.1,<9",
|
|
32
|
+
"ruamel.yaml>=0.18",
|
|
33
|
+
"httpx>=0.27",
|
|
34
|
+
"pypdf>=4.0",
|
|
35
|
+
"pydantic>=2.5",
|
|
36
|
+
"rich>=13.0",
|
|
37
|
+
"platformdirs>=4.0",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[project.optional-dependencies]
|
|
41
|
+
dev = [
|
|
42
|
+
"pytest>=7",
|
|
43
|
+
"pytest-cov",
|
|
44
|
+
"ruff>=0.4",
|
|
45
|
+
"mypy>=1.10",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[project.scripts]
|
|
49
|
+
lit = "litman.cli:main"
|
|
50
|
+
|
|
51
|
+
# Single source of truth for the version: src/litman/__init__.py __version__.
|
|
52
|
+
# pyproject reads it via attr so `lit --version`, the wheel metadata, and the
|
|
53
|
+
# string in exported BibTeX / the Crossref User-Agent can never drift apart.
|
|
54
|
+
# Bump __version__ following semver for each release; tag the commit v<X.Y.Z>.
|
|
55
|
+
[tool.setuptools.dynamic]
|
|
56
|
+
version = { attr = "litman.__version__" }
|
|
57
|
+
|
|
58
|
+
[tool.setuptools.packages.find]
|
|
59
|
+
where = ["src"]
|
|
60
|
+
include = ["litman*"]
|
|
61
|
+
|
|
62
|
+
# Bundle the skill markdown files so `lit install-skill` can copy them
|
|
63
|
+
# from the installed package via importlib.resources. Without this, the
|
|
64
|
+
# skill subdirectories are dropped by the wheel build because they
|
|
65
|
+
# contain no Python sources. Add a pair of patterns for every new skill.
|
|
66
|
+
[tool.setuptools.package-data]
|
|
67
|
+
"litman.skills" = [
|
|
68
|
+
"lit-library/*", "lit-library/**/*",
|
|
69
|
+
"lit-reading/*", "lit-reading/**/*",
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
[tool.ruff]
|
|
73
|
+
line-length = 100
|
|
74
|
+
target-version = "py312"
|
|
75
|
+
src = ["src"]
|
|
76
|
+
|
|
77
|
+
[tool.ruff.lint]
|
|
78
|
+
select = [
|
|
79
|
+
"E", # pycodestyle errors
|
|
80
|
+
"W", # pycodestyle warnings
|
|
81
|
+
"F", # pyflakes
|
|
82
|
+
"I", # isort
|
|
83
|
+
"B", # flake8-bugbear
|
|
84
|
+
"UP", # pyupgrade
|
|
85
|
+
"SIM", # flake8-simplify
|
|
86
|
+
"C4", # flake8-comprehensions
|
|
87
|
+
"RUF", # ruff-specific
|
|
88
|
+
]
|
|
89
|
+
|
|
90
|
+
[tool.ruff.lint.per-file-ignores]
|
|
91
|
+
"tests/*" = ["B011"] # tests can use `assert False`
|
|
92
|
+
|
|
93
|
+
[tool.mypy]
|
|
94
|
+
python_version = "3.12"
|
|
95
|
+
strict = true
|
|
96
|
+
warn_unused_ignores = true
|
|
97
|
+
files = ["src/litman", "tests"]
|
|
98
|
+
|
|
99
|
+
[tool.pytest.ini_options]
|
|
100
|
+
testpaths = ["tests"]
|
|
101
|
+
addopts = "-ra --strict-markers"
|
litman-1.0.0/setup.cfg
ADDED