@asteroidai/cli 0.0.0 → 1.8.193
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 +32 -0
- package/dist/asteroid.js +5945 -0
- package/dist/core.js +5089 -0
- package/package.json +51 -1
- package/src/account.ts +221 -0
- package/src/args.ts +39 -0
- package/src/auth/credentials.ts +136 -0
- package/src/auth/store.ts +145 -0
- package/src/auth/workos.ts +171 -0
- package/src/config.ts +125 -0
- package/src/core.ts +10 -0
- package/src/generated/commands.ts +4755 -0
- package/src/http.ts +113 -0
- package/src/main.ts +49 -0
- package/src/output.test.ts +26 -0
- package/src/output.ts +153 -0
- package/src/program.test.ts +99 -0
- package/src/program.ts +256 -0
- package/src/reference.ts +170 -0
- package/src/request.test.ts +164 -0
- package/src/request.ts +252 -0
- package/src/run.test.ts +280 -0
- package/src/run.ts +178 -0
- package/src/types.ts +42 -0
- package/src/ui.ts +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @asteroidai/cli
|
|
2
|
+
|
|
3
|
+
The `asteroid` command-line interface for the Asteroid platform.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @asteroidai/cli login
|
|
7
|
+
npx @asteroidai/cli workflow list
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Sign in with `asteroid login`. It opens your browser and stores a refresh token in the OS
|
|
11
|
+
keychain. Without a keychain it uses a private file in the config directory
|
|
12
|
+
(`~/.config/asteroid`, or `ASTEROID_CONFIG_DIR`). CI and agents without a browser set
|
|
13
|
+
`ASTEROID_API_KEY` instead. `--org` and `ASTEROID_ORG` do not apply to an API key.
|
|
14
|
+
|
|
15
|
+
| Variable | Use |
|
|
16
|
+
| ------------------ | --------------------------------------------------- |
|
|
17
|
+
| `ASTEROID_API_KEY` | Organization API key, sent as `X-Api-Key` |
|
|
18
|
+
| `ASTEROID_ORG` | Organization for one command, like `--org` |
|
|
19
|
+
| `ASTEROID_API_URL` | API host. Defaults to `https://odyssey.asteroid.ai` |
|
|
20
|
+
|
|
21
|
+
Pick the organization with `asteroid use <org>`. `--org`, `ASTEROID_ORG` and a repo's
|
|
22
|
+
`.asteroid/org` file override it, in that order.
|
|
23
|
+
|
|
24
|
+
Commands that return data print compact text. Add `--json` to get the response as JSON.
|
|
25
|
+
The text output may change between releases, so scripts should read `--json`. Downloads
|
|
26
|
+
write raw bytes, and `login`, `logout` and `use` only report status on stderr. Exit codes: 0 ok,
|
|
27
|
+
1 API error, 2 usage error.
|
|
28
|
+
|
|
29
|
+
Commands are generated from the `cli` surface of the External API spec. After a TypeSpec
|
|
30
|
+
change, run `pnpm exec nx run @asteroidai/cli:generate` from the repo root: it compiles
|
|
31
|
+
the spec first. The full reference is
|
|
32
|
+
`docs/cli/reference.mdx`, published in the docs.
|