# Llyfr for Raycast

URL: https://www.raycast.com/haykh/llyfr

> Search and manage a local BibTeX library of papers, and import entries and PDFs from NASA ADS (requires a free ADS API token).

- Install: raycast://extensions/haykh/llyfr
- Author: [hayk](https://www.raycast.com/haykh)
- Installs: 0
- Platforms: Windows, macOS
- Categories: Productivity, Data
- Updated: 2026-11-25
- Source: https://github.com/raycast/extensions/tree/19efeb4b43855659305e7c236dfbcd0440eb7e90/extensions/llyfr/

## Commands

- **Search Library**: Display list of papers in the local library
- **Search ADS**: Search papers on ADS

## README

### Llyfr

Llyfr is a lightweight bibliography manager for scientific papers. Your library is a plain BibTeX (`.bib`) file and a folder of PDFs, so it works with LaTeX, JabRef, and other tools that read BibTeX.

![Search Library](https://github.com/raycast/extensions/raw/19efeb4b43855659305e7c236dfbcd0440eb7e90/extensions/llyfr//media/search-library.png)

#### Commands

##### Search Library

Search the papers in your `.bib` file by title, author, year, or journal.

- **Open** the PDF attached to an entry
- **Show Details**: authors, journal, year, abstract, and link
- **Copy BibTeX** for the entry
- **Open URL** in your browser (the `url` field, or the `adsurl` field)
- **Add New Entry**: pick a PDF, paste its BibTeX (one entry), and Llyfr copies the PDF into your library folder and adds the entry to your `.bib` file
- **Delete Entry**: removes the entry from your `.bib` file and moves its PDF to the trash, after asking you to confirm

##### Search ADS

Search the [NASA Astrophysics Data System (ADS)](https://ui.adsabs.harvard.edu) and import papers into your library. Type a query in the search bar and press Enter.

- Browse results and **Show Details** with the abstract
- **Add to Library** downloads the BibTeX and the PDF (the arXiv version first, the publisher version otherwise), then adds both to your library
- **Open in ADS** in your browser

![Search ADS](https://github.com/raycast/extensions/raw/19efeb4b43855659305e7c236dfbcd0440eb7e90/extensions/llyfr//media/search-ads.png)

#### Setup

Llyfr asks for these settings the first time you open it. You can change them later in Raycast Settings → Extensions → Llyfr.

| Setting                      | Required for  | Description                                                                                                                     |
| ---------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Library Folder**           | Both commands | The folder where your PDFs are stored.                                                                                          |
| **BibTeX File**              | Both commands | Your BibTeX file. It can be anywhere, including inside the folder above. Start with an empty `.bib` file if you don't have one. |
| **ADS API Token**            | Search ADS    | Your personal ADS token (see below).                                                                                            |

##### Getting an ADS API token

1. Sign in or create a free account at [ui.adsabs.harvard.edu](https://ui.adsabs.harvard.edu).
2. Go to **Account → Settings → API Token** and click **Generate a new key**.
3. Paste the token into the **ADS API Token** setting of the Search ADS command.

#### How the library is stored

PDFs are linked to entries with the `file` field, in the same format JabRef uses. The path is relative to your library folder:

```bibtex
@ARTICLE{1938Natur.141..333L,
   author = {{Landau}, L.},
    title = "{Origin of Stellar Energy}",
  journal = {\nat},
     year = 1938,
   adsurl = {https://ui.adsabs.harvard.edu/abs/1938Natur.141..333L},
     file = {:Landau_1938_origin_of_stellar_energy.pdf:PDF}
}
```

When you add a paper, Llyfr names the PDF `<authors>_<year>_<title>.pdf`, where `<authors>` is `Smith`, `Smith.Jones`, or `Smith.etal` (`undated` replaces the year if there is none). It then appends the entry to the end of your `.bib` file. Existing entries are never modified, and a paper that is already in your library is not added again. Llyfr recognizes it by citation key, DOI, ADS bibcode, arXiv ID, or title.

When reading your library, Llyfr also understands other ways of writing the `file` field, such as `{paper.pdf}`, `{PDF:paper.pdf}`, or an absolute path, and uses the part that ends in `.pdf`. Entries without a linked PDF still appear in the list, with a dimmed icon.

#### ADS query examples

Search ADS accepts the full [ADS search syntax](https://ui.adsabs.harvard.edu/help/search/search-syntax):

| Query                                        | Finds                                  |
| -------------------------------------------- | -------------------------------------- |
| `author:"Einstein" year:1905`                | Papers by Einstein from 1905           |
| `author:"^Landau"`                           | Papers with Landau as the first author |
| `title:"stellar energy"`                     | Papers with the phrase in the title    |
| `abs:"magnetic reconnection" year:2020-2024` | Abstract search within a year range    |
| `bibcode:1938Natur.141..333L`                | A specific paper                       |
