Ana10:12
“…the dot products grow large in magnitude, pushing the softmax function into regions where it has extremely small gradients.”
The scores grow with dk, so the softmax saturates.
00/A workspace for scientific research
Select a passage, then Add to note.
Change scale, then Run the cell.
Send what you found to the group.
Pick the highlight to cite.
01/Install
No database to export and no format only LabShelf understands. Every file it writes, from the PDF to your notes, is a standard one that opens in LabShelf and just as well in the tools you already use.
~/Research/libraryAlso opens in
Install it where you already work.
02/Library
Save a paper from the page you found it on, file it where it belongs, and get it back months later with a few words of search.
03/Reading
04/Notes & Computation
A note reads like a page of your notebook: what you quoted, what you think, the equation behind it. When the idea needs checking, the same note holds the code and its results.
1Read it as a note
2Open the computation
05/Spaces
A question gathers papers, notes, drafts and decisions. A Space keeps them in one place, and it is worth having before you invite anyone: alone, it is where the question lives.
06/Writing
Cite the passage you highlighted, not just the paper. Bring an equation or a result in from your notes, and keep the way back to where it came from.
Before you send it
07/Talks & Posters
Take a figure from the work into a slide or a poster, arrange it by eye, and present or print the result.
SupportSponsor
LabShelf is free, open source and built by one person. Funding pays for the hours that go into it and keeps it free for everyone who reads papers for a living.
Sponsor LabShelfManualOpen in the reader
L. Nasser
User manual · labshelf 0.x · October 2026
LabShelf is three apps over one library: a VS Code extension, a terminal app and a browser extension. None of them is published yet, so you build them from the repository. VS Code and the terminal read the same folder on your disk; the browser keeps its own copy in IndexedDB. To use the library on several computers, sync the folder with your own sync tool; LabShelf calls no cloud service.
Each app builds from a clone of github.com/labshelf/labshelf with pnpm. Build only the apps you use; Table 1 lists the command and how to load each one.
pnpm install at its root.The install ends without errors. The terminal app needs Node 22.6 or later; the extension needs VS Code 1.98 or later.out/ and dist/ for VS Code, dist/labshelf.mjs for the terminal, dist/chrome and dist/firefox for the browser.labshelf --help prints the commands; the browser shows the LabShelf toolbar button.Table 1. Building and loading each app.
| App | Build | Load |
|---|---|---|
| VS Code | pnpm --filter @labshelf/vscode build | Open the repository in VS Code and press F5 |
| terminal | pnpm --filter @labshelf/terminal build | Link dist/labshelf.mjs as labshelf on your PATH (Listing 1) |
| Chrome 125+ | pnpm --filter @labshelf/browser build | chrome://extensions, Developer mode, Load unpacked, dist/chrome |
| Firefox 128+ | pnpm --filter @labshelf/browser build | about:debugging, Load Temporary Add-on, dist/firefox/manifest.json |
pnpm --filter @labshelf/terminal build ln -s "$PWD/packages/terminal/dist/labshelf.mjs" /usr/local/bin/labshelf labshelf doctor # checks the library, config and image support
labshelf: command not found means the link is not on your PATH: link it into a directory that echo $PATH lists. For anything else, labshelf doctor names the part that fails.The library is a folder you pick, empty or not. VS Code and the terminal share one library setting, so choosing it in one app sets it for the other.
The terminal looks at --library, then LABSHELF_LIBRARY, then the shared setting.labshelf where.It prints the same library folder, with the config and log paths. Without VS Code, labshelf init ~/Research/library creates the library and remembers it.papers/<folders>/<paper id>/ # paper.pdf, metadata.yaml, bib.bib projects/<project id>/ # your LaTeX or Typst project, labshelf.yaml .research/ # highlights, search index, logs
labshelf where with the folder VS Code shows, and check that LABSHELF_LIBRARY is not set in your shell.A paper enters the library from an identifier, a PDF on your disk, a browser tab or the terminal. Its id is its cite key, such as vaswani2017attention. Metadata comes from Crossref, arXiv and OpenAlex, and each field takes the value of the source trusted most for it.
Any identifier works: a DOI, an arXiv id, a PMID written as PMID: 12345678, a PMCID such as PMC1234567, or the link to an article page. LabShelf looks it up and files the paper under its cite key.
1706.03762 or 10.48550/arXiv.1706.03762 and press Enter.A message reads LabShelf: Added "Attention Is All You Need", and the paper is in the list.A PDF on your disk becomes a paper when you drop it on the LabShelf sidebar. LabShelf copies it into the library and fills in the metadata it can find.
The browser extension saves the paper in the current tab, or any result on Google Scholar.
labshelf add takes PDFs, folders, links, DOIs, arXiv ids, labelled PMIDs and PMCIDs, several at a time, and --to files them in a folder (Listing 3).
labshelf add 1706.03762 # arXiv id labshelf add 10.1038/nature14539 --to Vision labshelf add ~/Downloads/*.pdf
labshelf add 1706.03762.It prints added vaswani2017attention Attention Is All You Need.exists vaswani2017attention (1706.03762) and adds nothing.(metadata unconfirmed) means no source confirmed the record. Check the fields in the detail pane, or fetch them again in VS Code as in §2.1.A scanned PDF holds pictures of pages, so you cannot search or quote it until OCR adds a text layer. OCR runs on your computer.
labshelf.ocr.languages and labshelf.ocr.maxPages.Folders give each paper one place, the status tracks what you have read, and tags and search cut across both. Every change is a plain file edit, so it shows up in every app.
Folders are real folders under papers/ in the library, so a paper keeps its place in every app.
x on a paper, open the folder and press p; or press M to pick the folder.The paper moves; VS Code shows it in its folder at once.labshelf mv vaswani2017attention Vision, then labshelf ls Vision.The paper is listed under Vision.Every paper is Unread, Reading or Done, and carries any number of tags.
TUI keys: mu, mr and md set the status; t edits the tags.metadata.yaml.labshelf status vaswani2017attention done and labshelf tag vaswani2017attention +nlp -todo.VS Code shows the new status and tags.One query language works in VS Code, in the TUI (s) and in labshelf search. Every word must match, a quoted phrase matches as a whole, and the fields of Table 2 narrow the result.
attention status:reading year:>2016.Only papers that match every term remain.labshelf search tag:nlp has:pdf.One line per paper: status, year, id and title, or No match. Add --json for the full records.Table 2. Search syntax.
| Query | Finds papers that |
|---|---|
| word "a phrase" | contain every word and the phrase |
| -word | do not contain the word |
| tag:nlp #nlp | have the tag |
| status:reading is:r | have the status: unread, reading or done |
| year:2015..2020 | were published in the range; also year:2017, year:>2018, year:<2000 |
| author:vaswani | have a matching author |
| kw:graphs | have a matching keyword |
| note:todo | have a matching note |
| venue: key: abstract: | match in the venue, the cite key or the abstract |
| has:pdf no:pdf | have or lack a PDF; also has:note, has:doi, has:tags, has:abstract |
The Citation Map lists the works that at least three of your papers cite and that the library does not have yet: the reading your field assumes.
LabShelf opens every paper in its own reader, in VS Code and in the browser. You mark passages in five colours, copy quotes with their citation, and keep a note for each paper.
Highlights have five colours: yellow, green, blue, red and pink. What each colour means is up to you.
Copy with citation (Cmd/Ctrl Shift C) copies the selected text together with the paper's cite key and page. The format follows labshelf.reader.citationStyle (Table 3).
[@key, p. 4].Table 3. What Copy with citation writes for each citationStyle.
| citationStyle | Copied text |
|---|---|
| pandoc (default) | > quote, a blank line, then [@key, p. 4] |
| latex | ``quote'' \cite[p.~4]{key} |
| author-year | "quote" (Vaswani 2017, p. 4) |
| citekey | quote @key |
labshelf.reader.citationStyle in both User and Workspace settings.Resting the pointer on a reference in the paper shows a card for the cited work, so you do not lose your place to look it up.
labshelf.reader.hoverPreviews is off. Change the wait with labshelf.reader.hoverDelayMs.Each paper has a note in the Notes tab of the detail pane, and its annotations can leave LabShelf as Markdown.
note: (§3.3).Table 4 lists the keys the reader answers to. On a Mac, Cmd replaces Ctrl.
Table 4. Reader keys.
| Key | Does |
|---|---|
| Cmd/Ctrl+= Cmd/Ctrl+- | zoom in, zoom out |
| Cmd/Ctrl+0 | reset the zoom |
| Cmd/Ctrl+F | find in the paper |
| Alt+Left Alt+Right | go back, go forward; Cmd+[ and Cmd+] on a Mac |
| F4 | show or hide the sidebar |
| Cmd/Ctrl+Shift+C | copy the selection with its citation |
LabShelf writes LaTeX and Typst projects next to your library: a preview beside the source, citations taken from your highlights, and checks that catch a wrong citation before a reviewer does.
A project is a folder with a main .tex or .typ. Start one from a template, from a blank project or from a folder you already have.
The preview shows the compiled PDF beside the source. Typst compiles inside VS Code; LaTeX uses the compiler you choose.
Typing \cite[ lists the highlights of your papers, and choosing one inserts the citation with its page (Listing 4).
\cite[.A list shows highlighted passages with their papers.Attention alone suffices~\cite[p.~4]{vaswani2017attention}.LabShelf checks every citation in the build against your .bib and your library, and offers a fix on each card.
.bib, choose Replace with ….The key becomes the suggested one from your library..bib, Replace with the published version.The entry points to the published venue.The preview footer shows the page and word count against your limits. The limits live in labshelf.yaml in the project (Listing 5).
labshelf.yaml.The footer shows each count against its limit.countUpTo to references or end.Counting stops at the references, or runs to the end of the PDF.check: pages: 8 words: 6000 countUpTo: references # or end
countUpTo is end; set it to references.A labshelf: link in any file opens a library paper in the reader, at the page you name.
labshelf:vaswani2017attention#p5 in a source file or a note.Hovering the link shows the paper, or that no paper has the key.key: in a search.In a project that uses \include, the preview can build only the chapter you are writing, through \includeonly.
\included files; the toggle appears only when there is a chapter to build alone.Research: Check Before Submitting reads the built PDF for what a venue rejects: the page limit, anything that reveals the authors, Type 3 fonts and low-resolution images (Figure 8).
The arXiv bundle is a .zip of the files arXiv needs, with each .bib cut down to the entries the project cites.
<project id>-arxiv.zip. LabShelf writes the .zip where you choose and shows no other message..aux and .log files and the PDF built from a source.LabShelf Helper is a small program that builds LaTeX projects for the browser extension, which cannot run a TeX compiler by itself. The extension sends the helper a project's files; the helper runs latexmk, using a TeX it installs for you or the one on your computer, and sends back the problems and the PDF. It runs as you, writes only to ~/Library/Application Support/LabShelf Helper and needs no administrator rights. The steps below are for macOS 15 or later. The installer is not signed by Apple, so macOS blocks it the first time (why).
labshelf-helper-macos.pkg (Apple silicon) or labshelf-helper-macos-x64.pkg (Intel) from the releases page, and open it.macOS says the installer cannot be opened because Apple cannot check it for malicious software. Click Done; do not move it to the Bin..pkg again; the button stays for about an hour after the block. When the extension still says the helper is missing, quit the browser completely and open it again.LabShelf is free and open source. A Developer ID certificate, which lets Apple vouch for a program, costs US$ 99 a year, so the macOS helper is not signed by Apple. What you can check instead is where the file came from. The public release workflow builds every helper binary and installer from the repository, attaches a build attestation that ties each file to that workflow run, and publishes the SHA-256 of every file in SHA256SUMS. The Windows helper is signed through the SignPath Foundation; see the code signing policy.
Verification succeeded! with the workflow that built the file.shasum -a 256 labshelf-helper-macos.pkg and look for the same value in SHA256SUMS on the release.The two values are equal.gh attestation verify labshelf-helper-macos.pkg --repo labshelf/labshelfRemoving the helper takes two steps: unregister it from the browsers, then delete its folder. The folder holds the helper, the TeX it installed, a copy of your project files and its logs; your projects and library are elsewhere and stay.
~/Library/Application Support/LabShelf Helper to the Bin.The helper is gone. The extension shows that no helper is installed."$HOME/Library/Application Support/LabShelf Helper/bin/labshelf-helper" --unregisterLabShelf has no sync of its own and calls no cloud service. The library is a folder, so a sync tool you already use (Dropbox, iCloud Drive, Syncthing, the Google Drive desktop app) carries it between computers. Point VS Code and the terminal app at the synced folder on each computer. If a sync tool reports a conflict, keep the content you want in the original file and delete the conflict copy.
The terminal app reads and writes the same library as VS Code; edits made in the terminal show up live in VS Code. labshelf with no arguments opens the TUI; with a command, it runs that command and exits.
The TUI shows three panes: folders, papers and a preview with the tabs Info, Abstract, Notes and BibTeX (Figure 9). Press ? for every key; Table 5 lists the common ones.
Table 5. TUI keys.
| Key | Does |
|---|---|
| j k h l | Move down, up, and between panes |
| gg G | Go to the first or last item |
| tab | Switch the preview tab |
| f / s | Filter the list, find in it, search the library |
| z Z | Jump to a folder or a paper |
| mu mr md | Mark Unread, Reading or Done |
| o | Open the PDF |
| a t e | Add a paper, edit tags, edit the note in $EDITOR |
| x p M | Cut a paper, paste it into this folder, move it to a folder |
| yk yc yb ym | Copy the key, \cite{}, BibTeX, or the highlights as Markdown |
| ,t ,y ,a ,s ,m | Sort by title, year, author, status or last modified; a capital letter reverses |
| B S | Export a .bib |
| : | Command line: :export, :mkdir, :help |
| ? | Show every key |
Each command works on the library and exits, so it fits in scripts (Table 6). --json prints machine-readable output for ls, search and show.
Table 6. Commands.
| Command | Does |
|---|---|
| labshelf init [path] | Choose the library folder |
| labshelf where | Print the library, config, log and manifest paths |
| labshelf doctor | Check Node, the library, thumbnails and the clipboard |
| labshelf add <input>… [--to <folder>] | Add from a PDF, a folder, a link (including a PubMed link), a DOI, an arXiv id, PMID: … or a PMCID |
| labshelf ls [folder] [-r] [--sort key[!]] | List a folder; -r lists the papers below it too, ! reverses the sort (keys: title, year, author, status, modified) |
| labshelf search <query…> | Search the library with the syntax of §3.3 |
| labshelf show <id> | Show a paper's details, highlight count and reading position |
| labshelf open <id|key|labshelf:key#pN> | Open a paper, at a page if the link names one |
| labshelf status <id…> unread|reading|done | Set Unread, Reading or Done |
| labshelf tag <id…> +tag -tag | Add and remove tags |
| labshelf mv <id…> <folder> | Move papers to another folder |
| labshelf bib [id…] [-c folder] [-o file.bib] | Print BibTeX for papers or a folder; -o writes it to a file |
| labshelf install [project-dir] | Add the papers a project lists |
add prints one line per input: added with the new cite key and title, or exists with the key the library already has (Listing 6). (metadata unconfirmed) marks a paper whose metadata needs a look.
$ labshelf add 10.48550/arXiv.1706.03762 added vaswani2017attention Attention Is All You Need $ labshelf add 1706.03762 exists vaswani2017attention (1706.03762)
search and ls print one paper per line: a status mark (○ Unread, ◐ Reading, ● Done), the year, the cite key and the title (Listing 7). A search without results prints No match.
$ labshelf search attention year:2017 ◐ 2017 vaswani2017attention Attention Is All You Need
(metadata unconfirmed) means no source confirmed the title and authors. Check them in the detail pane or with labshelf show.Three environment variables change how the terminal app runs (Table 7).
Table 7. Environment variables.
| Variable | Does |
|---|---|
| LABSHELF_LIBRARY | Use this library folder (the -L flag wins over it) |
| LABSHELF_PDF_VIEWER | Open PDFs with this program |
| LABSHELF_IMAGES=iterm | Draw thumbnails with the iTerm2 image protocol |
These are VS Code settings; User and Workspace scopes work as usual (Table 8). Writing limits are not settings: they live in each project's labshelf.yaml (§5.5).
Table 8. Settings.
| Setting | Default | Meaning |
|---|---|---|
| labshelf.ai.enabled | true | Index paper text so the Related tab can list similar papers |
| labshelf.ocr.enabled | true | Read a PDF optically when its text layer is missing or unreadable |
| labshelf.ocr.makeSearchable | true | Make scanned PDFs searchable |
| labshelf.ocr.maxPages | 150 | Scans with more pages than this get no automatic text layer |
| labshelf.ocr.languages | ["eng"] | Languages OCR reads |
| labshelf.reader.vimKeys | false | Vim keys in the reader |
| labshelf.reader.defaultZoom | page-width | Zoom a paper opens at when it has no saved position: page-width, page-fit, page-actual or auto |
| labshelf.reader.toolbarAutoHide | true | Hide the reader toolbar while you scroll down |
| labshelf.reader.restorePosition | true | Reopen a paper at the page, zoom and sidebar state you left |
| labshelf.reader.hoverPreviews | true | Show a preview when you hover a citation, figure, equation, table or section link |
| labshelf.reader.hoverDelayMs | 250 | Milliseconds before the card shows |
| labshelf.reader.citationStyle | pandoc | Format of Copy with citation: pandoc, latex, author-year or citekey |
| labshelf.reader.openBeside | false | Open the reader beside the current editor; off opens it full-width |
| labshelf.writing.autoCompile | typing | When the PDF preview compiles on its own: typing, save or off |
| labshelf.writing.haltOnError | false | Stop a LaTeX build at the first error instead of compiling despite errors |
LabShelf has no account and no server of its own. Your library stays on your disk, and any sync tool you use on it is your own. Table 9 lists every host the apps contact.
Table 9. Network hosts.
| Host | When |
|---|---|
| api.crossref.org | Looking up a paper's metadata |
| export.arxiv.org | Looking up an arXiv paper |
| api.openalex.org | Looking up metadata and the citations behind the Citation Map |
| api.semanticscholar.org | Matching a title or a DOI to metadata, and finding an open-access PDF by DOI, arXiv id or PMID |
| www.ebi.ac.uk (Europe PMC), eutils.ncbi.nlm.nih.gov, www.ncbi.nlm.nih.gov | Looking up a PMID or PMCID, and finding a full-text link |
| api.datacite.org, dblp.org, openlibrary.org | Looking up a DataCite DOI, a computer-science paper or an ISBN |
| doi.org, api.unpaywall.org, arxiv.org and the publisher and repository sites they point to | Finding a PDF |
| packages.typst.org, cdn.jsdelivr.net, raw.githubusercontent.com, github.com | Browsing templates and downloading the Typst and Tectonic tools |
| api.github.com | Submitting a template, only when you publish one |
| dash.cloudflare.com, api.cloudflare.com | Connecting your Cloudflare account, and installing or updating your relay in it |
| <relay>.<your subdomain>.workers.dev | Editing a shared project and opening a share link: the relay in the Cloudflare account of whoever connected it |
| labshelf.org | Opening a share link in a browser |
Shared projects and share links go through a relay that LabShelf installs in the Cloudflare account of the person who connects one, never in an account LabShelf runs. Connecting signs you in to Cloudflare in your browser and asks only to manage Workers, Workers KV and Realtime and to read account settings. LabShelf keeps that sign-in on your device, to update the relay, and Cloudflare's own privacy policy covers the account.
Everything a relay stores or forwards is encrypted on your device: files, edits, comments, cursors, paper metadata and PDFs. The key travels only inside the invite or the share link, after the #, which a browser never sends to a server. The account owner and Cloudflare see opaque identifiers, sizes and times, never the content. Revoking a share link deletes its copy from the relay.
A lookup by identifier sends only the identifier. Searching or matching by title sends the title. Finding a PDF for a paper without a DOI or arXiv id sends its title, and the first author's surname to export.arxiv.org. Registry lookups also send a contact address, contact@labshelf.org.
If LabShelf helped your research, cite it with this entry (Listing 8).
@software{labshelf,
title = {LabShelf: a local-first research paper manager},
author = {Nasser, Luca Marinho},
year = {2026},
url = {https://github.com/labshelf/labshelf}
}