@aixyz/cli 0.2.0 → 0.4.2

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 CHANGED
@@ -1,4 +1,4 @@
1
- # aixyz-cli
1
+ # @aixyz/cli
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/aixyz-cli)](https://www.npmjs.com/package/aixyz-cli)
4
4
 
package/bin.ts CHANGED
@@ -28,17 +28,17 @@ program
28
28
  program
29
29
  .command("build")
30
30
  .description("Build the aixyz agent")
31
- .option("--vercel", "Build for Vercel deployment with serverless function output")
31
+ .option("--output <type>", "Output format: 'standalone' or 'vercel'")
32
32
  .addHelpText(
33
33
  "after",
34
34
  `
35
35
  Details:
36
36
  Bundles your aixyz agent for deployment.
37
37
 
38
- Default behavior:
39
- Bundles into a single executable file for Bun Runtime at ./.aixyz/output/server.js
38
+ Default behavior (auto-detected):
39
+ Bundles into a single executable file for Standalone at ./.aixyz/output/server.js
40
40
 
41
- With --vercel flag or VERCEL=1 env:
41
+ With --output vercel or VERCEL=1 env:
42
42
  Generates Vercel Build Output API v3 structure at .vercel/output/
43
43
  (Automatically detected when deploying to Vercel)
44
44
 
@@ -53,9 +53,10 @@ Prerequisites:
53
53
  - An entrypoint at app/server.ts, or app/agent.ts + app/tools/ for auto-generation
54
54
 
55
55
  Examples:
56
- $ aixyz build # Build for Bun Runtime (default)
57
- $ aixyz build --vercel # Build for Vercel deployment
58
- $ VERCEL=1 aixyz build # Auto-detected Vercel build`,
56
+ $ aixyz build # Build standalone (default)
57
+ $ aixyz build --output standalone # Build standalone explicitly
58
+ $ aixyz build --output vercel # Build for Vercel deployment
59
+ $ VERCEL=1 aixyz build # Auto-detected Vercel build`,
59
60
  )
60
61
  .action(handleAction(build));
61
62
 
@@ -43,6 +43,9 @@ export function AixyzConfigPlugin(): BunPlugin {
43
43
  export function getAixyzConfig() {
44
44
  return config;
45
45
  }
46
+ export function getAixyzConfigRuntime() {
47
+ return config;
48
+ }
46
49
  `,
47
50
  loader: "ts",
48
51
  }));
package/build/index.ts CHANGED
@@ -2,26 +2,28 @@ import { resolve } from "path";
2
2
  import { existsSync, mkdirSync, cpSync, rmSync } from "fs";
3
3
  import { AixyzConfigPlugin } from "./AixyzConfigPlugin";
4
4
  import { AixyzServerPlugin, getEntrypointMayGenerate } from "./AixyzServerPlugin";
5
+ import { getAixyzConfig } from "@aixyz/config";
5
6
  import { loadEnvConfig } from "@next/env";
6
7
  import chalk from "chalk";
7
8
 
8
9
  interface BuildOptions {
9
- vercel?: boolean;
10
+ output?: string;
10
11
  }
11
12
 
12
13
  export async function build(options: BuildOptions = {}): Promise<void> {
13
- // Auto-detect Vercel environment
14
- const isVercel = options.vercel || process.env.VERCEL === "1";
15
-
16
14
  const cwd = process.cwd();
17
15
  loadEnvConfig(cwd, false);
18
16
  const entrypoint = getEntrypointMayGenerate(cwd, "build");
19
17
 
20
- if (isVercel) {
18
+ // Determine output target: explicit CLI flag takes precedence, then config file, then auto-detect VERCEL env
19
+ const config = getAixyzConfig();
20
+ const target = options.output ?? config.build?.output ?? (process.env.VERCEL === "1" ? "vercel" : "standalone");
21
+
22
+ if (target === "vercel") {
21
23
  console.log(chalk.cyan("▶") + " Building for " + chalk.bold("Vercel") + "...");
22
24
  await buildVercel(entrypoint);
23
25
  } else {
24
- console.log(chalk.cyan("▶") + " Building for " + chalk.bold("Bun Runtime") + "...");
26
+ console.log(chalk.cyan("▶") + " Building for " + chalk.bold("Standalone") + "...");
25
27
  await buildBun(entrypoint);
26
28
  }
27
29
  }
package/package.json CHANGED
@@ -1,19 +1,15 @@
1
1
  {
2
2
  "name": "@aixyz/cli",
3
- "version": "0.2.0",
4
- "description": "CLI for building and deploying aixyz agents.",
3
+ "version": "0.4.2",
4
+ "description": "Payment-native SDK for AI Agent",
5
5
  "keywords": [
6
6
  "ai",
7
+ "payments",
7
8
  "agent",
8
- "cli",
9
- "aixyz",
10
- "erc-8004",
11
- "deploy"
9
+ "aixyz"
12
10
  ],
13
11
  "homepage": "https://ai-xyz.dev",
14
- "bugs": {
15
- "url": "https://github.com/AgentlyHQ/aixyz/issues"
16
- },
12
+ "bugs": "https://github.com/AgentlyHQ/aixyz/issues",
17
13
  "repository": {
18
14
  "type": "git",
19
15
  "url": "git+https://github.com/AgentlyHQ/aixyz.git"
@@ -30,7 +26,7 @@
30
26
  "bin.ts"
31
27
  ],
32
28
  "dependencies": {
33
- "@aixyz/config": "workspace:*",
29
+ "@aixyz/config": "0.4.2",
34
30
  "@next/env": "^16.1.6",
35
31
  "boxen": "^8.0.0",
36
32
  "chalk": "^5.0.0",