ads-tui
A terminal user interface for searching NASA ADS papers, selecting papers with fzf, downloading PDFs, and managing BibTeX references.
Designed for astronomers who prefer working from the terminal. This may be a preferable workflow when working with a LaTeX document using a terminal emulator for example. It is also useful for quickly searching and downloading papers without opening a web browser.
Features
- Search NASA ADS from the command line
- Interactive paper selection using
fzf - Preview paper information:
- Title
- Authors
- Abstract
- DOI
- Citation count
- Keywords
- Download PDFs
- Open PDF (only opens first selection in multi mode)
- Export BibTeX
- Copy BibTeX to the clipboard
- Append references to an existing
.bibfile - Copy DOI
- Open ADS page in a browser (only opens first selection in multi mode)
- SQLite caching of searches and metadata
Installation
Requirements
- Python 3.11 or newer
pip(You may or may not be able to use your system'spipdepending on your system. In the latter case, you can create a virtual environment and installads-tuithere, use acondaenvironment, or useuvto install it in a environment.)fzfxdg-open(Available on Linux systems. See note below for Other OS)- An web browser (for opening ADS pages and PDFs)
- A terminal emulator with true color support (e.g.
alacritty,kitty,wezterm,ghostty,gnome-terminal,konsole, etc.)
Install fzf
Debian / Ubuntu
sudo apt install fzf
Fedora
sudo dnf install fzf
Or follow the instructions at fzf GitHub.
Install xdg-open
Most Linux distributions come with xdg-open pre-installed. If not, install the xdg-utils package using your package manager.
Install ads-tui:
pip install ads-tui
Or using uv:
uv tool install ads-tui
Or for development:
git clone https://github.com/Credence473/ads-tui.git
cd ads-tui
pip install -e .
Configuration
ADS API Token
ADS requires an API token.
Create one at:
https://ui.adsabs.harvard.edu/user/settings/token
Set it temporarily:
export ADS_API_TOKEN="your_token_here"
To make it permanent:
echo 'export ADS_API_TOKEN="your_token_here"' >> ~/.bashrc
Alternatively, edit:
~/.config/ads-tui/config.toml
Example:
token = "your_token_here"
More configuration
Configuration file:
~/.config/ads-tui/config.toml
Example:
token = ""
results = 10
prefer_arxiv = true
cache_days = 30
download_dir = "~/Downloads/Paper"
default_bib = "~/Downloads/Paper/references.bib"
Usage
Search ADS papers from the terminal. The query can be a simple string or a comma-separated list of field:value pairs. For example: 'author:Smith,year:2020'. The following shorthands are also available for common fields: 'a' for author, 'fa' for first_author, 'abs' for abstract, 'y' for year, 'ft' for full text, and 'pub' for publication. Additionally, the keyword 'astro' can be used to filter results to the astronomy collection. Example: 'astro,author:Smith,year:2020'.
Search ADS
ads-tui "magneto asteroseismology"
or
ads-tui "first_author:Catala,year:2007,author:Donati,astro"
or
ads-tui "fa:Catala,y:2007,a:Donati,astro"
Change the number of results
The default is 10 papers.
For example:
ads-tui "TESS asteroseismology" -n 25
Multiple selection
Enable multi-selection:
ads-tui "PLATO stellar oscillations" --multi
Inside fzf:
| Key | Action |
|---|---|
TAB |
Select paper |
ENTER |
Confirm selection |
Actions
After selecting one or more papers:
| Key | Action |
|---|---|
b |
Copy BibTeX |
s |
Save BibTeX |
a |
Append BibTeX to references.bib |
d |
Copy DOI |
p |
Open PDF link |
u |
Open ADS page |
q |
Quit |
Cache
SQLite cache location:
~/.cache/ads-tui/cache.sqlite
Cached data includes:
- Search results
- Paper metadata
- BibTeX entries
Default cache lifetime:
cache_days = 30
Development
Run locally:
python -m ads_tui.cli "asteroseismology"
Roadmap
Planned features:
- Search by first author, author, year, or journal
- Citation graph exploration
- Prefer arxiv option does not work yet. It is planned to be implemented in the future.
Notes for Other OS
- This project is developed for Linux. It should work on MacOS if the
xdg-opencommand is replaced withopenin the code. You are free to use it that way, but I take no responsibility as I don't own a Mac to test it. If you are willing to maintain a MacOS version, please fork it. - If you are using windows, using ads-tui on that sluggish terminal is almost the same (I imagine) as using ADS in the browser. So, I will not try to make it work on Windows.
Acknowledgements
This project uses the NASA ADS API.
Metadata
Release files for ads-tui 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ads_tui-0.1.3.tar.gz | 11.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ads_tui-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.0 kB
Release files / ads_tui-0.1.3.tar.gz
| Download URL | ads_tui-0.1.3.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbb034e75c9bc2d792371283852409879837fb274b45e0124df77d8129e38a1e
|
|
BLAKE2b-256 checksum How to use checksums |
b382da3d2f597dc258f493e9957e42c65d03ca334bad8c3ebf6c598840d87bea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ads_tui-0.1.3-py3-none-any.whl
| Download URL | ads_tui-0.1.3-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70fe4bd0a9838d30b350469f7614fd399615d1a2160b52dd6dcc1b002929d91c
|
|
BLAKE2b-256 checksum How to use checksums |
0f303103202e3bafd2ad31933d862db1cb25e1cb34e9380bb96a9b3893ccec1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for ads-tui 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.