@aigne/cli 1.30.3 → 1.30.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.30.4](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.30.3...cli-v1.30.4) (2025-08-06)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **cli:** improve help display and command handling ([#319](https://github.com/AIGNE-io/aigne-framework/issues/319)) ([306ca5f](https://github.com/AIGNE-io/aigne-framework/commit/306ca5f251d6de356131b11909293be3904d0675))
9
+ * create connect add app info ([#321](https://github.com/AIGNE-io/aigne-framework/issues/321)) ([f0094a3](https://github.com/AIGNE-io/aigne-framework/commit/f0094a3f891617a9822df90918445639cd8c1a90))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * The following workspace dependencies were updated
15
+ * dependencies
16
+ * @aigne/agent-library bumped to 1.21.13
17
+ * @aigne/agentic-memory bumped to 1.0.13
18
+ * @aigne/aigne-hub bumped to 0.4.4
19
+ * @aigne/openai bumped to 0.10.13
20
+ * @aigne/core bumped to 1.45.0
21
+ * @aigne/default-memory bumped to 1.0.13
22
+
3
23
  ## [1.30.3](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.30.2...cli-v1.30.3) (2025-08-05)
4
24
 
5
25
 
package/dist/cli.js CHANGED
@@ -17,7 +17,13 @@ function getAIGNEFilePath() {
17
17
  }
18
18
  const aigneFilePath = getAIGNEFilePath();
19
19
  export default createAIGNECommand({ aigneFilePath })
20
- .fail(() => { })
20
+ .fail((message, error, yargs) => {
21
+ // We catch all errors below, here just print the help message non-error case like demandCommand
22
+ if (!error) {
23
+ yargs.showHelp();
24
+ console.error(`\n${message}`);
25
+ }
26
+ })
21
27
  .parseAsync(hideBin([...process.argv.slice(0, 2), ...process.argv.slice(aigneFilePath ? 3 : 2)]))
22
28
  .catch((error) => {
23
29
  console.log(""); // Add an empty line for better readability
@@ -11,7 +11,7 @@ import { createServeMCPCommand } from "./serve-mcp.js";
11
11
  import { createTestCommand } from "./test.js";
12
12
  export function createAIGNECommand(options) {
13
13
  console.log(asciiLogo);
14
- console.log(`${chalk.grey("TIPS:")} use ${chalk.greenBright("aigne observe")} to start the observability server.\n`);
14
+ console.log(`${chalk.grey("TIPS:")} run ${chalk.blue("aigne observe")} to start the observability server.\n`);
15
15
  return yargs()
16
16
  .scriptName("aigne")
17
17
  .usage("CLI for AIGNE framework")
@@ -23,6 +23,7 @@ export function createAIGNECommand(options) {
23
23
  .command(createObservabilityCommand())
24
24
  .command(createConnectCommand())
25
25
  .command(createAppCommands())
26
+ .demandCommand()
26
27
  .alias("help", "h")
27
28
  .alias("version", "v")
28
29
  .strict();
@@ -40,7 +40,7 @@ export function createAppCommands() {
40
40
  for (const agent of aigne.cli?.agents ?? []) {
41
41
  yargs.command(agentCommandModule({ dir, agent }));
42
42
  }
43
- yargs.version(`${app.name} v${version}`);
43
+ yargs.version(`${app.name} v${version}`).alias("version", "v");
44
44
  return yargs.demandCommand();
45
45
  },
46
46
  handler: () => { },
@@ -77,7 +77,7 @@ const upgradeCommandModule = ({ name, dir, isLatest, version, }) => ({
77
77
  if (!isLatest) {
78
78
  const result = await loadApplication({ name, dir, forceUpgrade: true });
79
79
  if (version !== result.version) {
80
- console.log(`\n✅ Upgraded ${name} to version ${version}`);
80
+ console.log(`\n✅ Upgraded ${name} to version ${result.version}`);
81
81
  return;
82
82
  }
83
83
  }
@@ -30,6 +30,8 @@ interface CreateConnectOptions {
30
30
  retry?: number;
31
31
  source?: string;
32
32
  connectAction?: string;
33
+ appName?: string;
34
+ appLogo?: string;
33
35
  wrapSpinner?: typeof baseWrapSpinner;
34
36
  prettyUrl?: (url: string) => string;
35
37
  closeOnSuccess?: boolean;
@@ -39,7 +41,7 @@ interface CreateConnectOptions {
39
41
  fetchTimeout: number;
40
42
  }) => Promise<FetchResult>;
41
43
  }
42
- export declare function createConnect({ connectUrl, openPage, fetchInterval, retry, source, connectAction, wrapSpinner, closeOnSuccess, intervalFetchConfig, }: CreateConnectOptions): Promise<FetchResult>;
44
+ export declare function createConnect({ connectUrl, openPage, fetchInterval, retry, source, connectAction, wrapSpinner, closeOnSuccess, intervalFetchConfig, appName, appLogo, }: CreateConnectOptions): Promise<FetchResult>;
43
45
  export declare const formatModelName: (models: ReturnType<typeof availableModels>, model: string, inquirerPrompt: typeof inquirer.prompt) => Promise<string>;
44
46
  export declare function connectToAIGNEHub(url: string): Promise<{
45
47
  accessKey: string;
@@ -60,7 +60,7 @@ export const fetchConfigs = async ({ connectUrl, sessionId, fetchInterval, fetch
60
60
  function baseWrapSpinner(_, waiting) {
61
61
  return Promise.resolve(waiting());
62
62
  }
63
- export async function createConnect({ connectUrl, openPage, fetchInterval = 3 * 1000, retry = 1500, source = "Blocklet CLI", connectAction = "connect-cli", wrapSpinner = baseWrapSpinner, closeOnSuccess, intervalFetchConfig, }) {
63
+ export async function createConnect({ connectUrl, openPage, fetchInterval = 3 * 1000, retry = 1500, source = "Blocklet CLI", connectAction = "connect-cli", wrapSpinner = baseWrapSpinner, closeOnSuccess, intervalFetchConfig, appName = "AIGNE CLI", appLogo = "https://www.aigne.io/favicon.ico?imageFilter=resize&w=32", }) {
64
64
  try {
65
65
  const startSessionURL = joinURL(connectUrl, ACCESS_KEY_SESSION_API);
66
66
  const { data: session } = await request({ url: startSessionURL, method: "POST" });
@@ -70,8 +70,8 @@ export async function createConnect({ connectUrl, openPage, fetchInterval = 3 *
70
70
  source,
71
71
  closeOnSuccess,
72
72
  cli: true,
73
- appName: " AIGNE CLI",
74
- appLogo: "https://www.aigne.io/favicon.ico?imageFilter=resize&w=32",
73
+ appName: ` ${appName}`,
74
+ appLogo,
75
75
  });
76
76
  openPage?.(pageUrl);
77
77
  return await wrapSpinner(`Waiting for connection: ${connectUrl}`, async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/cli",
3
- "version": "1.30.3",
3
+ "version": "1.30.4",
4
4
  "description": "Command-line interface for AIGNE Framework - A functional AI application development framework for building scalable AI-powered applications with workflow patterns, MCP protocol integration, and multi-model support",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -73,13 +73,13 @@
73
73
  "yaml": "^2.8.0",
74
74
  "yargs": "^18.0.0",
75
75
  "zod": "^3.25.67",
76
- "@aigne/agent-library": "^1.21.12",
77
- "@aigne/aigne-hub": "^0.4.3",
78
- "@aigne/core": "^1.44.0",
79
- "@aigne/default-memory": "^1.0.12",
80
- "@aigne/observability-api": "^0.9.0",
81
- "@aigne/agentic-memory": "^1.0.12",
82
- "@aigne/openai": "^0.10.12"
76
+ "@aigne/agent-library": "^1.21.13",
77
+ "@aigne/aigne-hub": "^0.4.4",
78
+ "@aigne/agentic-memory": "^1.0.13",
79
+ "@aigne/openai": "^0.10.13",
80
+ "@aigne/core": "^1.45.0",
81
+ "@aigne/default-memory": "^1.0.13",
82
+ "@aigne/observability-api": "^0.9.0"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@types/archiver": "^6.0.3",