@aigne/cli 1.26.1-0 → 1.27.0
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 +20 -0
- package/LICENSE.md +93 -0
- package/dist/bunwrapper.js +0 -0
- package/dist/cli.js +1 -2
- package/dist/commands/aigne.d.ts +2 -2
- package/dist/commands/aigne.js +12 -17
- package/dist/commands/connect.d.ts +2 -6
- package/dist/commands/connect.js +28 -33
- package/dist/commands/create.d.ts +2 -6
- package/dist/commands/create.js +58 -62
- package/dist/commands/observe.d.ts +2 -7
- package/dist/commands/observe.js +13 -22
- package/dist/commands/run.d.ts +3 -6
- package/dist/commands/run.js +81 -96
- package/dist/commands/serve-mcp.d.ts +3 -10
- package/dist/commands/serve-mcp.js +23 -41
- package/dist/commands/test.d.ts +3 -7
- package/dist/commands/test.js +14 -20
- package/dist/utils/aigne-hub-user.d.ts +16 -0
- package/dist/utils/aigne-hub-user.js +12 -0
- package/dist/utils/download.d.ts +1 -3
- package/dist/utils/download.js +2 -2
- package/dist/utils/run-with-aigne.d.ts +2 -26
- package/dist/utils/run-with-aigne.js +56 -79
- package/package.json +29 -32
- package/dist/commands/app.d.ts +0 -2
- package/dist/commands/app.js +0 -98
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.27.0](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.26.0...cli-v1.27.0) (2025-07-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* support aigne connect command and add test ([#283](https://github.com/AIGNE-io/aigne-framework/issues/283)) ([387d22d](https://github.com/AIGNE-io/aigne-framework/commit/387d22d5cacf20abe02a13deaca1f36987d48ba5))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **cli:** replace external dependency with built-in user subscription API ([#292](https://github.com/AIGNE-io/aigne-framework/issues/292)) ([67de7fa](https://github.com/AIGNE-io/aigne-framework/commit/67de7fa521626ee7266c6c527e4eafc227bafa48))
|
|
14
|
+
* support aigne connect status more info ([#290](https://github.com/AIGNE-io/aigne-framework/issues/290)) ([04c5a06](https://github.com/AIGNE-io/aigne-framework/commit/04c5a0625938a7c1ca1d6fd997f6e9047d425ea0))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Dependencies
|
|
18
|
+
|
|
19
|
+
* The following workspace dependencies were updated
|
|
20
|
+
* dependencies
|
|
21
|
+
* @aigne/aigne-hub bumped to 0.3.0
|
|
22
|
+
|
|
3
23
|
## [1.26.0](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.25.1...cli-v1.26.0) (2025-07-28)
|
|
4
24
|
|
|
5
25
|
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Elastic License 2.0
|
|
2
|
+
|
|
3
|
+
URL: https://www.elastic.co/licensing/elastic-license
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
8
|
+
|
|
9
|
+
## Copyright License
|
|
10
|
+
|
|
11
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide,
|
|
12
|
+
non-sublicensable, non-transferable license to use, copy, distribute, make
|
|
13
|
+
available, and prepare derivative works of the software, in each case subject to
|
|
14
|
+
the limitations and conditions below.
|
|
15
|
+
|
|
16
|
+
## Limitations
|
|
17
|
+
|
|
18
|
+
You may not provide the software to third parties as a hosted or managed
|
|
19
|
+
service, where the service provides users with access to any substantial set of
|
|
20
|
+
the features or functionality of the software.
|
|
21
|
+
|
|
22
|
+
You may not move, change, disable, or circumvent the license key functionality
|
|
23
|
+
in the software, and you may not remove or obscure any functionality in the
|
|
24
|
+
software that is protected by the license key.
|
|
25
|
+
|
|
26
|
+
You may not alter, remove, or obscure any licensing, copyright, or other notices
|
|
27
|
+
of the licensor in the software. Any use of the licensor’s trademarks is subject
|
|
28
|
+
to applicable law.
|
|
29
|
+
|
|
30
|
+
## Patents
|
|
31
|
+
|
|
32
|
+
The licensor grants you a license, under any patent claims the licensor can
|
|
33
|
+
license, or becomes able to license, to make, have made, use, sell, offer for
|
|
34
|
+
sale, import and have imported the software, in each case subject to the
|
|
35
|
+
limitations and conditions in this license. This license does not cover any
|
|
36
|
+
patent claims that you cause to be infringed by modifications or additions to
|
|
37
|
+
the software. If you or your company make any written claim that the software
|
|
38
|
+
infringes or contributes to infringement of any patent, your patent license for
|
|
39
|
+
the software granted under these terms ends immediately. If your company makes
|
|
40
|
+
such a claim, your patent license ends immediately for work on behalf of your
|
|
41
|
+
company.
|
|
42
|
+
|
|
43
|
+
## Notices
|
|
44
|
+
|
|
45
|
+
You must ensure that anyone who gets a copy of any part of the software from you
|
|
46
|
+
also gets a copy of these terms.
|
|
47
|
+
|
|
48
|
+
If you modify the software, you must include in any modified copies of the
|
|
49
|
+
software prominent notices stating that you have modified the software.
|
|
50
|
+
|
|
51
|
+
## No Other Rights
|
|
52
|
+
|
|
53
|
+
These terms do not imply any licenses other than those expressly granted in
|
|
54
|
+
these terms.
|
|
55
|
+
|
|
56
|
+
## Termination
|
|
57
|
+
|
|
58
|
+
If you use the software in violation of these terms, such use is not licensed,
|
|
59
|
+
and your licenses will automatically terminate. If the licensor provides you
|
|
60
|
+
with a notice of your violation, and you cease all violation of this license no
|
|
61
|
+
later than 30 days after you receive that notice, your licenses will be
|
|
62
|
+
reinstated retroactively. However, if you violate these terms after such
|
|
63
|
+
reinstatement, any additional violation of these terms will cause your licenses
|
|
64
|
+
to terminate automatically and permanently.
|
|
65
|
+
|
|
66
|
+
## No Liability
|
|
67
|
+
|
|
68
|
+
*As far as the law allows, the software comes as is, without any warranty or
|
|
69
|
+
condition, and the licensor will not be liable to you for any damages arising
|
|
70
|
+
out of these terms or the use or nature of the software, under any kind of
|
|
71
|
+
legal claim.*
|
|
72
|
+
|
|
73
|
+
## Definitions
|
|
74
|
+
|
|
75
|
+
The **licensor** is the entity offering these terms, and the **software** is the
|
|
76
|
+
software the licensor makes available under these terms, including any portion
|
|
77
|
+
of it.
|
|
78
|
+
|
|
79
|
+
**you** refers to the individual or entity agreeing to these terms.
|
|
80
|
+
|
|
81
|
+
**your company** is any legal entity, sole proprietorship, or other kind of
|
|
82
|
+
organization that you work for, plus all organizations that have control over,
|
|
83
|
+
are under the control of, or are under common control with that
|
|
84
|
+
organization. **control** means ownership of substantially all the assets of an
|
|
85
|
+
entity, or the power to direct its management and policies by vote, contract, or
|
|
86
|
+
otherwise. Control can be direct or indirect.
|
|
87
|
+
|
|
88
|
+
**your licenses** are all the licenses granted to you for the software under
|
|
89
|
+
these terms.
|
|
90
|
+
|
|
91
|
+
**use** means anything you do with the software requiring one of your licenses.
|
|
92
|
+
|
|
93
|
+
**trademark** means trademarks, service marks, and similar rights.
|
package/dist/bunwrapper.js
CHANGED
|
File without changes
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { existsSync, realpathSync, statSync } from "node:fs";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import { config } from "dotenv-flow";
|
|
5
|
-
import { hideBin } from "yargs/helpers";
|
|
6
5
|
import { createAIGNECommand } from "./commands/aigne.js";
|
|
7
6
|
config({ silent: true });
|
|
8
7
|
function getAIGNEFilePath() {
|
|
@@ -17,7 +16,7 @@ function getAIGNEFilePath() {
|
|
|
17
16
|
}
|
|
18
17
|
const aigneFilePath = getAIGNEFilePath();
|
|
19
18
|
createAIGNECommand({ aigneFilePath })
|
|
20
|
-
.parseAsync(
|
|
19
|
+
.parseAsync(["", "", ...process.argv.slice(aigneFilePath ? 3 : 2)])
|
|
21
20
|
.catch((error) => {
|
|
22
21
|
console.log(""); // Add an empty line for better readability
|
|
23
22
|
console.error(`${chalk.red("Error:")} ${error.message}`);
|
package/dist/commands/aigne.d.ts
CHANGED
package/dist/commands/aigne.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Command } from "commander";
|
|
2
2
|
import { AIGNE_CLI_VERSION } from "../constants.js";
|
|
3
3
|
import { asciiLogo } from "../utils/ascii-logo.js";
|
|
4
|
-
import { createAppCommands } from "./app.js";
|
|
5
4
|
import { createConnectCommand } from "./connect.js";
|
|
6
5
|
import { createCreateCommand } from "./create.js";
|
|
7
6
|
import { createObservabilityCommand } from "./observe.js";
|
|
@@ -10,20 +9,16 @@ import { createServeMCPCommand } from "./serve-mcp.js";
|
|
|
10
9
|
import { createTestCommand } from "./test.js";
|
|
11
10
|
export function createAIGNECommand(options) {
|
|
12
11
|
console.log(asciiLogo);
|
|
13
|
-
return
|
|
14
|
-
.
|
|
15
|
-
.
|
|
12
|
+
return new Command()
|
|
13
|
+
.name("aigne")
|
|
14
|
+
.description("CLI for AIGNE framework")
|
|
16
15
|
.version(AIGNE_CLI_VERSION)
|
|
17
|
-
.
|
|
18
|
-
.
|
|
19
|
-
.
|
|
20
|
-
.
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.alias("help", "h")
|
|
26
|
-
.alias("version", "v")
|
|
27
|
-
.showHelpOnFail(true)
|
|
28
|
-
.strict();
|
|
16
|
+
.addCommand(createRunCommand(options), { isDefault: true })
|
|
17
|
+
.addCommand(createTestCommand(options))
|
|
18
|
+
.addCommand(createCreateCommand())
|
|
19
|
+
.addCommand(createServeMCPCommand(options))
|
|
20
|
+
.addCommand(createObservabilityCommand())
|
|
21
|
+
.addCommand(createConnectCommand())
|
|
22
|
+
.showHelpAfterError(true)
|
|
23
|
+
.showSuggestionAfterError(true);
|
|
29
24
|
}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
url?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function createConnectCommand(): CommandModule<{}, ConnectOptions>;
|
|
6
|
-
export {};
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
export declare function createConnectCommand(): Command;
|
package/dist/commands/connect.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
|
-
import { getUserInfo } from "@blocklet/aigne-hub/api/user";
|
|
4
3
|
import chalk from "chalk";
|
|
4
|
+
import { Command } from "commander";
|
|
5
5
|
import { parse } from "yaml";
|
|
6
|
+
import { getUserInfo } from "../utils/aigne-hub-user.js";
|
|
6
7
|
import { AIGNE_ENV_FILE, connectToAIGNEHub } from "../utils/load-aigne.js";
|
|
7
8
|
async function getConnectionStatus() {
|
|
8
9
|
if (!existsSync(AIGNE_ENV_FILE)) {
|
|
@@ -56,36 +57,30 @@ async function displayStatus(statusList) {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
export function createConnectCommand() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
console.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
catch (error) {
|
|
86
|
-
console.error(chalk.red("✗ Failed to connect to AIGNE Hub:"), error.message);
|
|
87
|
-
process.exit(1);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
};
|
|
60
|
+
const connectCommand = new Command("connect")
|
|
61
|
+
.description("Manage AIGNE Hub connections")
|
|
62
|
+
.showHelpAfterError(true)
|
|
63
|
+
.showSuggestionAfterError(true);
|
|
64
|
+
connectCommand
|
|
65
|
+
.command("status")
|
|
66
|
+
.description("Show current connection status")
|
|
67
|
+
.action(async () => {
|
|
68
|
+
const statusList = await getConnectionStatus();
|
|
69
|
+
await displayStatus(statusList);
|
|
70
|
+
});
|
|
71
|
+
connectCommand
|
|
72
|
+
.option("--url <url>", "URL to the AIGNE Hub server")
|
|
73
|
+
.action(async (options) => {
|
|
74
|
+
const url = options.url || "https://hub.aigne.io/";
|
|
75
|
+
console.log(chalk.blue(`Connecting to AIGNE Hub: ${url}`));
|
|
76
|
+
try {
|
|
77
|
+
await connectToAIGNEHub(url);
|
|
78
|
+
console.log(chalk.green("✓ Successfully connected to AIGNE Hub"));
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
console.error(chalk.red("✗ Failed to connect to AIGNE Hub:"), error.message);
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
return connectCommand;
|
|
91
86
|
}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
path: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function createCreateCommand(): CommandModule<{}, CreateOptions>;
|
|
6
|
-
export {};
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
export declare function createCreateCommand(): Command;
|
package/dist/commands/create.js
CHANGED
|
@@ -1,73 +1,69 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readdirSync } from "node:fs";
|
|
2
2
|
import { cp } from "node:fs/promises";
|
|
3
3
|
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
4
|
+
import { Command } from "commander";
|
|
4
5
|
import inquirer from "inquirer";
|
|
5
6
|
export function createCreateCommand() {
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
message: "Project name:",
|
|
23
|
-
default: path !== "." ? path : "my-aigne-project",
|
|
24
|
-
validate: (input) => {
|
|
25
|
-
if (input.trim() === "")
|
|
26
|
-
return "Project name cannot be empty.";
|
|
27
|
-
return true;
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
]);
|
|
31
|
-
path = answers.projectName;
|
|
32
|
-
}
|
|
33
|
-
path = isAbsolute(path) ? path : resolve(process.cwd(), path);
|
|
34
|
-
const isPathNotEmpty = existsSync(path) && readdirSync(path).length > 0;
|
|
35
|
-
if (isPathNotEmpty) {
|
|
36
|
-
const answers = await inquirer.prompt([
|
|
37
|
-
{
|
|
38
|
-
type: "confirm",
|
|
39
|
-
name: "overwrite",
|
|
40
|
-
message: `The directory "${path}" is not empty. Do you want to remove its contents?`,
|
|
41
|
-
default: false,
|
|
7
|
+
return new Command("create")
|
|
8
|
+
.description("Create a new aigne project with agent config files")
|
|
9
|
+
.argument("[path]", "Path to create the project directory", ".")
|
|
10
|
+
.action(async (_path) => {
|
|
11
|
+
let path = _path;
|
|
12
|
+
if (path === ".") {
|
|
13
|
+
const answers = await inquirer.prompt([
|
|
14
|
+
{
|
|
15
|
+
type: "input",
|
|
16
|
+
name: "projectName",
|
|
17
|
+
message: "Project name:",
|
|
18
|
+
default: _path !== "." ? _path : "my-aigne-project",
|
|
19
|
+
validate: (input) => {
|
|
20
|
+
if (input.trim() === "")
|
|
21
|
+
return "Project name cannot be empty.";
|
|
22
|
+
return true;
|
|
42
23
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
24
|
+
},
|
|
25
|
+
]);
|
|
26
|
+
path = answers.projectName;
|
|
27
|
+
}
|
|
28
|
+
path = isAbsolute(path) ? path : resolve(process.cwd(), path);
|
|
29
|
+
const isPathNotEmpty = existsSync(path) && readdirSync(path).length > 0;
|
|
30
|
+
if (isPathNotEmpty) {
|
|
31
|
+
const answers = await inquirer.prompt([
|
|
51
32
|
{
|
|
52
|
-
type: "
|
|
53
|
-
name: "
|
|
54
|
-
message: "
|
|
55
|
-
|
|
56
|
-
default: "default",
|
|
33
|
+
type: "confirm",
|
|
34
|
+
name: "overwrite",
|
|
35
|
+
message: `The directory "${path}" is not empty. Do you want to remove its contents?`,
|
|
36
|
+
default: false,
|
|
57
37
|
},
|
|
58
38
|
]);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
throw new Error(`Template "${template}" not found.`);
|
|
63
|
-
const files = readdirSync(templatePath);
|
|
64
|
-
for (const file of files) {
|
|
65
|
-
const source = join(templatePath, file);
|
|
66
|
-
const destination = join(path, file);
|
|
67
|
-
await cp(source, destination, { recursive: true, force: true });
|
|
39
|
+
if (!answers.overwrite) {
|
|
40
|
+
console.log("Operation cancelled.");
|
|
41
|
+
process.exit(0);
|
|
68
42
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
43
|
+
}
|
|
44
|
+
const templates = [{ name: "default" }];
|
|
45
|
+
const { template } = await inquirer.prompt([
|
|
46
|
+
{
|
|
47
|
+
type: "list",
|
|
48
|
+
name: "template",
|
|
49
|
+
message: "Select a template:",
|
|
50
|
+
choices: templates.map((t) => t.name),
|
|
51
|
+
default: "default",
|
|
52
|
+
},
|
|
53
|
+
]);
|
|
54
|
+
mkdirSync(path, { recursive: true });
|
|
55
|
+
const templatePath = join(import.meta.dirname, "../../templates", template);
|
|
56
|
+
if (!existsSync(templatePath))
|
|
57
|
+
throw new Error(`Template "${template}" not found.`);
|
|
58
|
+
const files = readdirSync(templatePath);
|
|
59
|
+
for (const file of files) {
|
|
60
|
+
const source = join(templatePath, file);
|
|
61
|
+
const destination = join(path, file);
|
|
62
|
+
await cp(source, destination, { recursive: true, force: true });
|
|
63
|
+
}
|
|
64
|
+
console.log("\n✅ AIGNE project created successfully!");
|
|
65
|
+
console.log(`\nTo use your new agent, run:\n cd ${relative(process.cwd(), path)} && aigne run`);
|
|
66
|
+
})
|
|
67
|
+
.showHelpAfterError(true)
|
|
68
|
+
.showSuggestionAfterError(true);
|
|
73
69
|
}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
host: string;
|
|
4
|
-
port?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function createObservabilityCommand(): CommandModule<{}, ServeMCPOptions>;
|
|
7
|
-
export {};
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
export declare function createObservabilityCommand(): Command;
|
package/dist/commands/observe.js
CHANGED
|
@@ -2,6 +2,7 @@ import { tryOrThrow } from "@aigne/core/utils/type-utils.js";
|
|
|
2
2
|
import { startObservabilityCLIServer } from "@aigne/observability-api/cli";
|
|
3
3
|
import getObservabilityDbPath from "@aigne/observability-api/db-path";
|
|
4
4
|
import chalk from "chalk";
|
|
5
|
+
import { Command } from "commander";
|
|
5
6
|
import detectPort from "detect-port";
|
|
6
7
|
const DEFAULT_PORT = () => tryOrThrow(() => {
|
|
7
8
|
const { PORT } = process.env;
|
|
@@ -13,26 +14,16 @@ const DEFAULT_PORT = () => tryOrThrow(() => {
|
|
|
13
14
|
return port;
|
|
14
15
|
}, (error) => new Error(`parse PORT error ${error.message}`));
|
|
15
16
|
export function createObservabilityCommand() {
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
describe: "Port to run the observability server on",
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
handler: async (options) => {
|
|
32
|
-
const port = await detectPort(options.port || DEFAULT_PORT());
|
|
33
|
-
const dbUrl = getObservabilityDbPath();
|
|
34
|
-
console.log("Observability database path:", chalk.greenBright(dbUrl));
|
|
35
|
-
await startObservabilityCLIServer({ port, dbUrl });
|
|
36
|
-
},
|
|
37
|
-
};
|
|
17
|
+
return new Command("observe")
|
|
18
|
+
.description("Start the observability server")
|
|
19
|
+
.option("--host <host>", "Host to run the observability server on, use 0.0.0.0 to publicly expose the server", "localhost")
|
|
20
|
+
.option("--port <port>", "Port to run the observability server on", (s) => Number.parseInt(s))
|
|
21
|
+
.action(async (options) => {
|
|
22
|
+
const port = await detectPort(options.port || DEFAULT_PORT());
|
|
23
|
+
const dbUrl = getObservabilityDbPath();
|
|
24
|
+
console.log("Observability database path:", chalk.greenBright(dbUrl));
|
|
25
|
+
await startObservabilityCLIServer({ port, dbUrl });
|
|
26
|
+
})
|
|
27
|
+
.showHelpAfterError(true)
|
|
28
|
+
.showSuggestionAfterError(true);
|
|
38
29
|
}
|
package/dist/commands/run.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function createRunCommand({ aigneFilePath
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export declare function createRunCommand({ aigneFilePath }?: {
|
|
3
3
|
aigneFilePath?: string;
|
|
4
|
-
}):
|
|
5
|
-
export declare function getLocalPackagePathFromUrl(url: string, { subdir }?: {
|
|
6
|
-
subdir?: string;
|
|
7
|
-
}): string;
|
|
4
|
+
}): Command;
|