@companyhelm/cli 0.4.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/dist/cli_io_interface.d.ts +10 -0
- package/dist/cli_io_interface.js +2 -0
- package/dist/cli_io_interface.js.map +1 -0
- package/dist/companyhelm_cli.d.ts +20 -0
- package/dist/companyhelm_cli.js +73 -0
- package/dist/companyhelm_cli.js.map +1 -0
- package/dist/console_io.d.ts +9 -0
- package/dist/console_io.js +13 -0
- package/dist/console_io.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/package.json +20 -28
- package/LICENSE +0 -21
- package/README.md +0 -66
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -39
- package/dist/commands/dependencies.d.ts +0 -28
- package/dist/commands/dependencies.js +0 -292
- package/dist/commands/down.d.ts +0 -3
- package/dist/commands/down.js +0 -5
- package/dist/commands/interactive.d.ts +0 -7
- package/dist/commands/interactive.js +0 -25
- package/dist/commands/logs.d.ts +0 -3
- package/dist/commands/logs.js +0 -14
- package/dist/commands/register-commands.d.ts +0 -3
- package/dist/commands/register-commands.js +0 -23
- package/dist/commands/reset.d.ts +0 -7
- package/dist/commands/reset.js +0 -51
- package/dist/commands/set-image-version.d.ts +0 -31
- package/dist/commands/set-image-version.js +0 -87
- package/dist/commands/setup-github-app.d.ts +0 -13
- package/dist/commands/setup-github-app.js +0 -233
- package/dist/commands/startup-preferences.d.ts +0 -3
- package/dist/commands/startup-preferences.js +0 -39
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/status.js +0 -7
- package/dist/commands/up.d.ts +0 -3
- package/dist/commands/up.js +0 -39
- package/dist/core/bootstrap/DeploymentBootstrapper.d.ts +0 -15
- package/dist/core/bootstrap/DeploymentBootstrapper.js +0 -118
- package/dist/core/bootstrap/SeedSqlRenderer.d.ts +0 -12
- package/dist/core/bootstrap/SeedSqlRenderer.js +0 -44
- package/dist/core/config/ApiEnvFileWriter.d.ts +0 -8
- package/dist/core/config/ApiEnvFileWriter.js +0 -33
- package/dist/core/config/GithubAppConfig.d.ts +0 -6
- package/dist/core/config/GithubAppConfig.js +0 -26
- package/dist/core/config/GithubAppConfigStore.d.ts +0 -11
- package/dist/core/config/GithubAppConfigStore.js +0 -57
- package/dist/core/docker/ComposeTemplateRenderer.d.ts +0 -22
- package/dist/core/docker/ComposeTemplateRenderer.js +0 -66
- package/dist/core/docker/DockerStackManager.d.ts +0 -29
- package/dist/core/docker/DockerStackManager.js +0 -163
- package/dist/core/local/ApiLocalService.d.ts +0 -22
- package/dist/core/local/ApiLocalService.js +0 -65
- package/dist/core/local/LocalRepoSourceResolver.d.ts +0 -24
- package/dist/core/local/LocalRepoSourceResolver.js +0 -33
- package/dist/core/local/LocalServiceProcessManager.d.ts +0 -18
- package/dist/core/local/LocalServiceProcessManager.js +0 -83
- package/dist/core/local/WebLocalService.d.ts +0 -23
- package/dist/core/local/WebLocalService.js +0 -101
- package/dist/core/logs/LogsService.d.ts +0 -6
- package/dist/core/logs/LogsService.js +0 -14
- package/dist/core/process/CommandRunner.d.ts +0 -4
- package/dist/core/process/CommandRunner.js +0 -51
- package/dist/core/runner/RunnerSupervisor.d.ts +0 -29
- package/dist/core/runner/RunnerSupervisor.js +0 -90
- package/dist/core/runner/runner-bootstrap.d.ts +0 -2
- package/dist/core/runner/runner-bootstrap.js +0 -48
- package/dist/core/runtime/CliPackageMetadata.d.ts +0 -3
- package/dist/core/runtime/CliPackageMetadata.js +0 -8
- package/dist/core/runtime/CliRoot.d.ts +0 -2
- package/dist/core/runtime/CliRoot.js +0 -23
- package/dist/core/runtime/ImageCatalog.d.ts +0 -8
- package/dist/core/runtime/ImageCatalog.js +0 -12
- package/dist/core/runtime/LocalConfigStore.d.ts +0 -16
- package/dist/core/runtime/LocalConfigStore.js +0 -50
- package/dist/core/runtime/ManagedImages.d.ts +0 -10
- package/dist/core/runtime/ManagedImages.js +0 -27
- package/dist/core/runtime/PortAllocator.d.ts +0 -9
- package/dist/core/runtime/PortAllocator.js +0 -20
- package/dist/core/runtime/PublicImageTagRegistry.d.ts +0 -17
- package/dist/core/runtime/PublicImageTagRegistry.js +0 -168
- package/dist/core/runtime/RepoConfigStore.d.ts +0 -16
- package/dist/core/runtime/RepoConfigStore.js +0 -63
- package/dist/core/runtime/RuntimePaths.d.ts +0 -16
- package/dist/core/runtime/RuntimePaths.js +0 -43
- package/dist/core/runtime/RuntimeState.d.ts +0 -38
- package/dist/core/runtime/RuntimeState.js +0 -1
- package/dist/core/runtime/RuntimeStateStore.d.ts +0 -11
- package/dist/core/runtime/RuntimeStateStore.js +0 -81
- package/dist/core/runtime/Secrets.d.ts +0 -10
- package/dist/core/runtime/Secrets.js +0 -26
- package/dist/core/runtime/VersionCatalog.d.ts +0 -10
- package/dist/core/runtime/VersionCatalog.js +0 -21
- package/dist/core/services/ManagedServiceNames.d.ts +0 -5
- package/dist/core/services/ManagedServiceNames.js +0 -12
- package/dist/core/status/StatusService.d.ts +0 -19
- package/dist/core/status/StatusService.js +0 -30
- package/dist/core/ui/TerminalRenderer.d.ts +0 -17
- package/dist/core/ui/TerminalRenderer.js +0 -71
- package/dist/preflight/ApiPortPreflightCheck.d.ts +0 -6
- package/dist/preflight/ApiPortPreflightCheck.js +0 -10
- package/dist/preflight/DockerInstalledPreflightCheck.d.ts +0 -7
- package/dist/preflight/DockerInstalledPreflightCheck.js +0 -15
- package/dist/preflight/PortAvailabilityPreflightCheck.d.ts +0 -7
- package/dist/preflight/PortAvailabilityPreflightCheck.js +0 -31
- package/dist/preflight/PostgresPortPreflightCheck.d.ts +0 -6
- package/dist/preflight/PostgresPortPreflightCheck.js +0 -10
- package/dist/preflight/PreflightCheck.d.ts +0 -3
- package/dist/preflight/PreflightCheck.js +0 -1
- package/dist/preflight/WebPortPreflightCheck.d.ts +0 -6
- package/dist/preflight/WebPortPreflightCheck.js +0 -10
- package/dist/preflight/runStartupPreflightChecks.d.ts +0 -18
- package/dist/preflight/runStartupPreflightChecks.js +0 -42
- package/dist/templates/api.env.tpl +0 -3
- package/dist/templates/docker-compose.yaml.tpl +0 -24
- package/dist/templates/seed.sql.tpl +0 -76
- package/src/templates/api.env.tpl +0 -3
- package/src/templates/docker-compose.yaml.tpl +0 -24
- package/src/templates/seed.sql.tpl +0 -76
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Receives user-visible CLI output so command classes can be tested without
|
|
3
|
+
* coupling business behavior to process globals or a specific terminal stream.
|
|
4
|
+
*/
|
|
5
|
+
export interface CliIo {
|
|
6
|
+
/** Writes a normal output line to the CLI user. */
|
|
7
|
+
writeLine(message: string): void;
|
|
8
|
+
/** Writes an error output line to the CLI user. */
|
|
9
|
+
writeError(message: string): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli_io_interface.js","sourceRoot":"","sources":["../src/cli_io_interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import type { CliIo } from "./cli_io_interface.js";
|
|
3
|
+
/**
|
|
4
|
+
* Defines the public `companyhelm` command that npm users install. The initial
|
|
5
|
+
* command surface intentionally focuses on package discovery and local stack
|
|
6
|
+
* entry points while the server and runner implementations evolve separately.
|
|
7
|
+
*/
|
|
8
|
+
export declare class CompanyHelmCli {
|
|
9
|
+
private readonly io;
|
|
10
|
+
constructor(io?: CliIo);
|
|
11
|
+
run(argv: string[]): Promise<void>;
|
|
12
|
+
createProgram(): Command;
|
|
13
|
+
private createStatusCommand;
|
|
14
|
+
private createServerCommand;
|
|
15
|
+
private createRunnerCommand;
|
|
16
|
+
private printStatus;
|
|
17
|
+
private printServerCommand;
|
|
18
|
+
private printRunnerCommand;
|
|
19
|
+
private readVersion;
|
|
20
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { ConsoleIo } from "./console_io.js";
|
|
4
|
+
/**
|
|
5
|
+
* Defines the public `companyhelm` command that npm users install. The initial
|
|
6
|
+
* command surface intentionally focuses on package discovery and local stack
|
|
7
|
+
* entry points while the server and runner implementations evolve separately.
|
|
8
|
+
*/
|
|
9
|
+
export class CompanyHelmCli {
|
|
10
|
+
io;
|
|
11
|
+
constructor(io = new ConsoleIo()) {
|
|
12
|
+
this.io = io;
|
|
13
|
+
}
|
|
14
|
+
async run(argv) {
|
|
15
|
+
await this.createProgram().parseAsync(argv, {
|
|
16
|
+
from: "node",
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
createProgram() {
|
|
20
|
+
const program = new Command()
|
|
21
|
+
.name("companyhelm")
|
|
22
|
+
.description("CompanyHelm self-hosting CLI.")
|
|
23
|
+
.version(this.readVersion())
|
|
24
|
+
.showHelpAfterError()
|
|
25
|
+
.configureOutput({
|
|
26
|
+
writeErr: (message) => this.io.writeError(message.trimEnd()),
|
|
27
|
+
writeOut: (message) => this.io.writeLine(message.trimEnd()),
|
|
28
|
+
});
|
|
29
|
+
program.addCommand(this.createStatusCommand());
|
|
30
|
+
program.addCommand(this.createServerCommand());
|
|
31
|
+
program.addCommand(this.createRunnerCommand());
|
|
32
|
+
return program;
|
|
33
|
+
}
|
|
34
|
+
createStatusCommand() {
|
|
35
|
+
return new Command("status")
|
|
36
|
+
.description("Show the installed CompanyHelm CLI package layout.")
|
|
37
|
+
.action(() => this.printStatus());
|
|
38
|
+
}
|
|
39
|
+
createServerCommand() {
|
|
40
|
+
return new Command("server")
|
|
41
|
+
.description("Show how to work with the CompanyHelm server package.")
|
|
42
|
+
.argument("[command]", "Server command to prepare for.", "start")
|
|
43
|
+
.action((command) => this.printServerCommand(command));
|
|
44
|
+
}
|
|
45
|
+
createRunnerCommand() {
|
|
46
|
+
return new Command("runner")
|
|
47
|
+
.description("Show how to work with the CompanyHelm runner package.")
|
|
48
|
+
.argument("[command]", "Runner command to prepare for.", "start")
|
|
49
|
+
.action((command) => this.printRunnerCommand(command));
|
|
50
|
+
}
|
|
51
|
+
printStatus() {
|
|
52
|
+
this.io.writeLine("CompanyHelm CLI is installed.");
|
|
53
|
+
this.io.writeLine("Main CLI package: @companyhelm/cli");
|
|
54
|
+
this.io.writeLine("Runner package: @companyhelm/runner");
|
|
55
|
+
this.io.writeLine("Server workspace package: @companyhelm/server");
|
|
56
|
+
}
|
|
57
|
+
printServerCommand(command) {
|
|
58
|
+
this.io.writeLine(`Server command requested: ${command}`);
|
|
59
|
+
this.io.writeLine("Use npm workspace scripts in this repo with -w @companyhelm/server while the packaged server runtime is being finalized.");
|
|
60
|
+
}
|
|
61
|
+
printRunnerCommand(command) {
|
|
62
|
+
this.io.writeLine(`Runner command requested: ${command}`);
|
|
63
|
+
this.io.writeLine("Use `npm run dev:runner -- start` in this repo, or install the published `@companyhelm/runner` package and run `companyhelm-runner start`.");
|
|
64
|
+
}
|
|
65
|
+
readVersion() {
|
|
66
|
+
const packageDocument = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
67
|
+
if (typeof packageDocument.version !== "string" || packageDocument.version.length === 0) {
|
|
68
|
+
return "0.0.0";
|
|
69
|
+
}
|
|
70
|
+
return packageDocument.version;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=companyhelm_cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companyhelm_cli.js","sourceRoot":"","sources":["../src/companyhelm_cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5C;;;;GAIG;AACH,MAAM,OAAO,cAAc;IACR,EAAE,CAAQ;IAE3B,YAAY,KAAY,IAAI,SAAS,EAAE;QACrC,IAAI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AAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxF,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,OAAO,eAAe,CAAC,OAAO,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CliIo } from "./cli_io_interface.js";
|
|
2
|
+
/**
|
|
3
|
+
* Bridges the CLI output interface to the process streams used by npm-created
|
|
4
|
+
* binaries while keeping command handlers independent from global console APIs.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ConsoleIo implements CliIo {
|
|
7
|
+
writeLine(message: string): void;
|
|
8
|
+
writeError(message: string): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridges the CLI output interface to the process streams used by npm-created
|
|
3
|
+
* binaries while keeping command handlers independent from global console APIs.
|
|
4
|
+
*/
|
|
5
|
+
export class ConsoleIo {
|
|
6
|
+
writeLine(message) {
|
|
7
|
+
process.stdout.write(`${message}\n`);
|
|
8
|
+
}
|
|
9
|
+
writeError(message) {
|
|
10
|
+
process.stderr.write(`${message}\n`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=console_io.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console_io.js","sourceRoot":"","sources":["../src/console_io.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,OAAO,SAAS;IACpB,SAAS,CAAC,OAAe;QACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,UAAU,CAAC,OAAe;QACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;IACvC,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,IAAI,cAAc,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,44 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@companyhelm/cli",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"private": false,
|
|
7
|
-
"type": "module",
|
|
3
|
+
"version": "0.4.2",
|
|
4
|
+
"description": "CompanyHelm self-hosting command-line interface.",
|
|
8
5
|
"repository": {
|
|
9
6
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/CompanyHelm/companyhelm"
|
|
11
|
-
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">=24"
|
|
7
|
+
"url": "git+https://github.com/CompanyHelm/companyhelm.git",
|
|
8
|
+
"directory": "packages/cli"
|
|
14
9
|
},
|
|
10
|
+
"type": "module",
|
|
15
11
|
"bin": {
|
|
16
|
-
"companyhelm": "dist/
|
|
12
|
+
"companyhelm": "dist/index.js"
|
|
17
13
|
},
|
|
18
14
|
"files": [
|
|
19
|
-
"dist"
|
|
20
|
-
"src/templates"
|
|
15
|
+
"dist"
|
|
21
16
|
],
|
|
22
17
|
"scripts": {
|
|
23
|
-
"build": "tsc -p tsconfig.json
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
18
|
+
"build": "tsc -p tsconfig.json",
|
|
19
|
+
"dev": "tsx src/index.ts",
|
|
20
|
+
"lint": "eslint src tests",
|
|
21
|
+
"prepack": "npm run build",
|
|
22
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
23
|
+
"check": "npm run lint && npm run typecheck",
|
|
24
|
+
"test": "npm run check && node --import tsx --test tests/*.test.ts"
|
|
27
25
|
},
|
|
28
26
|
"dependencies": {
|
|
29
|
-
"
|
|
30
|
-
"@companyhelm/runner": "^0.2.0",
|
|
31
|
-
"chalk": "^5.6.2",
|
|
32
|
-
"commander": "^14.0.1",
|
|
33
|
-
"dockerode": "^4.0.9",
|
|
34
|
-
"figlet": "^1.9.4",
|
|
35
|
-
"yaml": "^2.8.1"
|
|
27
|
+
"commander": "^14.0.3"
|
|
36
28
|
},
|
|
37
29
|
"devDependencies": {
|
|
38
|
-
"@types/
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
30
|
+
"@types/node": "^20.19.41",
|
|
31
|
+
"typescript": "^5.9.3"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=20.20.0"
|
|
43
35
|
}
|
|
44
36
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 CompanyHelm
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# CompanyHelm - Distributed AI Agent Orchestration
|
|
2
|
-
|
|
3
|
-
<a href="https://discord.gg/YueY3dQM9Q"><img src="https://img.shields.io/discord/1456350064065904867?label=Discord&logo=discord&logoColor=white&color=5865F2&style=for-the-badge" alt="Discord"></a>
|
|
4
|
-
|
|
5
|
-
CompanyHelm is an open-source control plane for running AI-agent companies in your own infrastructure.
|
|
6
|
-
It gives teams a way to organize agents by role, keep humans in the loop for approvals and clarification, and run agent workloads in isolated environments instead of opaque hosted black boxes. Each agent can run its own app infrastructure for testing and create PRs autonomously. Spin up container-isolated agent threads with a click.
|
|
7
|
-
|
|
8
|
-
[Website](https://www.companyhelm.com/) · [Discord](https://discord.gg/YueY3dQM9Q)
|
|
9
|
-
|
|
10
|
-
<img width="1843" height="973" alt="Task management" src="https://github.com/user-attachments/assets/c0faa139-06ed-4299-a76f-63c186204038" />
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Quick start
|
|
14
|
-
|
|
15
|
-
Dependecies:
|
|
16
|
-
- Docker
|
|
17
|
-
- Node.js `>=24`
|
|
18
|
-
- Codex subscription or api key
|
|
19
|
-
- Github account
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npx @companyhelm/cli up
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
After startup, the CLI prints:
|
|
26
|
-
|
|
27
|
-
- the local dashboard UI URL
|
|
28
|
-
- the generated username and password
|
|
29
|
-
|
|
30
|
-
## What CompanyHelm is
|
|
31
|
-
|
|
32
|
-
From the product perspective, CompanyHelm is built around a few core ideas:
|
|
33
|
-
|
|
34
|
-
- Your infrastructure, not a vendor-controlled runtime
|
|
35
|
-
- Model-agnostic agent execution through open runners and protocols
|
|
36
|
-
- Easy agent customization: add skills, MCP servers, and custom instructions to agents from the UI
|
|
37
|
-
- Human-in-the-loop workflows: tasks can be steered at any moment through the built-in chat; approvals and questions are still a work in progress
|
|
38
|
-
- Isolated execution so agents can work in parallel with minimal interference. Each runner can spin up the full app infrastructure within Docker and test in isolation
|
|
39
|
-
- YOLO mode by default: agents run commands without pausing for trivial confirmations
|
|
40
|
-
- Remote repository as the source of truth: agents clone the repo and submit PRs automatically
|
|
41
|
-
- Parallel task execution: multiple agents can execute tasks independently in isolated environments
|
|
42
|
-
|
|
43
|
-
## What the CLI boots locally
|
|
44
|
-
|
|
45
|
-
`npx @companyhelm/cli up` brings up a local CompanyHelm stack with:
|
|
46
|
-
|
|
47
|
-
- CompanyHelm API
|
|
48
|
-
- Postgres
|
|
49
|
-
- CompanyHelm frontend
|
|
50
|
-
- CompanyHelm agent runner
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## Command reference
|
|
54
|
-
|
|
55
|
-
For the full CLI help:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npx @companyhelm/cli --help
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Common commands:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
npx @companyhelm/cli logs {service]
|
|
65
|
-
npx @companyhelm/cli reset
|
|
66
|
-
```
|
package/dist/cli.d.ts
DELETED
package/dist/cli.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { realpathSync } from "node:fs";
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
-
import { buildProgram } from "./commands/register-commands.js";
|
|
5
|
-
import { InteractiveCommandCancelledError } from "./commands/interactive.js";
|
|
6
|
-
import { CliPackageMetadata } from "./core/runtime/CliPackageMetadata.js";
|
|
7
|
-
function shouldPrintVersion(argv = process.argv) {
|
|
8
|
-
const args = argv.slice(2);
|
|
9
|
-
return args.length === 1 && (args[0] === "--version" || args[0] === "-V");
|
|
10
|
-
}
|
|
11
|
-
export async function main(argv = process.argv) {
|
|
12
|
-
if (shouldPrintVersion(argv)) {
|
|
13
|
-
process.stdout.write(`${new CliPackageMetadata().version()}\n`);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const program = buildProgram();
|
|
17
|
-
try {
|
|
18
|
-
await program.parseAsync(argv);
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
if (error instanceof InteractiveCommandCancelledError) {
|
|
22
|
-
process.exitCode = 1;
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
26
|
-
process.stderr.write(`${message}\n`);
|
|
27
|
-
process.exitCode = 1;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function isCliEntrypoint(argv = process.argv) {
|
|
31
|
-
const entrypointPath = argv[1];
|
|
32
|
-
if (!entrypointPath) {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
return pathToFileURL(realpathSync(entrypointPath)).href === import.meta.url;
|
|
36
|
-
}
|
|
37
|
-
if (isCliEntrypoint()) {
|
|
38
|
-
void main();
|
|
39
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type RuntimeVersions } from "../core/runtime/VersionCatalog.js";
|
|
2
|
-
import { type StatusSnapshot } from "../core/status/StatusService.js";
|
|
3
|
-
export type LogLevel = "debug" | "info" | "warn" | "error";
|
|
4
|
-
export type LocalRepoOptionValue = string | true | undefined;
|
|
5
|
-
export interface UpOptions {
|
|
6
|
-
logLevel?: LogLevel;
|
|
7
|
-
useHostDockerRuntime?: boolean;
|
|
8
|
-
apiRepoPath?: LocalRepoOptionValue;
|
|
9
|
-
webRepoPath?: LocalRepoOptionValue;
|
|
10
|
-
}
|
|
11
|
-
export interface ResetOptions {
|
|
12
|
-
removeGithubAppConfig?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface StatusReport {
|
|
15
|
-
services: StatusSnapshot;
|
|
16
|
-
apiUrl?: string;
|
|
17
|
-
uiUrl?: string;
|
|
18
|
-
username?: string;
|
|
19
|
-
versions?: RuntimeVersions;
|
|
20
|
-
}
|
|
21
|
-
export interface CommandDependencies {
|
|
22
|
-
up(options?: UpOptions): Promise<void>;
|
|
23
|
-
down(): Promise<void>;
|
|
24
|
-
status(): Promise<StatusReport>;
|
|
25
|
-
logs(service: string): Promise<void>;
|
|
26
|
-
reset(options?: ResetOptions): Promise<void>;
|
|
27
|
-
}
|
|
28
|
-
export declare function createDefaultDependencies(): CommandDependencies;
|