@aexhq/cli 0.46.0 → 0.47.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 +43 -29
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,40 +1,54 @@
|
|
|
1
1
|
# Aex CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Manage your Aex API keys, account and usage from the terminal. To run an agent, use the
|
|
4
|
+
[SDK quickstart](https://aex.dev/docs).
|
|
5
|
+
|
|
6
|
+
## Get started
|
|
7
|
+
|
|
8
|
+
Requires Node.js 22 or newer:
|
|
5
9
|
|
|
6
10
|
```sh
|
|
7
|
-
npm install -g @aexhq/cli@0.
|
|
11
|
+
npm install -g @aexhq/cli@0.47.1
|
|
8
12
|
aex login
|
|
9
13
|
aex keys create "My application"
|
|
10
|
-
aex keys list
|
|
11
|
-
aex keys rename KEY_ID "New name"
|
|
12
|
-
aex keys revoke KEY_ID
|
|
13
|
-
aex account
|
|
14
|
-
aex billing
|
|
15
|
-
aex usage
|
|
16
|
-
aex usage SESSION_ID
|
|
17
|
-
aex docs
|
|
18
|
-
aex logout
|
|
19
14
|
```
|
|
20
15
|
|
|
21
|
-
`login` opens your browser
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
`login` opens your browser. Sign in, confirm the account, and return to the terminal on the same
|
|
17
|
+
computer. Save the new key's token as `AEX_API_KEY` in your application's server environment.
|
|
18
|
+
The secret is shown only once.
|
|
19
|
+
|
|
20
|
+
## Common commands
|
|
21
|
+
|
|
22
|
+
| Task | Command |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| List keys | `aex keys list` |
|
|
25
|
+
| Rename a key | `aex keys rename KEY_ID "New name"` |
|
|
26
|
+
| Revoke a key | `aex keys revoke KEY_ID` |
|
|
27
|
+
| Read account details | `aex account` |
|
|
28
|
+
| Check credits, prices and limits | `aex billing` |
|
|
29
|
+
| Read account usage | `aex usage` |
|
|
30
|
+
| Read one session's usage | `aex usage SESSION_ID` |
|
|
31
|
+
| Open the docs | `aex docs` |
|
|
32
|
+
| Sign out | `aex logout` |
|
|
33
|
+
|
|
34
|
+
Results are JSON on stdout; errors and login progress go to stderr. Account logins expire after
|
|
35
|
+
seven days; run `aex login` again. Use `--no-browser` to print the login URL instead.
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
token is returned once. Existing keys expose only their metadata and prefix.
|
|
29
|
-
`billing` reports preview or prepaid status, available and reserved credits, prices and the monthly
|
|
30
|
-
spend limit. `billing ledger`, `billing topups` and `billing refunds` show account history.
|
|
31
|
-
`billing set PRICEBOOK MICRO_USD` accepts the offered prices and sets the monthly limit.
|
|
32
|
-
`billing topup CENTS KEY` returns a Stripe Checkout URL; `billing refund TOPUP CENTS KEY`
|
|
33
|
-
requests return of unused credits. Reuse the operation key for the same payment intent.
|
|
37
|
+
## Billing
|
|
34
38
|
|
|
39
|
+
`aex billing ledger`, `aex billing topups` and `aex billing refunds` show account history.
|
|
40
|
+
`aex billing set PRICEBOOK MICRO_USD` accepts the offered prices and sets a monthly limit.
|
|
41
|
+
One dollar is 1,000,000 micro-USD.
|
|
42
|
+
|
|
43
|
+
`aex billing topup CENTS KEY` returns a Checkout URL; `aex billing refund TOPUP CENTS KEY`
|
|
44
|
+
requests a refund of unused credits. Reuse the same operation key when recovering the same
|
|
45
|
+
payment request. See [billing](https://github.com/aexhq/aex/blob/main/docs/billing.md).
|
|
46
|
+
|
|
47
|
+
## Automation and configuration
|
|
48
|
+
|
|
49
|
+
Use `AEX_ACCOUNT_TOKEN` for account automation; a workload API key cannot manage other keys.
|
|
35
50
|
The credential file is `~/.aex/account.json` on Unix or `%LOCALAPPDATA%/.aex/account.json`
|
|
36
|
-
on Windows
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
selects the matching login website for a self-hosted installation.
|
|
51
|
+
on Windows. `AEX_CONFIG_DIR` overrides the directory.
|
|
52
|
+
|
|
53
|
+
For self-hosting, `AEX_API_URL` or `--api-url` selects the API and `--site-url` selects its login
|
|
54
|
+
website. Stored credentials are bound to their API origin.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aexhq/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.1",
|
|
4
4
|
"description": "Aex account and API key management from the terminal",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"tag": "next"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aexhq/sdk": "0.
|
|
27
|
+
"@aexhq/sdk": "0.81.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"test": "node --test test/*.test.mjs"
|