Skip to main content

astrobib

A terminal-based literature manager for astrophysics research

astrobib connects to the NASA/Harvard ADS to search, fetch, and organize papers as plain BibTeX files, with a fast terminal UI. It ships as a single native binary: instant startup, instant quit, no runtime dependencies.

Your library is just a directory of .bib files, indistinguishable from hand-written BibTeX, and cite keys derive from each paper's stable identity (arXiv ID or bibcode) — so any two copies of a paper, fetched by anyone at any time, agree on the key forever. Libraries from all earlier astrobib versions work unchanged.


Installation

uv tool install astrobib     # or: pipx install astrobib

Binary wheels cover macOS (arm64, x86_64) and Linux (x86_64, aarch64). Building from source needs a Rust toolchain: cargo install --git https://github.com/clemson-cal/astrobib.


Quick start

# set your ADS token (https://ui.adsabs.harvard.edu/user/settings/token)
export ADS_API_TOKEN=...

astrobib                     # launch the TUI
astrobib list                # CLI: newest papers
astrobib search '^zrake OR kw:"compact objects"'
astrobib add 2020ApJ...123..456Z
astrobib import refs.bib     # resolve a foreign .bib against ADS

The two-tier library model

astrobib always works on up to two libraries: a local bib directory (tier 2) and your global personal library (tier 1, at ~/.local/share/astrobib/library/). astrobib [LIBRARY_DIR] points tier 2 at any directory holding bib/; with no argument, the nearest ancestor of the current directory with a bib/ is used. A .tex manuscript alongside activates citation tracking, but any bib directory works. With the global tier enabled (the default), reads merge both tiers and imports write to both — the paper repo stands alone for coauthors while your collection accrues. Press t (or click the global badge) to hide the global tier: reads and writes become purely local. Removing a local paper never destroys a sole copy — it is rescued into the global library. Both stores are plain bib/*.bib files, one paper per file, indistinguishable from hand-written BibTeX. Nothing else is ever written into your repos.


TUI overview

Scope capsules at the top switch between your library, saved ADS query tabs, and the manuscript view. The pub card on the right shows the highlighted paper (hover the citekey column to preview others); an event log and clickable view badges sit at the bottom. Most things are clickable; every action has a key (? shows the cheat-sheet).

Keys

  • / — live filter (query language below); S — new ADS query (↑/↓ sets result count; pasting a DOI or ADS URL imports directly)
  • j k g G — move; [ ] — switch scope; ctrl+w — close query scope; r — refresh; + - — result count
  • Space — select row (iOS-style selection mode); a — select visible; A — select all; Esc — done
  • i — import ADS result(s); m — toggle manuscript/local membership; — remove (with confirmation)
  • p — download PDFs (ADS open-access, then arXiv); B — browser download (watches ~/Downloads); o — open PDF; X — clear PDF; double-click a row — open its PDF
  • y — copy chord: yy cite key, yY full key, yb bibcode, ya/yx/yd ADS/arXiv/DOI URL, yp PDF path, yt title, yA abstract; card title/abstract/key are click-to-copy
  • t — show/hide the global tier; D — pub card; L — event log; ? — keys; q — quit

Filtering the library

Press / to filter as you type. Whitespace-separated terms AND together; each term is a case-insensitive partial match. Bare terms match author, title, abstract, key, keywords, and year; field prefixes narrow:

author:sironi          author anywhere in the list
^zrake                 first-author papers (= author:^zrake)
title:magnetar         word in title
abs:"fast radio burst" phrase in abstract
kw:"compact objects"   keyword
year:2015-2020         ranges; year:2020- open-ended
is:ms                  local/manuscript members;  is:pdf  cached PDFs
-abs:neutrino          leading - negates (NOT works too)
^zrake OR ^metzger     uppercase OR separates alternatives; AND binds tighter

A half-typed query never errors. With a filter active, S pre-fills the equivalent ADS query — filter locally, escalate in one keystroke.


ADS queries

S passes your query to the ADS API unmodified, so the full Solr language works (bibstem:ApJL, citations(...), boolean grouping, …). Each query becomes a scope capsule, persisted per library context in tabs.json.


CLI

list, search [--ads], add <bibcode|ADS URL>, show <key>, import <file.bib> [--global-only|--local-only], plus --library PATH (relocate the global tier) and --no-global. import resolves each entry against ADS (arXiv ID → DOI → exact title+author+year) unless its cite key is already reproducible from its own data — canonical astrobib entries import byte-identically — and prints copy-pasteable key replacements for your .tex files.


See docs/DESIGN.md for the data-format contract.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astrobib-0.5.1.tar.gz (167.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

astrobib-0.5.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

astrobib-0.5.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

astrobib-0.5.1-py3-none-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

astrobib-0.5.1-py3-none-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file astrobib-0.5.1.tar.gz.

File metadata

  • Download URL: astrobib-0.5.1.tar.gz
  • Upload date:
  • Size: 167.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for astrobib-0.5.1.tar.gz
Algorithm Hash digest
SHA256 a84d9cdd496e8a2af12d49d0ef6781c9dbf7da256fa97973d2b45672b62cd651
MD5 d139ec4e67bf1d3edaede4824b518c9e
BLAKE2b-256 9c47479ff5aee7dd980a5cb9b8958b3462abc2ad1637526c8b366229f399ee06

See more details on using hashes here.

File details

Details for the file astrobib-0.5.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for astrobib-0.5.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4f7006ea3fafbf854fdfc09d2c8f3529f8fce7f844dc2c8f98ec6e380f94a166
MD5 3a890b2dc77dc8a521ee371d9d03a749
BLAKE2b-256 8d0fa9796c234c1a5386f8a7f3223e16de1d30ee0b44b8dd5e9036d822cc436f

See more details on using hashes here.

File details

Details for the file astrobib-0.5.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for astrobib-0.5.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6e7174af553a5f04b375a3532b7c066a052aba7aaf8c6c1cac190a39f314d05b
MD5 aaf7107e9db54d35abf4dd458bac2c04
BLAKE2b-256 7c3fdf3650f6239b764009c27c78ee58c3bfa7ef24d468d54c381694f8b47144

See more details on using hashes here.

File details

Details for the file astrobib-0.5.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for astrobib-0.5.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 144f68be8c6c1aa82e7310bc428cd220157d24f4d3a8cd551cc5d91c8805fff0
MD5 2433f4e4dbc406148aaec95eade500e7
BLAKE2b-256 c53b55159851c2cfb06d387ab7d7a586f0305d3ded0d15c7aa0d0dccbc6ecf39

See more details on using hashes here.

File details

Details for the file astrobib-0.5.1-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for astrobib-0.5.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3979e61f4afdaeb1c8c374375934a0201a8a702ec1946aead1d857d7cebe9a3b
MD5 550d6e11cc04516c978dd825c4d9da80
BLAKE2b-256 bf531f728b0729c7c95ff91a8da3210ae5184d23fddc338d11d97cbd3d7fa044

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page