inoribea-astrocli 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. inoribea_astrocli-1.4.0/LICENSE +31 -0
  2. inoribea_astrocli-1.4.0/PKG-INFO +350 -0
  3. inoribea_astrocli-1.4.0/README.md +324 -0
  4. inoribea_astrocli-1.4.0/locales/fr/LC_MESSAGES/messages.mo +0 -0
  5. inoribea_astrocli-1.4.0/locales/ja/LC_MESSAGES/messages.mo +0 -0
  6. inoribea_astrocli-1.4.0/locales/zh/LC_MESSAGES/messages.mo +0 -0
  7. inoribea_astrocli-1.4.0/pyproject.toml +40 -0
  8. inoribea_astrocli-1.4.0/src/__init__.py +30 -0
  9. inoribea_astrocli-1.4.0/src/__main__.py +4 -0
  10. inoribea_astrocli-1.4.0/src/common_options.py +77 -0
  11. inoribea_astrocli-1.4.0/src/config.py +76 -0
  12. inoribea_astrocli-1.4.0/src/debug.py +162 -0
  13. inoribea_astrocli-1.4.0/src/i18n.py +86 -0
  14. inoribea_astrocli-1.4.0/src/locales/fr/LC_MESSAGES/messages.mo +0 -0
  15. inoribea_astrocli-1.4.0/src/locales/ja/LC_MESSAGES/messages.mo +0 -0
  16. inoribea_astrocli-1.4.0/src/locales/zh/LC_MESSAGES/messages.mo +0 -0
  17. inoribea_astrocli-1.4.0/src/main.py +443 -0
  18. inoribea_astrocli-1.4.0/src/modules/aavso_cli.py +366 -0
  19. inoribea_astrocli-1.4.0/src/modules/ads_cli.py +297 -0
  20. inoribea_astrocli-1.4.0/src/modules/alma_cli.py +181 -0
  21. inoribea_astrocli-1.4.0/src/modules/esasky_cli.py +308 -0
  22. inoribea_astrocli-1.4.0/src/modules/eso_cli.py +137 -0
  23. inoribea_astrocli-1.4.0/src/modules/exoplanet_cli.py +109 -0
  24. inoribea_astrocli-1.4.0/src/modules/fermi_cli.py +295 -0
  25. inoribea_astrocli-1.4.0/src/modules/gaia_cli.py +313 -0
  26. inoribea_astrocli-1.4.0/src/modules/heasarc_cli.py +223 -0
  27. inoribea_astrocli-1.4.0/src/modules/irsa_cli.py +471 -0
  28. inoribea_astrocli-1.4.0/src/modules/jpl_cli.py +462 -0
  29. inoribea_astrocli-1.4.0/src/modules/mast_cli.py +236 -0
  30. inoribea_astrocli-1.4.0/src/modules/ned_cli.py +200 -0
  31. inoribea_astrocli-1.4.0/src/modules/nist_cli.py +169 -0
  32. inoribea_astrocli-1.4.0/src/modules/sdss_cli.py +175 -0
  33. inoribea_astrocli-1.4.0/src/modules/simbad_cli.py +188 -0
  34. inoribea_astrocli-1.4.0/src/modules/splatalogue_cli.py +221 -0
  35. inoribea_astrocli-1.4.0/src/modules/vizier_cli.py +439 -0
  36. inoribea_astrocli-1.4.0/src/options/field.py +261 -0
  37. inoribea_astrocli-1.4.0/src/options/ping.py +73 -0
  38. inoribea_astrocli-1.4.0/src/options/test.py +48 -0
  39. inoribea_astrocli-1.4.0/src/utils.py +456 -0
@@ -0,0 +1,31 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) [2025], [inoribea]
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions
8
+ are met:
9
+
10
+ 1. Redistributions of source code must retain the above copyright
11
+ notice, this list of conditions and the following disclaimer.
12
+
13
+ 2. Redistributions in binary form must reproduce the above copyright
14
+ notice, this list of conditions and the following disclaimer in the
15
+ documentation and/or other materials provided with the distribution.
16
+
17
+ 3. Neither the name of inoribea nor the names of its
18
+ contributors may be used to endorse or promote products derived from
19
+ this software without specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
+ POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,350 @@
1
+ Metadata-Version: 2.3
2
+ Name: inoribea-astrocli
3
+ Version: 1.4.0
4
+ Summary: CLI for astroquery modules with autocompletion and multi-language support.
5
+ License: BSD-3-Clause
6
+ Author: inoribea
7
+ Author-email: inoribea@outlook.com
8
+ Requires-Python: >=3.11
9
+ Classifier: License :: OSI Approved :: BSD License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Dist: astropy (>=7.1.0,<8.0.0)
15
+ Requires-Dist: astroquery (>=0.4.10,<0.5.0)
16
+ Requires-Dist: babel (>=2.15.0,<3.0.0)
17
+ Requires-Dist: pyvo (>=1.4.1,<2.0.0)
18
+ Requires-Dist: requests (>=2.10.0,<3.0.0)
19
+ Requires-Dist: rich (>=13.5.2,<14.0.0)
20
+ Requires-Dist: typer (>=0.15.4,<0.16.0)
21
+ Project-URL: Documentation, https://github.com/inoribea/astroquery-cli#readme
22
+ Project-URL: Homepage, https://github.com/inoribea/astroquery-cli
23
+ Project-URL: Issues, https://github.com/inoribea/astroquery-cli/issues
24
+ Project-URL: Repository, https://github.com/inoribea/astroquery-cli
25
+ Description-Content-Type: text/markdown
26
+
27
+ # Astro CLI πŸš€
28
+
29
+ **[English](README.md)** | **[δΈ­ζ–‡](README_ZH.md)** | **[ζ—₯本θͺž](README_JA.md)** | **[FranΓ§ais](README_FR.md)**
30
+
31
+ > Your gateway to cosmos β€” Query astronomical data from command line
32
+
33
+ [![License](https://img.shields.io/badge/License-BSD%203Clause-blue.svg)](LICENSE)
34
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
35
+ [![Astropy](https://img.shields.io/badge/astropy-6.0%2B-orange.svg)](https://www.astropy.org/)
36
+ [![npm version](https://img.shields.io/npm/v/astroquery-cli.svg)](https://www.npmjs.com/package/astroquery-cli)
37
+
38
+ ---
39
+
40
+ ## ✨ What is Astro CLI?
41
+
42
+ **Astro CLI** is a modern command-line tool that provides quick access to multiple astronomical data services. It integrates [Astroquery](https://astroquery.readthedocs.io/) and other data access methods (direct API calls, HTTP requests) to help astronomers, researchers, and anyone query astronomical databases efficiently from the terminal.
43
+
44
+ *17 data sources. One command. Beautiful output. Multi-language support. Extensible for future services.*
45
+
46
+ ---
47
+
48
+ ## 🧩 Supported Data Sources
49
+
50
+ Query data from 17 different astronomical databases and services:
51
+
52
+ | Service | Description | Command | Alias |
53
+ |---------|------------|----------|--------|
54
+ | [SIMBAD](https://simbad.cds.unistra.fr/) | Basic astronomical data & object identification | `astrocli simbad` | `astrocli sim` |
55
+ | [VizieR](https://vizier.cds.unistra.fr/) | Catalog database search | `astrocli vizier` | `astrocli viz` |
56
+ | [ALMA](https://almascience.org/) | ALMA radio telescope observations | `astrocli alma` | - |
57
+ | [ESASky](https://www.esa.int/Enabling_Support/Operations/ESASky/) | Sky region visualization | `astrocli esasky` | - |
58
+ | [Gaia](https://www.cosmos.esa.int/gaia/) | ESA Gaia mission data | `astrocli gaia` | - |
59
+ | [IRSA](https://irsa.ipac.caltech.edu/) | Infrared Science Archive | `astrocli irsa` | - |
60
+ | [HEASARC](https://heasarc.gsfc.nasa.gov/) | X-ray and Gamma-ray data | `astrocli heasarc` | `astrocli hea` |
61
+ | [JPL Horizons](https://ssd.jpl.nasa.gov/) | Solar System ephemerides | `astrocli jpl` | - |
62
+ | [MAST](https://mast.stsci.edu/) | Space Telescope Archive (HST, JWST, etc.) | `astrocli mast` | - |
63
+ | [ADS](https://ui.adsabs.harvard.edu/) | Astrophysics literature search | `astrocli ads` | - |
64
+ | [NED](https://ned.ipac.caltech.edu/) | Extragalactic Database | `astrocli ned` | - |
65
+ | [NIST](https://physics.nist.gov/ASD/) | Atomic spectra database | `astrocli nist` | - |
66
+ | [NASA Exoplanet](https://exoplanetarchive.ipac.caltech.edu/) | Exoplanet catalog | `astrocli exoplanet` | `astrocli exo` |
67
+ | [SDSS](https://www.sdss.org/) | Sloan Digital Sky Survey | `astrocli sdss` | - |
68
+ | [ESO](https://www.eso.org/) | European Southern Observatory | `astrocli eso` | - |
69
+ | [Splatalogue](https://www.splatalogue.org/) | Molecular line database | `astrocli splatalogue` | `astrocli spl` |
70
+ | [**AAVSO VSX**](https://www.aavso.org/vsx/) | Variable Star Index | `astrocli aavso` | `astrocli aav` |
71
+ | [**Fermi-LAT**](https://fermi.gsfc.nasa.gov/) | Gamma-ray telescope data | `astrocli fermi` | `astrocli fer` |
72
+
73
+ ---
74
+
75
+ ## 🌟 Key Features
76
+
77
+ - **πŸ“¦ Multi-Source Access**: Query 17+ astronomical databases from a single interface
78
+ - **🌏 Internationalized UI**: Built-in support for English, Chinese (Simplified), and Japanese
79
+ - **πŸ“Š Rich Output**: Beautifully formatted tables with support for exporting to CSV, ECSV, FITS, and more
80
+ - **⚑ Smart Defaults**: Sensible defaults with extensive customization options
81
+ - **πŸ” Service Health**: Built-in connectivity testing (`--ping`) and field validation (`--field`)
82
+ - **πŸ§‘β€πŸ’» Shell Completion**: Auto-completion support for Bash, Zsh, and Fish
83
+ - **🌌 Extensible**: Easy to add new astronomical data services
84
+
85
+ ---
86
+
87
+ ## πŸ“¦ Installation
88
+
89
+ Astro CLI offers multiple installation methods. Choose the one that suits you:
90
+
91
+ ### Method 1: npm Global Install (Recommended)
92
+
93
+ ```bash
94
+ # Global install (requires Node.js β‰₯18 and Python 3.11+)
95
+ npm install -g astroquery-cli
96
+
97
+ # After installation, all three commands are available:
98
+ astroquery-cli --help # Full command name
99
+ aqc --help # Short command (recommended)
100
+ astrocli --help # Alias command
101
+
102
+ # Example: Query SIMBAD for M31
103
+ astrocli simbad object "M31"
104
+ ```
105
+
106
+ ### Method 2: npx/pnpm (No Install Required)
107
+
108
+ ```bash
109
+ # Using npx (no installation needed)
110
+ npx astroquery-cli --help
111
+
112
+ # Using pnpm
113
+ pnpm astroquery-cli --help
114
+
115
+ # Example
116
+ npx astroquery-cli simbad object "M31"
117
+ ```
118
+
119
+ ### Method 3: PyPI Install (For Python Users)
120
+
121
+ ```bash
122
+ # Install Python package from PyPI
123
+ pip install aqc-cli
124
+
125
+ # After installation, available commands:
126
+ aqc --help
127
+ astrocli --help
128
+ ```
129
+
130
+ ### Method 4: Install from Source
131
+
132
+ ```bash
133
+ git clone https://github.com/inoribea/astroquery-cli.git
134
+ cd astroquery-cli
135
+ pip install -e .
136
+ ```
137
+
138
+ ---
139
+
140
+ ### πŸ“‹ Package Naming
141
+
142
+ | Platform | Package Name | Install Command |
143
+ |----------|--------------|-----------------|
144
+ | **npm** | `astroquery-cli` | `npm install -g astroquery-cli` |
145
+ | **PyPI** | `aqc-cli` | `pip install aqc-cli` |
146
+
147
+ After installation, all three commands are available:
148
+ - `astroquery-cli` - Full command name
149
+ - `aqc` - Short command (recommended)
150
+ - `astrocli` - Alias command
151
+
152
+ ---
153
+
154
+ ### Environment Variables
155
+
156
+ - `AC_PYTHON` - Specify Python interpreter path
157
+ - `AC_VENV_DIR` - Custom virtual environment cache directory (default: `~/.cache/astrocli`)
158
+ - `AC_FORCE_INSTALL=1` - Force reinstall/upgrade Python dependencies
159
+ - `AC_DEBUG` - Enable debug mode
160
+ - `AC_LANG` - Set default language (en/zh/ja)
161
+
162
+ ---
163
+
164
+ ## πŸ“š Usage
165
+
166
+ ### View All Available Commands
167
+
168
+ ```bash
169
+ # Show all available modules and commands
170
+ astrocli --help
171
+
172
+ # Show help for a specific module
173
+ astrocli <module> --help
174
+ ```
175
+
176
+ ### Query Examples
177
+
178
+ #### 1. Query SIMBAD for an object
179
+
180
+ ```bash
181
+ astrocli simbad object "M31"
182
+ astrocli simbad object "Crab Nebula" --show-all-cols
183
+ ```
184
+
185
+ #### 2. Search VizieR catalogs
186
+
187
+ ```bash
188
+ # Find catalogs by keywords
189
+ astrocli vizier find-catalogs --keyword photometry --keyword galaxy
190
+
191
+ # Query a specific catalog
192
+ astrocli vizier object "M31" --radius 0.1 --catalog "I/261/gaiadr3"
193
+ ```
194
+
195
+ #### 3. Query AAVSO Variable Star Index (NEW!)
196
+
197
+ ```bash
198
+ # Query a variable star by name
199
+ astrocli aavso object "SS Cyg"
200
+
201
+ # Search variable stars in a sky region
202
+ astrocli aavso region 196.421 18.018 --radius 0.5
203
+
204
+ # Get results in JSON format
205
+ astrocli aavso object "T CrB" --format json
206
+ ```
207
+
208
+ #### 4. Query Fermi-LAT Data (NEW!)
209
+
210
+ ```bash
211
+ # Query Fermi data for a target
212
+ astrocli fermi object "Crab Nebula" --energy "1000,100000" --dates "2020-01-01 00:00:00, 2020-01-02 00:00:00"
213
+
214
+ # Clear Fermi cache
215
+ astrocli fermi clear-cache
216
+ ```
217
+
218
+ #### 5. Search ADS literature
219
+
220
+ ```bash
221
+ astrocli ads search --title "exoplanet detection"
222
+ astrocli ads bibcode "2023A&A...555..959W"
223
+ ```
224
+
225
+ ---
226
+
227
+ ## 🌐 Multi-Language Support
228
+
229
+ Change output language on-the-fly:
230
+
231
+ ```bash
232
+ astrocli --lang en simbad object "M31" # English
233
+ astrocli --lang zh simbad object "M31" # Chinese (Simplified)
234
+ astrocli --lang ja simbad object "M31" # Japanese
235
+ astrocli --lang fr simbad object "M31" # French
236
+ ```
237
+
238
+ Supported languages: **English (en)**, **Chinese (zh)**, **Japanese (ja)**, **French (fr)**
239
+
240
+ ---
241
+
242
+ ## πŸ”§ Global Options
243
+
244
+ | Option | Description |
245
+ |--------|-------------|
246
+ | `-l, --lang` | Set output language (en/zh/ja) |
247
+ | `-p, --ping` | Test connectivity to all services (top-level only) |
248
+ | `-f, --field` | Check available fields for a module (top-level only) |
249
+ | `-d, --debug` | Enable debug mode with verbose output |
250
+ | `-v, --verbose` | Enable verbose output |
251
+
252
+ ---
253
+
254
+ ## πŸ§‘β€πŸ’» Shell Autocompletion
255
+
256
+ Install completion for your shell:
257
+
258
+ ```bash
259
+ astrocli --install-completion bash # Bash
260
+ astrocli --install-completion zsh # Zsh
261
+ astrocli --install-completion fish # Fish
262
+ ```
263
+
264
+ Add this to your shell config (e.g., `~/.zshrc`):
265
+
266
+ ```bash
267
+ # For zsh
268
+ eval "$(astrocli --install-completion zsh)"
269
+
270
+ # For bash
271
+ eval "$(astrocli --install-completion bash)"
272
+ ```
273
+
274
+ ---
275
+
276
+ ## πŸ“Š Output & Export
277
+
278
+ Save query results to file:
279
+
280
+ ```bash
281
+ astrocli simbad object "M31" --output-file results.csv
282
+
283
+ # Specify format explicitly
284
+ astrocli simbad object "M31" --output-file data.ecsv --output-format ecsv
285
+ ```
286
+
287
+ Supported formats: `csv`, `ecsv`, `fits`, `votable`, `html`, `latex`, `ascii`
288
+
289
+ ---
290
+
291
+ ## πŸ” Testing Service Connectivity
292
+
293
+ Check if all data services are accessible:
294
+
295
+ ```bash
296
+ astrocli --ping
297
+ ```
298
+
299
+ ---
300
+
301
+ ## πŸ› οΈ Development
302
+
303
+ ### Project Structure
304
+
305
+ ```
306
+ astrocli/
307
+ β”œβ”€β”€ src/ # Source code (renamed from astroquery_cli)
308
+ β”‚ β”œβ”€β”€ modules/ # Service-specific modules
309
+ β”‚ β”‚ β”œβ”€β”€ simbad_cli.py
310
+ β”‚ β”‚ β”œβ”€β”€ vizier_cli.py
311
+ β”‚ β”‚ β”œβ”€β”€ aavso_cli.py # AAVSO VSX
312
+ β”‚ β”‚ β”œβ”€β”€ fermi_cli.py # Fermi-LAT
313
+ β”‚ β”‚ └── ...
314
+ β”‚ β”œβ”€β”€ utils.py # Common utilities
315
+ β”‚ β”œβ”€β”€ common_options.py # Shared CLI options
316
+ β”‚ β”œβ”€β”€ i18n.py # Internationalization
317
+ β”‚ └── main.py # CLI entry point
318
+ β”œβ”€β”€ locales/ # Translation files
319
+ β”‚ β”œβ”€β”€ en/LC_MESSAGES/ # English
320
+ β”‚ β”œβ”€β”€ zh/LC_MESSAGES/ # Chinese
321
+ β”‚ β”œβ”€β”€ ja/LC_MESSAGES/ # Japanese
322
+ β”‚ └── fr/LC_MESSAGES/ # French
323
+ β”œβ”€β”€ package.json # npm/npx configuration
324
+ β”œβ”€β”€ pyproject.toml # Python package config
325
+ └── README.md
326
+ ```
327
+
328
+ ### Adding a New Module
329
+
330
+ 1. Create `modules/<service>_cli.py` following existing patterns
331
+ 2. Import in `main.py`'s `setup_subcommands()`
332
+ 3. Add to README module list
333
+ 4. Add translations to `locales/` directories
334
+
335
+ ---
336
+
337
+ ## πŸ“„ License
338
+
339
+ BSD 3-Clause License
340
+
341
+ ---
342
+
343
+ ## πŸ™ Acknowledgments
344
+
345
+ - [aqc-mcp](https://github.com/inoribea/aqc-mcp) - MCP server for AI assistants
346
+ - [Astroquery](https://astroquery.readthedocs.io/) - Astronomical data access library
347
+ - [Typer](https://typer.tiangolo.com/) - Modern CLI framework
348
+ - [Rich](https://github.com/Textualize/rich) - Beautiful terminal output
349
+ - [AAVSO](https://www.aavso.org/) - American Association of Variable Star Observers
350
+ - [Fermi Team](https://fermi.gsfc.nasa.gov/) - Fermi Gamma-ray Space Telescope
@@ -0,0 +1,324 @@
1
+ # Astro CLI πŸš€
2
+
3
+ **[English](README.md)** | **[δΈ­ζ–‡](README_ZH.md)** | **[ζ—₯本θͺž](README_JA.md)** | **[FranΓ§ais](README_FR.md)**
4
+
5
+ > Your gateway to cosmos β€” Query astronomical data from command line
6
+
7
+ [![License](https://img.shields.io/badge/License-BSD%203Clause-blue.svg)](LICENSE)
8
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
9
+ [![Astropy](https://img.shields.io/badge/astropy-6.0%2B-orange.svg)](https://www.astropy.org/)
10
+ [![npm version](https://img.shields.io/npm/v/astroquery-cli.svg)](https://www.npmjs.com/package/astroquery-cli)
11
+
12
+ ---
13
+
14
+ ## ✨ What is Astro CLI?
15
+
16
+ **Astro CLI** is a modern command-line tool that provides quick access to multiple astronomical data services. It integrates [Astroquery](https://astroquery.readthedocs.io/) and other data access methods (direct API calls, HTTP requests) to help astronomers, researchers, and anyone query astronomical databases efficiently from the terminal.
17
+
18
+ *17 data sources. One command. Beautiful output. Multi-language support. Extensible for future services.*
19
+
20
+ ---
21
+
22
+ ## 🧩 Supported Data Sources
23
+
24
+ Query data from 17 different astronomical databases and services:
25
+
26
+ | Service | Description | Command | Alias |
27
+ |---------|------------|----------|--------|
28
+ | [SIMBAD](https://simbad.cds.unistra.fr/) | Basic astronomical data & object identification | `astrocli simbad` | `astrocli sim` |
29
+ | [VizieR](https://vizier.cds.unistra.fr/) | Catalog database search | `astrocli vizier` | `astrocli viz` |
30
+ | [ALMA](https://almascience.org/) | ALMA radio telescope observations | `astrocli alma` | - |
31
+ | [ESASky](https://www.esa.int/Enabling_Support/Operations/ESASky/) | Sky region visualization | `astrocli esasky` | - |
32
+ | [Gaia](https://www.cosmos.esa.int/gaia/) | ESA Gaia mission data | `astrocli gaia` | - |
33
+ | [IRSA](https://irsa.ipac.caltech.edu/) | Infrared Science Archive | `astrocli irsa` | - |
34
+ | [HEASARC](https://heasarc.gsfc.nasa.gov/) | X-ray and Gamma-ray data | `astrocli heasarc` | `astrocli hea` |
35
+ | [JPL Horizons](https://ssd.jpl.nasa.gov/) | Solar System ephemerides | `astrocli jpl` | - |
36
+ | [MAST](https://mast.stsci.edu/) | Space Telescope Archive (HST, JWST, etc.) | `astrocli mast` | - |
37
+ | [ADS](https://ui.adsabs.harvard.edu/) | Astrophysics literature search | `astrocli ads` | - |
38
+ | [NED](https://ned.ipac.caltech.edu/) | Extragalactic Database | `astrocli ned` | - |
39
+ | [NIST](https://physics.nist.gov/ASD/) | Atomic spectra database | `astrocli nist` | - |
40
+ | [NASA Exoplanet](https://exoplanetarchive.ipac.caltech.edu/) | Exoplanet catalog | `astrocli exoplanet` | `astrocli exo` |
41
+ | [SDSS](https://www.sdss.org/) | Sloan Digital Sky Survey | `astrocli sdss` | - |
42
+ | [ESO](https://www.eso.org/) | European Southern Observatory | `astrocli eso` | - |
43
+ | [Splatalogue](https://www.splatalogue.org/) | Molecular line database | `astrocli splatalogue` | `astrocli spl` |
44
+ | [**AAVSO VSX**](https://www.aavso.org/vsx/) | Variable Star Index | `astrocli aavso` | `astrocli aav` |
45
+ | [**Fermi-LAT**](https://fermi.gsfc.nasa.gov/) | Gamma-ray telescope data | `astrocli fermi` | `astrocli fer` |
46
+
47
+ ---
48
+
49
+ ## 🌟 Key Features
50
+
51
+ - **πŸ“¦ Multi-Source Access**: Query 17+ astronomical databases from a single interface
52
+ - **🌏 Internationalized UI**: Built-in support for English, Chinese (Simplified), and Japanese
53
+ - **πŸ“Š Rich Output**: Beautifully formatted tables with support for exporting to CSV, ECSV, FITS, and more
54
+ - **⚑ Smart Defaults**: Sensible defaults with extensive customization options
55
+ - **πŸ” Service Health**: Built-in connectivity testing (`--ping`) and field validation (`--field`)
56
+ - **πŸ§‘β€πŸ’» Shell Completion**: Auto-completion support for Bash, Zsh, and Fish
57
+ - **🌌 Extensible**: Easy to add new astronomical data services
58
+
59
+ ---
60
+
61
+ ## πŸ“¦ Installation
62
+
63
+ Astro CLI offers multiple installation methods. Choose the one that suits you:
64
+
65
+ ### Method 1: npm Global Install (Recommended)
66
+
67
+ ```bash
68
+ # Global install (requires Node.js β‰₯18 and Python 3.11+)
69
+ npm install -g astroquery-cli
70
+
71
+ # After installation, all three commands are available:
72
+ astroquery-cli --help # Full command name
73
+ aqc --help # Short command (recommended)
74
+ astrocli --help # Alias command
75
+
76
+ # Example: Query SIMBAD for M31
77
+ astrocli simbad object "M31"
78
+ ```
79
+
80
+ ### Method 2: npx/pnpm (No Install Required)
81
+
82
+ ```bash
83
+ # Using npx (no installation needed)
84
+ npx astroquery-cli --help
85
+
86
+ # Using pnpm
87
+ pnpm astroquery-cli --help
88
+
89
+ # Example
90
+ npx astroquery-cli simbad object "M31"
91
+ ```
92
+
93
+ ### Method 3: PyPI Install (For Python Users)
94
+
95
+ ```bash
96
+ # Install Python package from PyPI
97
+ pip install aqc-cli
98
+
99
+ # After installation, available commands:
100
+ aqc --help
101
+ astrocli --help
102
+ ```
103
+
104
+ ### Method 4: Install from Source
105
+
106
+ ```bash
107
+ git clone https://github.com/inoribea/astroquery-cli.git
108
+ cd astroquery-cli
109
+ pip install -e .
110
+ ```
111
+
112
+ ---
113
+
114
+ ### πŸ“‹ Package Naming
115
+
116
+ | Platform | Package Name | Install Command |
117
+ |----------|--------------|-----------------|
118
+ | **npm** | `astroquery-cli` | `npm install -g astroquery-cli` |
119
+ | **PyPI** | `aqc-cli` | `pip install aqc-cli` |
120
+
121
+ After installation, all three commands are available:
122
+ - `astroquery-cli` - Full command name
123
+ - `aqc` - Short command (recommended)
124
+ - `astrocli` - Alias command
125
+
126
+ ---
127
+
128
+ ### Environment Variables
129
+
130
+ - `AC_PYTHON` - Specify Python interpreter path
131
+ - `AC_VENV_DIR` - Custom virtual environment cache directory (default: `~/.cache/astrocli`)
132
+ - `AC_FORCE_INSTALL=1` - Force reinstall/upgrade Python dependencies
133
+ - `AC_DEBUG` - Enable debug mode
134
+ - `AC_LANG` - Set default language (en/zh/ja)
135
+
136
+ ---
137
+
138
+ ## πŸ“š Usage
139
+
140
+ ### View All Available Commands
141
+
142
+ ```bash
143
+ # Show all available modules and commands
144
+ astrocli --help
145
+
146
+ # Show help for a specific module
147
+ astrocli <module> --help
148
+ ```
149
+
150
+ ### Query Examples
151
+
152
+ #### 1. Query SIMBAD for an object
153
+
154
+ ```bash
155
+ astrocli simbad object "M31"
156
+ astrocli simbad object "Crab Nebula" --show-all-cols
157
+ ```
158
+
159
+ #### 2. Search VizieR catalogs
160
+
161
+ ```bash
162
+ # Find catalogs by keywords
163
+ astrocli vizier find-catalogs --keyword photometry --keyword galaxy
164
+
165
+ # Query a specific catalog
166
+ astrocli vizier object "M31" --radius 0.1 --catalog "I/261/gaiadr3"
167
+ ```
168
+
169
+ #### 3. Query AAVSO Variable Star Index (NEW!)
170
+
171
+ ```bash
172
+ # Query a variable star by name
173
+ astrocli aavso object "SS Cyg"
174
+
175
+ # Search variable stars in a sky region
176
+ astrocli aavso region 196.421 18.018 --radius 0.5
177
+
178
+ # Get results in JSON format
179
+ astrocli aavso object "T CrB" --format json
180
+ ```
181
+
182
+ #### 4. Query Fermi-LAT Data (NEW!)
183
+
184
+ ```bash
185
+ # Query Fermi data for a target
186
+ astrocli fermi object "Crab Nebula" --energy "1000,100000" --dates "2020-01-01 00:00:00, 2020-01-02 00:00:00"
187
+
188
+ # Clear Fermi cache
189
+ astrocli fermi clear-cache
190
+ ```
191
+
192
+ #### 5. Search ADS literature
193
+
194
+ ```bash
195
+ astrocli ads search --title "exoplanet detection"
196
+ astrocli ads bibcode "2023A&A...555..959W"
197
+ ```
198
+
199
+ ---
200
+
201
+ ## 🌐 Multi-Language Support
202
+
203
+ Change output language on-the-fly:
204
+
205
+ ```bash
206
+ astrocli --lang en simbad object "M31" # English
207
+ astrocli --lang zh simbad object "M31" # Chinese (Simplified)
208
+ astrocli --lang ja simbad object "M31" # Japanese
209
+ astrocli --lang fr simbad object "M31" # French
210
+ ```
211
+
212
+ Supported languages: **English (en)**, **Chinese (zh)**, **Japanese (ja)**, **French (fr)**
213
+
214
+ ---
215
+
216
+ ## πŸ”§ Global Options
217
+
218
+ | Option | Description |
219
+ |--------|-------------|
220
+ | `-l, --lang` | Set output language (en/zh/ja) |
221
+ | `-p, --ping` | Test connectivity to all services (top-level only) |
222
+ | `-f, --field` | Check available fields for a module (top-level only) |
223
+ | `-d, --debug` | Enable debug mode with verbose output |
224
+ | `-v, --verbose` | Enable verbose output |
225
+
226
+ ---
227
+
228
+ ## πŸ§‘β€πŸ’» Shell Autocompletion
229
+
230
+ Install completion for your shell:
231
+
232
+ ```bash
233
+ astrocli --install-completion bash # Bash
234
+ astrocli --install-completion zsh # Zsh
235
+ astrocli --install-completion fish # Fish
236
+ ```
237
+
238
+ Add this to your shell config (e.g., `~/.zshrc`):
239
+
240
+ ```bash
241
+ # For zsh
242
+ eval "$(astrocli --install-completion zsh)"
243
+
244
+ # For bash
245
+ eval "$(astrocli --install-completion bash)"
246
+ ```
247
+
248
+ ---
249
+
250
+ ## πŸ“Š Output & Export
251
+
252
+ Save query results to file:
253
+
254
+ ```bash
255
+ astrocli simbad object "M31" --output-file results.csv
256
+
257
+ # Specify format explicitly
258
+ astrocli simbad object "M31" --output-file data.ecsv --output-format ecsv
259
+ ```
260
+
261
+ Supported formats: `csv`, `ecsv`, `fits`, `votable`, `html`, `latex`, `ascii`
262
+
263
+ ---
264
+
265
+ ## πŸ” Testing Service Connectivity
266
+
267
+ Check if all data services are accessible:
268
+
269
+ ```bash
270
+ astrocli --ping
271
+ ```
272
+
273
+ ---
274
+
275
+ ## πŸ› οΈ Development
276
+
277
+ ### Project Structure
278
+
279
+ ```
280
+ astrocli/
281
+ β”œβ”€β”€ src/ # Source code (renamed from astroquery_cli)
282
+ β”‚ β”œβ”€β”€ modules/ # Service-specific modules
283
+ β”‚ β”‚ β”œβ”€β”€ simbad_cli.py
284
+ β”‚ β”‚ β”œβ”€β”€ vizier_cli.py
285
+ β”‚ β”‚ β”œβ”€β”€ aavso_cli.py # AAVSO VSX
286
+ β”‚ β”‚ β”œβ”€β”€ fermi_cli.py # Fermi-LAT
287
+ β”‚ β”‚ └── ...
288
+ β”‚ β”œβ”€β”€ utils.py # Common utilities
289
+ β”‚ β”œβ”€β”€ common_options.py # Shared CLI options
290
+ β”‚ β”œβ”€β”€ i18n.py # Internationalization
291
+ β”‚ └── main.py # CLI entry point
292
+ β”œβ”€β”€ locales/ # Translation files
293
+ β”‚ β”œβ”€β”€ en/LC_MESSAGES/ # English
294
+ β”‚ β”œβ”€β”€ zh/LC_MESSAGES/ # Chinese
295
+ β”‚ β”œβ”€β”€ ja/LC_MESSAGES/ # Japanese
296
+ β”‚ └── fr/LC_MESSAGES/ # French
297
+ β”œβ”€β”€ package.json # npm/npx configuration
298
+ β”œβ”€β”€ pyproject.toml # Python package config
299
+ └── README.md
300
+ ```
301
+
302
+ ### Adding a New Module
303
+
304
+ 1. Create `modules/<service>_cli.py` following existing patterns
305
+ 2. Import in `main.py`'s `setup_subcommands()`
306
+ 3. Add to README module list
307
+ 4. Add translations to `locales/` directories
308
+
309
+ ---
310
+
311
+ ## πŸ“„ License
312
+
313
+ BSD 3-Clause License
314
+
315
+ ---
316
+
317
+ ## πŸ™ Acknowledgments
318
+
319
+ - [aqc-mcp](https://github.com/inoribea/aqc-mcp) - MCP server for AI assistants
320
+ - [Astroquery](https://astroquery.readthedocs.io/) - Astronomical data access library
321
+ - [Typer](https://typer.tiangolo.com/) - Modern CLI framework
322
+ - [Rich](https://github.com/Textualize/rich) - Beautiful terminal output
323
+ - [AAVSO](https://www.aavso.org/) - American Association of Variable Star Observers
324
+ - [Fermi Team](https://fermi.gsfc.nasa.gov/) - Fermi Gamma-ray Space Telescope