@elizaos/cli 1.6.4-alpha.10 → 1.6.4-alpha.11
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 +53 -0
- package/dist/commands/deploy/actions/deploy-ecs.d.ts.map +1 -1
- package/dist/commands/deploy/index.d.ts.map +1 -1
- package/dist/commands/deploy/types.d.ts +2 -0
- package/dist/commands/deploy/types.d.ts.map +1 -1
- package/dist/commands/deploy/utils/docker-build.d.ts.map +1 -1
- package/dist/index.js +66 -7
- package/dist/index.js.map +6 -6
- package/dist/templates/plugin-quick-starter/package.json +2 -2
- package/dist/templates/plugin-starter/package.json +2 -2
- package/dist/templates/project-starter/package.json +6 -6
- package/dist/templates/project-tee-starter/package.json +4 -4
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +7 -7
- package/templates/plugin-quick-starter/package.json +2 -2
- package/templates/plugin-starter/package.json +2 -2
- package/templates/project-starter/package.json +6 -6
- package/templates/project-tee-starter/package.json +4 -4
package/README.md
CHANGED
|
@@ -544,6 +544,59 @@ Manage environment variables and secrets.
|
|
|
544
544
|
- `interactive`: Start interactive environment variable manager
|
|
545
545
|
- Options: `-y, --yes`
|
|
546
546
|
|
|
547
|
+
### Cloud Deployment
|
|
548
|
+
|
|
549
|
+
#### `elizaos deploy`
|
|
550
|
+
|
|
551
|
+
Deploy ElizaOS projects to AWS ECS (Elastic Container Service) with automatic multi-architecture support.
|
|
552
|
+
|
|
553
|
+
- **Options:**
|
|
554
|
+
- `-n, --name <name>`: Name for the deployment
|
|
555
|
+
- `--project-name <name>`: Project name (defaults to directory name)
|
|
556
|
+
- `-p, --port <port>`: Port the container listens on (default: 3000)
|
|
557
|
+
- `--desired-count <count>`: Number of container instances to run (default: 1)
|
|
558
|
+
- `--cpu <units>`: CPU units (default: 1792 = 1.75 vCPU)
|
|
559
|
+
- `--memory <mb>`: Memory in MB (default: 896 MB)
|
|
560
|
+
- `-k, --api-key <key>`: ElizaOS Cloud API key
|
|
561
|
+
- `-u, --api-url <url>`: ElizaOS Cloud API URL
|
|
562
|
+
- `-e, --env <KEY=VALUE>`: Environment variable (can be specified multiple times)
|
|
563
|
+
- `--skip-build`: Skip Docker build and use existing image
|
|
564
|
+
- `--image-uri <uri>`: Use existing ECR image URI (requires --skip-build)
|
|
565
|
+
- **`--platform <platform>`**: Docker platform (e.g., linux/amd64, linux/arm64) - Auto-detected by default
|
|
566
|
+
|
|
567
|
+
**Multi-Architecture Support:**
|
|
568
|
+
|
|
569
|
+
The deploy command automatically detects your system architecture and deploys to the appropriate AWS instance type:
|
|
570
|
+
|
|
571
|
+
| Your System | Docker Platform | AWS Instance | Monthly Cost |
|
|
572
|
+
|-------------|----------------|--------------|--------------|
|
|
573
|
+
| macOS Apple Silicon | `linux/arm64` | t4g.micro (Graviton) | $9.63 |
|
|
574
|
+
| macOS Intel | `linux/amd64` | t3.micro (Intel/AMD) | $11.09 |
|
|
575
|
+
| Ubuntu/Linux x64 | `linux/amd64` | t3.micro (Intel/AMD) | $11.09 |
|
|
576
|
+
| Ubuntu/Linux ARM64 | `linux/arm64` | t4g.micro (Graviton) | $9.63 |
|
|
577
|
+
| Windows x64 | `linux/amd64` | t3.micro (Intel/AMD) | $11.09 |
|
|
578
|
+
|
|
579
|
+
**Examples:**
|
|
580
|
+
|
|
581
|
+
```bash
|
|
582
|
+
# Auto-detect (recommended)
|
|
583
|
+
elizaos deploy
|
|
584
|
+
|
|
585
|
+
# Explicit ARM64 for cost savings (requires QEMU on x64 systems)
|
|
586
|
+
elizaos deploy --platform linux/arm64
|
|
587
|
+
|
|
588
|
+
# With custom configuration
|
|
589
|
+
elizaos deploy \
|
|
590
|
+
--name my-agent \
|
|
591
|
+
--port 8080 \
|
|
592
|
+
--cpu 1024 \
|
|
593
|
+
--memory 1024 \
|
|
594
|
+
--env "OPENAI_API_KEY=sk-..." \
|
|
595
|
+
--env "DATABASE_URL=postgresql://..."
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
See the [Deploy Command Documentation](./src/commands/deploy/README.md) for complete details.
|
|
599
|
+
|
|
547
600
|
### Process Management
|
|
548
601
|
|
|
549
602
|
To stop all running ElizaOS agents locally, use:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-ecs.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/actions/deploy-ecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAGjB,MAAM,UAAU,CAAC;AAUlB;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"deploy-ecs.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/actions/deploy-ecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAGjB,MAAM,UAAU,CAAC;AAUlB;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA8TrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,MAAM,SAyGf,CAAC;AAEL,cAAc,SAAS,CAAC"}
|
|
@@ -14,6 +14,7 @@ export interface DeployOptions {
|
|
|
14
14
|
env?: string[];
|
|
15
15
|
skipBuild?: boolean;
|
|
16
16
|
imageUri?: string;
|
|
17
|
+
platform?: string;
|
|
17
18
|
}
|
|
18
19
|
export interface DeploymentResult {
|
|
19
20
|
success: boolean;
|
|
@@ -36,6 +37,7 @@ export interface ContainerConfig {
|
|
|
36
37
|
ecr_image_uri: string;
|
|
37
38
|
ecr_repository_uri?: string;
|
|
38
39
|
image_tag?: string;
|
|
40
|
+
architecture?: 'arm64' | 'x86_64';
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
41
43
|
* Base API response structure
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IAC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,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-build.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/utils/docker-build.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"docker-build.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/utils/docker-build.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;I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,iBAAiB,GAC7B,OAAO,CAAC;IACT,WAAW,EAAE,iBAAiB,CAAC;IAC/B,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B,CAAC,CAeD;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAc3E"}
|
package/dist/index.js
CHANGED
|
@@ -4749,7 +4749,7 @@ __export(exports_version, {
|
|
|
4749
4749
|
BUILD_TIME: () => BUILD_TIME,
|
|
4750
4750
|
BUILD_ENV: () => BUILD_ENV
|
|
4751
4751
|
});
|
|
4752
|
-
var CLI_VERSION = "1.6.4-alpha.
|
|
4752
|
+
var CLI_VERSION = "1.6.4-alpha.11", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-10-28T03:14:06.262Z", BUILD_ENV = "production", version_default;
|
|
4753
4753
|
var init_version = __esm(() => {
|
|
4754
4754
|
version_default = {
|
|
4755
4755
|
version: CLI_VERSION,
|
|
@@ -287305,9 +287305,29 @@ async function ensureDockerfile(projectPath) {
|
|
|
287305
287305
|
}
|
|
287306
287306
|
return dockerfilePath;
|
|
287307
287307
|
}
|
|
287308
|
+
function detectHostPlatform() {
|
|
287309
|
+
const arch = process.arch;
|
|
287310
|
+
if (arch === "arm64") {
|
|
287311
|
+
return "linux/arm64";
|
|
287312
|
+
} else if (arch === "x64") {
|
|
287313
|
+
return "linux/amd64";
|
|
287314
|
+
} else if (arch === "arm") {
|
|
287315
|
+
return "linux/arm/v7";
|
|
287316
|
+
} else if (arch === "ia32") {
|
|
287317
|
+
return "linux/386";
|
|
287318
|
+
}
|
|
287319
|
+
logger26.warn(`Unknown architecture ${arch}, defaulting to linux/amd64`);
|
|
287320
|
+
return "linux/amd64";
|
|
287321
|
+
}
|
|
287308
287322
|
async function buildDockerImage(options) {
|
|
287309
287323
|
try {
|
|
287310
|
-
const
|
|
287324
|
+
const hostPlatform = detectHostPlatform();
|
|
287325
|
+
const platform2 = options.platform || process.env.ELIZA_DOCKER_PLATFORM || hostPlatform;
|
|
287326
|
+
if (platform2 !== hostPlatform) {
|
|
287327
|
+
logger26.warn(`Cross-compiling from ${hostPlatform} to ${platform2}`);
|
|
287328
|
+
logger26.warn("This may be slower and requires Docker BuildKit with QEMU emulation");
|
|
287329
|
+
logger26.info("Tip: Set ELIZA_DOCKER_PLATFORM=" + hostPlatform + " to use native platform");
|
|
287330
|
+
}
|
|
287311
287331
|
logger26.info(`Building Docker image: ${options.imageTag} (platform: ${platform2})`);
|
|
287312
287332
|
const dockerfilePath = options.dockerfile ? path26.join(options.projectPath, options.dockerfile) : await ensureDockerfile(options.projectPath);
|
|
287313
287333
|
if (!fs14.existsSync(dockerfilePath)) {
|
|
@@ -287773,7 +287793,8 @@ async function deployWithECS(options) {
|
|
|
287773
287793
|
imageTag: localImageTag,
|
|
287774
287794
|
buildArgs: {
|
|
287775
287795
|
NODE_ENV: "production"
|
|
287776
|
-
}
|
|
287796
|
+
},
|
|
287797
|
+
platform: options.platform
|
|
287777
287798
|
});
|
|
287778
287799
|
if (!buildResult.success) {
|
|
287779
287800
|
return {
|
|
@@ -287836,6 +287857,11 @@ async function deployWithECS(options) {
|
|
|
287836
287857
|
logger28.info(`\uD83C\uDD95 No existing project found. This will be a FRESH deployment.`);
|
|
287837
287858
|
}
|
|
287838
287859
|
}
|
|
287860
|
+
const detectedPlatform = await getDetectedPlatform(options.platform);
|
|
287861
|
+
const architecture = detectedPlatform.includes("arm64") ? "arm64" : "x86_64";
|
|
287862
|
+
logger28.info(`\uD83C\uDFD7\uFE0F Target architecture: ${architecture} (from platform: ${detectedPlatform})`);
|
|
287863
|
+
const instanceDefaults = getInstanceDefaults(architecture);
|
|
287864
|
+
logger28.info(`\uD83D\uDCBB AWS instance type: ${instanceDefaults.instanceType} (${architecture})`);
|
|
287839
287865
|
const containerConfig = {
|
|
287840
287866
|
name: containerName,
|
|
287841
287867
|
project_name: projectName,
|
|
@@ -287845,8 +287871,9 @@ async function deployWithECS(options) {
|
|
|
287845
287871
|
image_tag: imageBuildData.ecrImageTag,
|
|
287846
287872
|
port: options.port || 3000,
|
|
287847
287873
|
desired_count: options.desiredCount || 1,
|
|
287848
|
-
cpu: options.cpu ||
|
|
287849
|
-
memory: options.memory ||
|
|
287874
|
+
cpu: options.cpu || instanceDefaults.cpu,
|
|
287875
|
+
memory: options.memory || instanceDefaults.memory,
|
|
287876
|
+
architecture,
|
|
287850
287877
|
environment_vars: {
|
|
287851
287878
|
...environmentVars,
|
|
287852
287879
|
PORT: (options.port || 3000).toString(),
|
|
@@ -288037,6 +288064,38 @@ function parseEnvironmentVariables(envOptions) {
|
|
|
288037
288064
|
}
|
|
288038
288065
|
return environmentVars;
|
|
288039
288066
|
}
|
|
288067
|
+
async function getDetectedPlatform(platformOverride) {
|
|
288068
|
+
if (platformOverride) {
|
|
288069
|
+
return platformOverride;
|
|
288070
|
+
}
|
|
288071
|
+
if (process.env.ELIZA_DOCKER_PLATFORM) {
|
|
288072
|
+
return process.env.ELIZA_DOCKER_PLATFORM;
|
|
288073
|
+
}
|
|
288074
|
+
const arch = process.arch;
|
|
288075
|
+
if (arch === "arm64") {
|
|
288076
|
+
return "linux/arm64";
|
|
288077
|
+
} else if (arch === "x64") {
|
|
288078
|
+
return "linux/amd64";
|
|
288079
|
+
} else if (arch === "arm") {
|
|
288080
|
+
return "linux/arm/v7";
|
|
288081
|
+
}
|
|
288082
|
+
return "linux/amd64";
|
|
288083
|
+
}
|
|
288084
|
+
function getInstanceDefaults(architecture) {
|
|
288085
|
+
if (architecture === "arm64") {
|
|
288086
|
+
return {
|
|
288087
|
+
instanceType: "t4g.micro",
|
|
288088
|
+
cpu: 1792,
|
|
288089
|
+
memory: 896
|
|
288090
|
+
};
|
|
288091
|
+
} else {
|
|
288092
|
+
return {
|
|
288093
|
+
instanceType: "t3.micro",
|
|
288094
|
+
cpu: 1792,
|
|
288095
|
+
memory: 896
|
|
288096
|
+
};
|
|
288097
|
+
}
|
|
288098
|
+
}
|
|
288040
288099
|
|
|
288041
288100
|
// src/commands/deploy/actions/deploy.ts
|
|
288042
288101
|
async function deployProject(options) {
|
|
@@ -288056,7 +288115,7 @@ async function deployProject(options) {
|
|
|
288056
288115
|
// src/commands/deploy/index.ts
|
|
288057
288116
|
var deploy = new Command().name("deploy").description("Deploy ElizaOS project to AWS ECS (Elastic Container Service)").option("-n, --name <name>", "Name for the deployment").option("--project-name <name>", "Project name (defaults to directory name)").option("-p, --port <port>", "Port the container listens on", (value) => parseInt(value, 10), 3000).option("--desired-count <count>", "Number of container instances to run", (value) => parseInt(value, 10), 1).option("--cpu <units>", "CPU units (1792 = 1.75 vCPU, 87.5% of t4g.micro 2 vCPUs)", (value) => parseInt(value, 10), 1792).option("--memory <mb>", "Memory in MB (896 MB = 87.5% of t4g.micro 1 GiB)", (value) => parseInt(value, 10), 896).option("-k, --api-key <key>", "ElizaOS Cloud API key").option("-u, --api-url <url>", "ElizaOS Cloud API URL", "https://www.elizacloud.ai").option("-e, --env <KEY=VALUE>", "Environment variable (can be specified multiple times)", (value, previous) => {
|
|
288058
288117
|
return previous.concat([value]);
|
|
288059
|
-
}, []).option("--skip-build", "Skip Docker build and use existing image").option("--image-uri <uri>", "Use existing ECR image URI (requires --skip-build)").action(async (options) => {
|
|
288118
|
+
}, []).option("--skip-build", "Skip Docker build and use existing image").option("--image-uri <uri>", "Use existing ECR image URI (requires --skip-build)").option("--platform <platform>", "Docker platform for build (e.g., linux/amd64, linux/arm64). Defaults to host platform.", undefined).action(async (options) => {
|
|
288060
288119
|
try {
|
|
288061
288120
|
if (isNaN(options.port) || options.port < 1 || options.port > 65535) {
|
|
288062
288121
|
logger30.error("\u274C Error: Port must be a number between 1 and 65535");
|
|
@@ -313207,5 +313266,5 @@ main().catch((error46) => {
|
|
|
313207
313266
|
process.exit(1);
|
|
313208
313267
|
});
|
|
313209
313268
|
|
|
313210
|
-
//# debugId=
|
|
313269
|
+
//# debugId=26994121A8F2059664756E2164756E21
|
|
313211
313270
|
//# sourceMappingURL=index.js.map
|