@starfetch-js/cli 0.1.1 → 0.2.1
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.
- package/README.md +31 -4
- package/dist/index.js +2 -2
- package/package.json +15 -7
package/README.md
CHANGED
|
@@ -1,24 +1,51 @@
|
|
|
1
1
|
# @starfetch-js/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Query Gaia, SIMBAD, VizieR, the NASA Exoplanet Archive, IRSA, and other public
|
|
4
|
+
astronomy TAP services from the command line. Starfetch keeps ADQL visible so
|
|
5
|
+
an agent result, script, or investigation can be reproduced exactly.
|
|
6
|
+
|
|
7
|
+
Requires Node.js 22 or newer.
|
|
4
8
|
|
|
5
9
|
```sh
|
|
6
10
|
npm install -g @starfetch-js/cli
|
|
11
|
+
starfetch tap tables --service gaia
|
|
7
12
|
```
|
|
8
13
|
|
|
9
|
-
Run once without
|
|
14
|
+
Run once without installing globally:
|
|
10
15
|
|
|
11
16
|
```sh
|
|
12
17
|
npx -y @starfetch-js/cli tap tables --service gaia
|
|
13
18
|
```
|
|
14
19
|
|
|
20
|
+
## Metadata first, then a bounded query
|
|
21
|
+
|
|
22
|
+
Inspect the live schema before writing service-specific ADQL:
|
|
23
|
+
|
|
15
24
|
```sh
|
|
25
|
+
starfetch tap availability --service gaia
|
|
16
26
|
starfetch tap tables --service gaia
|
|
27
|
+
starfetch tap columns --service gaia --table gaiadr3.gaia_source
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Then run a reproducible query. `TOP` bounds the ADQL result and `--maxrec`
|
|
31
|
+
bounds the TAP request:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
17
34
|
starfetch tap query \
|
|
18
35
|
--service gaia \
|
|
19
36
|
--query "SELECT TOP 5 source_id, ra, dec FROM gaiadr3.gaia_source" \
|
|
37
|
+
--maxrec 5 \
|
|
20
38
|
--format json
|
|
21
39
|
```
|
|
22
40
|
|
|
23
|
-
|
|
24
|
-
|
|
41
|
+
```json
|
|
42
|
+
[{ "source_id": "…", "ra": 56.64828, "dec": 24.38537 }]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The CLI also supports VO registry discovery, explicit TAP/UWS async jobs,
|
|
46
|
+
CSV/TSV/VOTable output, and `starfetch skill` commands. It is intended for
|
|
47
|
+
public TAP services, not authenticated/private archives, image processing, or
|
|
48
|
+
authoritative astrophysical interpretation.
|
|
49
|
+
|
|
50
|
+
For the complete Gaia proper-motion workflow and TypeScript API, see the
|
|
51
|
+
[repository README](https://github.com/starfetch-js/starfetch#readme).
|
package/dist/index.js
CHANGED
|
@@ -3218,7 +3218,7 @@ var TapUploadError = class extends StarfetchError {
|
|
|
3218
3218
|
this.name = "TapUploadError";
|
|
3219
3219
|
}
|
|
3220
3220
|
};
|
|
3221
|
-
/** TAP service requires authentication that Starfetch
|
|
3221
|
+
/** TAP service requires authentication that Starfetch does not support. */
|
|
3222
3222
|
var TapAuthUnsupportedError = class extends StarfetchError {
|
|
3223
3223
|
constructor(message) {
|
|
3224
3224
|
super(message);
|
|
@@ -6874,7 +6874,7 @@ async function readTapCapabilitiesIfAvailable(target, options) {
|
|
|
6874
6874
|
return capabilities;
|
|
6875
6875
|
}
|
|
6876
6876
|
function assertCapabilitiesAllowAnonymousTap(capabilities) {
|
|
6877
|
-
if (capabilities.auth === "unsupported-auth") throw new TapAuthUnsupportedError("This TAP query interface requires authentication, but Starfetch
|
|
6877
|
+
if (capabilities.auth === "unsupported-auth") throw new TapAuthUnsupportedError("This TAP query interface requires authentication, but Starfetch only supports anonymous TAP requests.");
|
|
6878
6878
|
}
|
|
6879
6879
|
async function readParsedTapTables(target, options) {
|
|
6880
6880
|
return parseTapTables(await readTapMetadataXml(target, "tables", options));
|
package/package.json
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starfetch-js/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "CLI for querying Gaia, SIMBAD, VizieR, and other public astronomy TAP services with reproducible ADQL.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"astronomy",
|
|
9
|
+
"gaia",
|
|
10
|
+
"simbad",
|
|
11
|
+
"vizier",
|
|
12
|
+
"exoplanets",
|
|
13
|
+
"nasa-exoplanet-archive",
|
|
14
|
+
"irsa",
|
|
15
|
+
"star-catalog",
|
|
16
|
+
"virtual-observatory",
|
|
9
17
|
"tap",
|
|
10
18
|
"adql",
|
|
11
|
-
"cli"
|
|
12
|
-
"virtual-observatory"
|
|
19
|
+
"cli"
|
|
13
20
|
],
|
|
14
21
|
"homepage": "https://github.com/starfetch-js/starfetch#readme",
|
|
15
22
|
"bugs": {
|
|
@@ -42,8 +49,8 @@
|
|
|
42
49
|
"test": "vitest run"
|
|
43
50
|
},
|
|
44
51
|
"dependencies": {
|
|
45
|
-
"@starfetch-js/core": "0.
|
|
46
|
-
"@starfetch-js/skill": "0.
|
|
52
|
+
"@starfetch-js/core": "0.2.1",
|
|
53
|
+
"@starfetch-js/skill": "0.2.1",
|
|
47
54
|
"commander": "15.0.0"
|
|
48
55
|
},
|
|
49
56
|
"devDependencies": {
|
|
@@ -54,5 +61,6 @@
|
|
|
54
61
|
},
|
|
55
62
|
"publishConfig": {
|
|
56
63
|
"access": "public"
|
|
57
|
-
}
|
|
64
|
+
},
|
|
65
|
+
"gitHead": "5edb8bd748ade8549c9336576ca2da3ce60654dc"
|
|
58
66
|
}
|