npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

astroquery-cli

v1.2.0

Published

Command-line interface for querying astronomical databases via astroquery

Downloads

191

Readme

astroquery-cli 🚀

A practical command-line interface (CLI) for selected astroquery modules, with basic autocompletion and multi-language support.


Overview ✨

astroquery-cli provides command-line access to several astroquery data services, with support for Chinese and Japanese interfaces. The current features focus on core query commands; some advanced features are still under development.


Supported Modules 🧩

  • ALMA: Basic query
  • ESASky: Sky region visualization queries
  • Gaia: Cone search
  • IRSA: Infrared Science Archive queries
  • Heasarc: HEASARC Archive queries
  • JPL: JPL Small-Body Database queries
  • MAST: Mikulski Archive for Space Telescopes queries
  • ADS: NASA Astrophysics Data System literature search and BibTeX retrieval, allows simple commands to search for "latest papers" or "highly cited reviews".
  • NED: NASA/IPAC Extragalactic Database name resolution
  • NIST: National Institute of Standards and Technology Atomic Spectra Database queries
  • Exoplanet: NASA Exoplanet Archive queries
  • SDSS: Sloan Digital Sky Survey queries
  • ESO: European Southern Observatory queries
  • SIMBAD: SIMBAD Astronomical Database basic query
  • Splatalogue: Molecular line queries
  • VizieR: VizieR Catalogue Database catalog search, basic query

Some modules and commands are not fully implemented. Aliases are available for some modules (e.g., sim for simbad, viz for vizier, spl for splatalogue, hea for heasarc, exo for exoplanet). Please refer to aqc --help for the latest status.


Features 🌟

  • ⚡ Command autocompletion (manual installation required, see below)
  • 🌏 Multi-language support (Simplified Chinese, Japanese; French in progress)
  • 📊 Formatted output for query results

Installation 🛠️

Quick use via npx

需要 Node.js ≥18 与本地 Python 3.11+。首次执行会在 ~/.cache/astroquery-cli(可通过 AQC_VENV_DIR 覆盖)创建虚拟环境并安装 Python 端依赖。

npx astroquery-cli --help
# 示例:npx astroquery-cli simbad query --identifier "M31"

可用环境变量:

  • AQC_PYTHON:指定 Python 解释器路径
  • AQC_VENV_DIR:自定义虚拟环境缓存目录
  • AQC_FORCE_INSTALL=1:强制重新安装/升级 Python 端依赖

From Source

git clone https://github.com/yourusername/astroquery-cli.git
cd astroquery-cli
pip install .

Shell Autocompletion 🧑‍💻

Install shell autocompletion with:

aqc --install-completion bash   # Bash
aqc --install-completion zsh    # Zsh
aqc --install-completion fish   # Fish

Usage 📚

1. View available modules and commands

aqc --help
aqc <module> --help

2. Basic query example

Query VizieR for a catalog:

aqc vizier find-catalogs --keywords "quasar"
aqc vizier query --catalog "VII/118" --ra 12.5 --dec 12.5 --radius 0.1

Query SIMBAD for an object:

aqc simbad query --identifier "M31"

Query ALMA for observations:

aqc alma query --ra 83.633 --dec -5.391 --radius 0.1

3. Change output language

aqc --lang zh simbad query --identifier "M31"

4. Test service connectivity

aqc --ping

5. Check available fields for a module

aqc --field simbad

Common options:

  • -l, --lang : Set output language (e.g., 'en', 'zh')
  • -p, --ping : Test connectivity to major services (top-level command only)
  • -f, --field : Check field validity for modules (top-level command only)

Internationalization 🌐

  • Translation files are located in locales/<lang>/LC_MESSAGES/messages.po and compiled to .mo files

Updating Translations

Helper scripts in the locales/ directory assist with extracting, updating, and compiling translation files. The general workflow is as follows:

  1. Extract untranslated entries: Run locales/extract-untranslated.sh. This script generates untranslated_pot.tmp (for new entries in messages.pot) and untranslated_<lang>.tmp files (for untranslated entries in language-specific .po files).
  2. Translate untranslated_pot.tmp: Manually translate the entries in locales/untranslated_pot.tmp. These are new msgid entries that need to be added to all language files.
  3. Merge translations: After translating untranslated_pot.tmp, merge these translations into the respective untranslated_<lang>.tmp files. This step typically involves copying the translated msgstr from untranslated_pot.tmp to the corresponding entries in untranslated_<lang>.tmp.
  4. Update .po files: Run locales/update-po.sh to incorporate the translated entries from the untranslated_<lang>.tmp files into the messages.po files for each language.
  5. Check for updates: Run locales/check-update.sh to ensure all translation files are consistent and up-to-date.
  6. Compile .mo files: After updating .po files, compile them into .mo files using locales/compile-mo.sh (or similar command if not explicitly provided as a script).

Refer to the comments within each script in the locales/ directory for more detailed instructions.


License 📄

This project is licensed under the BSD 3-Clause License.
See the LICENSE file for details.

This project uses astroquery,


Acknowledgements 🙏