@aexhq/cli 0.26.0 → 0.26.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/dist/index.js +5 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { dirname, join, resolve } from "node:path";
|
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import { Aex, AexError } from "@aexhq/sdk";
|
|
7
7
|
import * as z from "zod";
|
|
8
|
-
const HELP = `
|
|
8
|
+
const HELP = `Aex — the session backend for AI apps
|
|
9
9
|
|
|
10
10
|
Usage:
|
|
11
11
|
aex login
|
|
@@ -32,7 +32,7 @@ async function main(argv) {
|
|
|
32
32
|
const aex = await client();
|
|
33
33
|
if (command === "doctor") {
|
|
34
34
|
await aex.sessions.list({ limit: 1 });
|
|
35
|
-
process.stdout.write("
|
|
35
|
+
process.stdout.write("Aex API: ok\n");
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
if (command !== "session")
|
|
@@ -124,7 +124,7 @@ function summary(session) {
|
|
|
124
124
|
async function client() {
|
|
125
125
|
const apiKey = process.env.AEX_API_KEY ?? (await readConfig())?.apiKey;
|
|
126
126
|
if (apiKey === undefined || apiKey === "") {
|
|
127
|
-
throw new Error("No
|
|
127
|
+
throw new Error("No Aex API key. Run `aex login` first.");
|
|
128
128
|
}
|
|
129
129
|
return new Aex({
|
|
130
130
|
apiKey,
|
|
@@ -132,9 +132,9 @@ async function client() {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
async function login() {
|
|
135
|
-
const apiKey = (await readSecret("Paste
|
|
135
|
+
const apiKey = (await readSecret("Paste Aex API key: ")).trim();
|
|
136
136
|
if (!/^aex_sk_[A-Za-z0-9]{40,64}$/.test(apiKey)) {
|
|
137
|
-
throw new Error("That does not look like an
|
|
137
|
+
throw new Error("That does not look like an Aex session API key.");
|
|
138
138
|
}
|
|
139
139
|
const path = configPath();
|
|
140
140
|
await mkdir(dirname(path), { recursive: true, mode: 0o700 });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aexhq/cli",
|
|
3
|
-
"version": "0.26.
|
|
4
|
-
"description": "Command-line client for
|
|
3
|
+
"version": "0.26.1",
|
|
4
|
+
"description": "Command-line client for Aex sessions",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://aex.dev",
|
|
7
7
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"test": "tsc -p tsconfig.json && node --test"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@aexhq/sdk": "0.55.
|
|
32
|
+
"@aexhq/sdk": "0.55.1",
|
|
33
33
|
"zod": "^4.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|