@mks2508/coolify-mks-cli-mcp 0.2.1 → 0.3.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/dist/cli/index.js +141 -3
- package/dist/coolify/index.d.ts +49 -0
- package/dist/coolify/index.d.ts.map +1 -1
- package/dist/coolify/types.d.ts +10 -2
- package/dist/coolify/types.d.ts.map +1 -1
- package/dist/index.cjs +174 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +174 -6
- package/dist/index.js.map +1 -1
- package/dist/server/stdio.js +379 -8
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/handlers.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/env.ts +43 -1
- package/src/cli/index.ts +5 -2
- package/src/coolify/index.ts +212 -3
- package/src/coolify/types.ts +10 -2
- package/src/index.ts +10 -3
- package/src/tools/definitions.ts +141 -4
- package/src/tools/handlers.ts +168 -5
package/dist/cli/index.js
CHANGED
|
@@ -11308,6 +11308,9 @@ class CoolifyService {
|
|
|
11308
11308
|
if (options.dockerfileLocation) {
|
|
11309
11309
|
body.dockerfile_location = options.dockerfileLocation;
|
|
11310
11310
|
}
|
|
11311
|
+
if (options.dockerComposeLocation) {
|
|
11312
|
+
body.docker_compose_location = options.dockerComposeLocation;
|
|
11313
|
+
}
|
|
11311
11314
|
if (options.baseDirectory) {
|
|
11312
11315
|
body.base_directory = options.baseDirectory;
|
|
11313
11316
|
}
|
|
@@ -11359,6 +11362,58 @@ class CoolifyService {
|
|
|
11359
11362
|
log.success(`Environment variables retrieved for ${appUuid}`);
|
|
11360
11363
|
return ok(result.data || []);
|
|
11361
11364
|
}
|
|
11365
|
+
async setEnvironmentVariable(appUuid, key, value, isBuildTime = false) {
|
|
11366
|
+
log.info(`Setting environment variable ${key} for ${appUuid}`);
|
|
11367
|
+
const existingVars = await this.getEnvironmentVariables(appUuid);
|
|
11368
|
+
if (isErr(existingVars)) {
|
|
11369
|
+
return err(existingVars.error);
|
|
11370
|
+
}
|
|
11371
|
+
const exists = existingVars.value.some((ev) => ev.key === key);
|
|
11372
|
+
if (exists) {
|
|
11373
|
+
log.debug(`Variable ${key} exists, using PATCH to update`);
|
|
11374
|
+
const result = await this.request(`/applications/${appUuid}/envs`, {
|
|
11375
|
+
method: "PATCH",
|
|
11376
|
+
body: JSON.stringify({ key, value })
|
|
11377
|
+
});
|
|
11378
|
+
if (result.error) {
|
|
11379
|
+
log.error(`Failed to update env var: ${result.error}`);
|
|
11380
|
+
return err(new Error(result.error));
|
|
11381
|
+
}
|
|
11382
|
+
} else {
|
|
11383
|
+
log.debug(`Variable ${key} does not exist, using POST to create`);
|
|
11384
|
+
const result = await this.request(`/applications/${appUuid}/envs`, {
|
|
11385
|
+
method: "POST",
|
|
11386
|
+
body: JSON.stringify({ key, value })
|
|
11387
|
+
});
|
|
11388
|
+
if (result.error) {
|
|
11389
|
+
log.error(`Failed to create env var: ${result.error}`);
|
|
11390
|
+
return err(new Error(result.error));
|
|
11391
|
+
}
|
|
11392
|
+
}
|
|
11393
|
+
log.success(`Environment variable ${key} set for ${appUuid}`);
|
|
11394
|
+
return ok(undefined);
|
|
11395
|
+
}
|
|
11396
|
+
async deleteEnvironmentVariable(appUuid, key) {
|
|
11397
|
+
log.info(`Deleting environment variable ${key} from ${appUuid}`);
|
|
11398
|
+
const envVarsResult = await this.getEnvironmentVariables(appUuid);
|
|
11399
|
+
if (isErr(envVarsResult)) {
|
|
11400
|
+
return err(envVarsResult.error);
|
|
11401
|
+
}
|
|
11402
|
+
const envVar = envVarsResult.value.find((ev) => ev.key === key);
|
|
11403
|
+
if (!envVar) {
|
|
11404
|
+
log.error(`Environment variable ${key} not found`);
|
|
11405
|
+
return err(new Error(`Environment variable ${key} not found`));
|
|
11406
|
+
}
|
|
11407
|
+
const result = await this.request(`/applications/${appUuid}/envs/${envVar.uuid}`, {
|
|
11408
|
+
method: "DELETE"
|
|
11409
|
+
});
|
|
11410
|
+
if (result.error) {
|
|
11411
|
+
log.error(`Failed to delete env var: ${result.error}`);
|
|
11412
|
+
return err(new Error(result.error));
|
|
11413
|
+
}
|
|
11414
|
+
log.success(`Environment variable ${key} deleted from ${appUuid}`);
|
|
11415
|
+
return ok(undefined);
|
|
11416
|
+
}
|
|
11362
11417
|
async getApplicationStatus(appUuid) {
|
|
11363
11418
|
const result = await this.request(`/applications/${appUuid}`);
|
|
11364
11419
|
if (result.error) {
|
|
@@ -11390,6 +11445,19 @@ class CoolifyService {
|
|
|
11390
11445
|
}
|
|
11391
11446
|
return ok(result.data || []);
|
|
11392
11447
|
}
|
|
11448
|
+
async createProject(name, description) {
|
|
11449
|
+
log.info(`Creating project: ${name}`);
|
|
11450
|
+
const result = await this.request("/projects", {
|
|
11451
|
+
method: "POST",
|
|
11452
|
+
body: JSON.stringify({ name, description: description || "" })
|
|
11453
|
+
});
|
|
11454
|
+
if (result.error) {
|
|
11455
|
+
log.error(`Failed to create project: ${result.error}`);
|
|
11456
|
+
return err(new Error(result.error));
|
|
11457
|
+
}
|
|
11458
|
+
log.success(`Project created: ${result.data?.uuid}`);
|
|
11459
|
+
return ok(result.data);
|
|
11460
|
+
}
|
|
11393
11461
|
async getProjectEnvironments(projectUuid) {
|
|
11394
11462
|
log.info(`Getting environments for project ${projectUuid}`);
|
|
11395
11463
|
const result = await this.request(`/projects/${projectUuid}`);
|
|
@@ -11468,6 +11536,12 @@ class CoolifyService {
|
|
|
11468
11536
|
body.dockerfile_location = options.dockerfileLocation;
|
|
11469
11537
|
if (options.baseDirectory)
|
|
11470
11538
|
body.base_directory = options.baseDirectory;
|
|
11539
|
+
if (options.domains)
|
|
11540
|
+
body.domains = options.domains;
|
|
11541
|
+
if (options.isForceHttpsEnabled !== undefined)
|
|
11542
|
+
body.is_force_https_enabled = options.isForceHttpsEnabled;
|
|
11543
|
+
if (options.isAutoDeployEnabled !== undefined)
|
|
11544
|
+
body.is_auto_deploy_enabled = options.isAutoDeployEnabled;
|
|
11471
11545
|
const result = await this.request(`/applications/${appUuid}`, {
|
|
11472
11546
|
method: "PATCH",
|
|
11473
11547
|
body: JSON.stringify(body)
|
|
@@ -11492,9 +11566,12 @@ class CoolifyService {
|
|
|
11492
11566
|
log.error(`Failed to get logs: ${result.error}`);
|
|
11493
11567
|
return err(new Error(result.error));
|
|
11494
11568
|
}
|
|
11569
|
+
const rawLogs = result.data?.logs;
|
|
11570
|
+
const logsArray = Array.isArray(rawLogs) ? rawLogs : typeof rawLogs === "string" ? rawLogs.split(`
|
|
11571
|
+
`).filter((l) => l.length > 0) : [];
|
|
11495
11572
|
log.success(`Logs retrieved for application: ${appUuid}`);
|
|
11496
11573
|
return ok({
|
|
11497
|
-
logs:
|
|
11574
|
+
logs: logsArray,
|
|
11498
11575
|
timestamp: new Date().toISOString()
|
|
11499
11576
|
});
|
|
11500
11577
|
}
|
|
@@ -11544,6 +11621,43 @@ class CoolifyService {
|
|
|
11544
11621
|
log.success(`Application restarted: ${appUuid}`);
|
|
11545
11622
|
return ok(result.data);
|
|
11546
11623
|
}
|
|
11624
|
+
async listDeployments() {
|
|
11625
|
+
log.info("Listing active deployments");
|
|
11626
|
+
const result = await this.request("/deployments");
|
|
11627
|
+
if (result.error) {
|
|
11628
|
+
log.error(`Failed to list deployments: ${result.error}`);
|
|
11629
|
+
return err(new Error(result.error));
|
|
11630
|
+
}
|
|
11631
|
+
log.success(`Listed ${result.data?.length || 0} active deployments`);
|
|
11632
|
+
return ok(result.data || []);
|
|
11633
|
+
}
|
|
11634
|
+
async getDeployment(deploymentUuid) {
|
|
11635
|
+
log.info(`Getting deployment details for ${deploymentUuid}`);
|
|
11636
|
+
const result = await this.request(`/deployments/${deploymentUuid}`);
|
|
11637
|
+
if (result.error) {
|
|
11638
|
+
log.error(`Failed to get deployment: ${result.error}`);
|
|
11639
|
+
return err(new Error(result.error));
|
|
11640
|
+
}
|
|
11641
|
+
log.success(`Deployment details retrieved: ${deploymentUuid}`);
|
|
11642
|
+
return ok(result.data);
|
|
11643
|
+
}
|
|
11644
|
+
async getApplicationDeployments(appUuid, skip = 0, take = 10) {
|
|
11645
|
+
log.info(`Getting deployments for application ${appUuid}`);
|
|
11646
|
+
const params = new URLSearchParams;
|
|
11647
|
+
if (skip > 0)
|
|
11648
|
+
params.set("skip", skip.toString());
|
|
11649
|
+
if (take !== 10)
|
|
11650
|
+
params.set("take", take.toString());
|
|
11651
|
+
const endpoint = `/applications/${appUuid}/deployments${params.toString() ? `?${params.toString()}` : ""}`;
|
|
11652
|
+
const result = await this.request(endpoint);
|
|
11653
|
+
if (result.error) {
|
|
11654
|
+
log.error(`Failed to get application deployments: ${result.error}`);
|
|
11655
|
+
return err(new Error(result.error));
|
|
11656
|
+
}
|
|
11657
|
+
const deployments = result.data?.deployments || [];
|
|
11658
|
+
log.success(`Retrieved ${deployments.length} deployments for ${appUuid}`);
|
|
11659
|
+
return ok(deployments);
|
|
11660
|
+
}
|
|
11547
11661
|
}
|
|
11548
11662
|
var instance = null;
|
|
11549
11663
|
function getCoolifyService() {
|
|
@@ -11932,13 +12046,37 @@ async function configCommand(action, args) {
|
|
|
11932
12046
|
}
|
|
11933
12047
|
|
|
11934
12048
|
// src/cli/commands/env.ts
|
|
11935
|
-
async function envCommand(uuid) {
|
|
12049
|
+
async function envCommand(uuid, options = {}) {
|
|
11936
12050
|
const coolify = getCoolifyService();
|
|
11937
12051
|
const initResult = await coolify.init();
|
|
11938
12052
|
if (isErr(initResult)) {
|
|
11939
12053
|
console.error(source_default.red(`Error: ${initResult.error.message}`));
|
|
11940
12054
|
return;
|
|
11941
12055
|
}
|
|
12056
|
+
if (options.set) {
|
|
12057
|
+
const [key, ...valueParts] = options.set.split("=");
|
|
12058
|
+
const value = valueParts.join("=");
|
|
12059
|
+
if (!key || value === undefined) {
|
|
12060
|
+
console.error(source_default.red("Error: Invalid format. Use --set KEY=VALUE"));
|
|
12061
|
+
return;
|
|
12062
|
+
}
|
|
12063
|
+
const result2 = await coolify.setEnvironmentVariable(uuid, key, value, options.buildtime ?? false);
|
|
12064
|
+
if (isErr(result2)) {
|
|
12065
|
+
console.error(source_default.red(`Error: ${result2.error.message}`));
|
|
12066
|
+
return;
|
|
12067
|
+
}
|
|
12068
|
+
console.log(source_default.green(`✓ Set ${source_default.bold(key)} for ${uuid.slice(0, 8)}`));
|
|
12069
|
+
return;
|
|
12070
|
+
}
|
|
12071
|
+
if (options.delete) {
|
|
12072
|
+
const result2 = await coolify.deleteEnvironmentVariable(uuid, options.delete);
|
|
12073
|
+
if (isErr(result2)) {
|
|
12074
|
+
console.error(source_default.red(`Error: ${result2.error.message}`));
|
|
12075
|
+
return;
|
|
12076
|
+
}
|
|
12077
|
+
console.log(source_default.green(`✓ Deleted ${source_default.bold(options.delete)} from ${uuid.slice(0, 8)}`));
|
|
12078
|
+
return;
|
|
12079
|
+
}
|
|
11942
12080
|
const result = await coolify.getEnvironmentVariables(uuid);
|
|
11943
12081
|
if (isErr(result)) {
|
|
11944
12082
|
console.error(source_default.red(`Error: ${result.error.message}`));
|
|
@@ -12207,7 +12345,7 @@ program2.command("logs <uuid>").description("Get application logs").option("-n,
|
|
|
12207
12345
|
program2.command("servers").description("List available servers").option("--full", "Show full UUIDs instead of truncated").action((options) => serversCommand(options));
|
|
12208
12346
|
program2.command("projects").description("List available projects").option("--full", "Show full UUIDs instead of truncated").action((options) => projectsCommand(options));
|
|
12209
12347
|
program2.command("environments <projectUuid>").description("List environments for a project").option("--full", "Show full UUIDs instead of truncated").action((projectUuid, options) => environmentsCommand(projectUuid, options));
|
|
12210
|
-
program2.command("env <uuid>").description("
|
|
12348
|
+
program2.command("env <uuid>").description("Manage environment variables for an application").option("--set <KEY=VALUE>", "Set an environment variable").option("--delete <KEY>", "Delete an environment variable").option("--buildtime", "Mark variable as build-time only (use with --set)").action((uuid, options) => envCommand(uuid, options));
|
|
12211
12349
|
program2.command("update <uuid>").description("Update an application configuration").option("--name <name>", "Application name").option("--description <desc>", "Application description").option("--build-pack <pack>", "Build pack (dockerfile, nixpacks, static)").option("--git-branch <branch>", "Git branch").option("--ports <ports>", "Ports to expose (e.g., 3000)").option("--install-command <cmd>", "Install command (nixpacks)").option("--build-command <cmd>", "Build command").option("--start-command <cmd>", "Start command").option("--dockerfile-location <path>", 'Dockerfile location (e.g., "apps/haidodocs/Dockerfile")').option("--base-directory <dir>", 'Base directory for build context (e.g., "/")').action((uuid, options) => updateCommand({ uuid, ...options }));
|
|
12212
12350
|
program2.command("delete <uuid>").description("Delete an application").option("-f, --force", "Skip confirmation prompt").option("-y, --yes", "Skip confirmation prompt (alias for --force)").action((uuid, options) => deleteCommand(uuid, options));
|
|
12213
12351
|
program2.command("destinations <serverUuid>").description("List available destinations for a server").action(destinationsCommand);
|
package/dist/coolify/index.d.ts
CHANGED
|
@@ -100,6 +100,25 @@ export declare class CoolifyService {
|
|
|
100
100
|
* @returns Result with environment variables or error
|
|
101
101
|
*/
|
|
102
102
|
getEnvironmentVariables(appUuid: string): Promise<Result<ICoolifyEnvVar[], Error>>;
|
|
103
|
+
/**
|
|
104
|
+
* Sets a single environment variable for an application.
|
|
105
|
+
* Uses PATCH if variable exists, POST if it doesn't.
|
|
106
|
+
*
|
|
107
|
+
* @param appUuid - Application UUID
|
|
108
|
+
* @param key - Variable name
|
|
109
|
+
* @param value - Variable value
|
|
110
|
+
* @param isBuildTime - Whether the variable is available at build time (only for new vars)
|
|
111
|
+
* @returns Result indicating success or error
|
|
112
|
+
*/
|
|
113
|
+
setEnvironmentVariable(appUuid: string, key: string, value: string, isBuildTime?: boolean): Promise<Result<void, Error>>;
|
|
114
|
+
/**
|
|
115
|
+
* Deletes an environment variable from an application.
|
|
116
|
+
*
|
|
117
|
+
* @param appUuid - Application UUID
|
|
118
|
+
* @param key - Variable name to delete
|
|
119
|
+
* @returns Result indicating success or error
|
|
120
|
+
*/
|
|
121
|
+
deleteEnvironmentVariable(appUuid: string, key: string): Promise<Result<void, Error>>;
|
|
103
122
|
/**
|
|
104
123
|
* Gets the status of an application.
|
|
105
124
|
*
|
|
@@ -126,6 +145,14 @@ export declare class CoolifyService {
|
|
|
126
145
|
* @returns Result with projects list or error
|
|
127
146
|
*/
|
|
128
147
|
listProjects(): Promise<Result<ICoolifyProject[], Error>>;
|
|
148
|
+
/**
|
|
149
|
+
* Creates a new project.
|
|
150
|
+
*
|
|
151
|
+
* @param name - Project name
|
|
152
|
+
* @param description - Optional project description
|
|
153
|
+
* @returns Result with created project or error
|
|
154
|
+
*/
|
|
155
|
+
createProject(name: string, description?: string): Promise<Result<ICoolifyProject, Error>>;
|
|
129
156
|
/**
|
|
130
157
|
* Gets environments for a project.
|
|
131
158
|
*
|
|
@@ -205,6 +232,28 @@ export declare class CoolifyService {
|
|
|
205
232
|
* @returns Result with application status or error
|
|
206
233
|
*/
|
|
207
234
|
restartApplication(appUuid: string): Promise<Result<ICoolifyApplication, Error>>;
|
|
235
|
+
/**
|
|
236
|
+
* Lists all active and queued deployments.
|
|
237
|
+
*
|
|
238
|
+
* @returns Result with deployments list or error
|
|
239
|
+
*/
|
|
240
|
+
listDeployments(): Promise<Result<ICoolifyDeployment[], Error>>;
|
|
241
|
+
/**
|
|
242
|
+
* Gets detailed information about a specific deployment.
|
|
243
|
+
*
|
|
244
|
+
* @param deploymentUuid - Deployment UUID
|
|
245
|
+
* @returns Result with deployment details or error
|
|
246
|
+
*/
|
|
247
|
+
getDeployment(deploymentUuid: string): Promise<Result<ICoolifyDeployment, Error>>;
|
|
248
|
+
/**
|
|
249
|
+
* Gets deployment history for a specific application.
|
|
250
|
+
*
|
|
251
|
+
* @param appUuid - Application UUID
|
|
252
|
+
* @param skip - Number of deployments to skip
|
|
253
|
+
* @param take - Number of deployments to return
|
|
254
|
+
* @returns Result with deployments list or error
|
|
255
|
+
*/
|
|
256
|
+
getApplicationDeployments(appUuid: string, skip?: number, take?: number): Promise<Result<ICoolifyDeployment[], Error>>;
|
|
208
257
|
}
|
|
209
258
|
/**
|
|
210
259
|
* Gets the singleton CoolifyService instance.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** Git branch */
|
|
47
47
|
branch?: string;
|
|
48
48
|
/** Build pack type */
|
|
49
|
-
buildPack?: 'dockerfile' | 'nixpacks' | 'static';
|
|
49
|
+
buildPack?: 'dockerfile' | 'nixpacks' | 'static' | 'dockercompose';
|
|
50
50
|
/** Ports to expose */
|
|
51
51
|
portsExposes?: string;
|
|
52
52
|
/** Docker image (for docker-image type) */
|
|
53
53
|
dockerImage?: string;
|
|
54
54
|
/** Docker Compose content (for docker-compose type) */
|
|
55
55
|
dockerCompose?: string;
|
|
56
|
+
/** Docker Compose file location relative to repo root (for dockercompose buildPack) */
|
|
57
|
+
dockerComposeLocation?: string;
|
|
56
58
|
/** Environment variables */
|
|
57
59
|
envVars?: Record<string, string>;
|
|
58
60
|
/** Dockerfile location (path relative to repo root, e.g., "apps/haidodocs/Dockerfile") */
|
|
@@ -69,7 +71,7 @@ export interface ICoolifyUpdateOptions {
|
|
|
69
71
|
/** Application description */
|
|
70
72
|
description?: string;
|
|
71
73
|
/** Build pack type */
|
|
72
|
-
buildPack?: 'dockerfile' | 'nixpacks' | 'static';
|
|
74
|
+
buildPack?: 'dockerfile' | 'nixpacks' | 'static' | 'dockercompose';
|
|
73
75
|
/** Git branch */
|
|
74
76
|
gitBranch?: string;
|
|
75
77
|
/** Ports to expose */
|
|
@@ -84,6 +86,12 @@ export interface ICoolifyUpdateOptions {
|
|
|
84
86
|
dockerfileLocation?: string;
|
|
85
87
|
/** Base directory for build context (default: "/") */
|
|
86
88
|
baseDirectory?: string;
|
|
89
|
+
/** Domains/FQDN - comma separated list of domains with protocol (e.g., "https://app.example.com,https://www.example.com") */
|
|
90
|
+
domains?: string;
|
|
91
|
+
/** Force HTTPS redirect */
|
|
92
|
+
isForceHttpsEnabled?: boolean;
|
|
93
|
+
/** Enable auto deploy on git push */
|
|
94
|
+
isAutoDeployEnabled?: boolean;
|
|
87
95
|
}
|
|
88
96
|
/**
|
|
89
97
|
* Options for retrieving application logs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/coolify/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sBAAsB;IACtB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kCAAkC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sDAAsD;IACtD,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC/B,QAAQ,GACR,oBAAoB,GACpB,oBAAoB,GACpB,YAAY,GACZ,cAAc,GACd,gBAAgB,CAAA;AAEpB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,uBAAuB;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,sEAAsE;IACtE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,uBAAuB;IACvB,IAAI,CAAC,EAAE,uBAAuB,CAAA;IAC9B,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sBAAsB;IACtB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/coolify/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sBAAsB;IACtB,GAAG,CAAC,EA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AAI,CAAA;IAC3B,iBAAiB;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,uBAAuB;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,cAAc;IACd,EAAE,EAAE,MAAM,CAAA;IACV,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,yBAAyB;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -28193,6 +28193,7 @@ var CoolifyService = class {
|
|
|
28193
28193
|
body.build_pack = options.buildPack || "dockerfile";
|
|
28194
28194
|
if (options.portsExposes) body.ports_exposes = options.portsExposes;
|
|
28195
28195
|
if (options.dockerfileLocation) body.dockerfile_location = options.dockerfileLocation;
|
|
28196
|
+
if (options.dockerComposeLocation) body.docker_compose_location = options.dockerComposeLocation;
|
|
28196
28197
|
if (options.baseDirectory) body.base_directory = options.baseDirectory;
|
|
28197
28198
|
} else if (appType === "docker-image" && options.dockerImage) body.docker_image = options.dockerImage;
|
|
28198
28199
|
else if (appType === "docker-compose" && options.dockerCompose) body.docker_compose = options.dockerCompose;
|
|
@@ -28253,6 +28254,75 @@ var CoolifyService = class {
|
|
|
28253
28254
|
return ok(result.data || []);
|
|
28254
28255
|
}
|
|
28255
28256
|
/**
|
|
28257
|
+
* Sets a single environment variable for an application.
|
|
28258
|
+
* Uses PATCH if variable exists, POST if it doesn't.
|
|
28259
|
+
*
|
|
28260
|
+
* @param appUuid - Application UUID
|
|
28261
|
+
* @param key - Variable name
|
|
28262
|
+
* @param value - Variable value
|
|
28263
|
+
* @param isBuildTime - Whether the variable is available at build time (only for new vars)
|
|
28264
|
+
* @returns Result indicating success or error
|
|
28265
|
+
*/
|
|
28266
|
+
async setEnvironmentVariable(appUuid, key, value, isBuildTime = false) {
|
|
28267
|
+
log.info(`Setting environment variable ${key} for ${appUuid}`);
|
|
28268
|
+
const existingVars = await this.getEnvironmentVariables(appUuid);
|
|
28269
|
+
if (isErr(existingVars)) return err(existingVars.error);
|
|
28270
|
+
const exists = existingVars.value.some((ev) => ev.key === key);
|
|
28271
|
+
if (exists) {
|
|
28272
|
+
log.debug(`Variable ${key} exists, using PATCH to update`);
|
|
28273
|
+
const result = await this.request(`/applications/${appUuid}/envs`, {
|
|
28274
|
+
method: "PATCH",
|
|
28275
|
+
body: JSON.stringify({
|
|
28276
|
+
key,
|
|
28277
|
+
value
|
|
28278
|
+
})
|
|
28279
|
+
});
|
|
28280
|
+
if (result.error) {
|
|
28281
|
+
log.error(`Failed to update env var: ${result.error}`);
|
|
28282
|
+
return err(new Error(result.error));
|
|
28283
|
+
}
|
|
28284
|
+
} else {
|
|
28285
|
+
log.debug(`Variable ${key} does not exist, using POST to create`);
|
|
28286
|
+
const result = await this.request(`/applications/${appUuid}/envs`, {
|
|
28287
|
+
method: "POST",
|
|
28288
|
+
body: JSON.stringify({
|
|
28289
|
+
key,
|
|
28290
|
+
value
|
|
28291
|
+
})
|
|
28292
|
+
});
|
|
28293
|
+
if (result.error) {
|
|
28294
|
+
log.error(`Failed to create env var: ${result.error}`);
|
|
28295
|
+
return err(new Error(result.error));
|
|
28296
|
+
}
|
|
28297
|
+
}
|
|
28298
|
+
log.success(`Environment variable ${key} set for ${appUuid}`);
|
|
28299
|
+
return ok(void 0);
|
|
28300
|
+
}
|
|
28301
|
+
/**
|
|
28302
|
+
* Deletes an environment variable from an application.
|
|
28303
|
+
*
|
|
28304
|
+
* @param appUuid - Application UUID
|
|
28305
|
+
* @param key - Variable name to delete
|
|
28306
|
+
* @returns Result indicating success or error
|
|
28307
|
+
*/
|
|
28308
|
+
async deleteEnvironmentVariable(appUuid, key) {
|
|
28309
|
+
log.info(`Deleting environment variable ${key} from ${appUuid}`);
|
|
28310
|
+
const envVarsResult = await this.getEnvironmentVariables(appUuid);
|
|
28311
|
+
if (isErr(envVarsResult)) return err(envVarsResult.error);
|
|
28312
|
+
const envVar = envVarsResult.value.find((ev) => ev.key === key);
|
|
28313
|
+
if (!envVar) {
|
|
28314
|
+
log.error(`Environment variable ${key} not found`);
|
|
28315
|
+
return err(new Error(`Environment variable ${key} not found`));
|
|
28316
|
+
}
|
|
28317
|
+
const result = await this.request(`/applications/${appUuid}/envs/${envVar.uuid}`, { method: "DELETE" });
|
|
28318
|
+
if (result.error) {
|
|
28319
|
+
log.error(`Failed to delete env var: ${result.error}`);
|
|
28320
|
+
return err(new Error(result.error));
|
|
28321
|
+
}
|
|
28322
|
+
log.success(`Environment variable ${key} deleted from ${appUuid}`);
|
|
28323
|
+
return ok(void 0);
|
|
28324
|
+
}
|
|
28325
|
+
/**
|
|
28256
28326
|
* Gets the status of an application.
|
|
28257
28327
|
*
|
|
28258
28328
|
* @param appUuid - Application UUID
|
|
@@ -28300,6 +28370,29 @@ var CoolifyService = class {
|
|
|
28300
28370
|
return ok(result.data || []);
|
|
28301
28371
|
}
|
|
28302
28372
|
/**
|
|
28373
|
+
* Creates a new project.
|
|
28374
|
+
*
|
|
28375
|
+
* @param name - Project name
|
|
28376
|
+
* @param description - Optional project description
|
|
28377
|
+
* @returns Result with created project or error
|
|
28378
|
+
*/
|
|
28379
|
+
async createProject(name, description) {
|
|
28380
|
+
log.info(`Creating project: ${name}`);
|
|
28381
|
+
const result = await this.request("/projects", {
|
|
28382
|
+
method: "POST",
|
|
28383
|
+
body: JSON.stringify({
|
|
28384
|
+
name,
|
|
28385
|
+
description: description || ""
|
|
28386
|
+
})
|
|
28387
|
+
});
|
|
28388
|
+
if (result.error) {
|
|
28389
|
+
log.error(`Failed to create project: ${result.error}`);
|
|
28390
|
+
return err(new Error(result.error));
|
|
28391
|
+
}
|
|
28392
|
+
log.success(`Project created: ${result.data?.uuid}`);
|
|
28393
|
+
return ok(result.data);
|
|
28394
|
+
}
|
|
28395
|
+
/**
|
|
28303
28396
|
* Gets environments for a project.
|
|
28304
28397
|
*
|
|
28305
28398
|
* @param projectUuid - Project UUID
|
|
@@ -28397,6 +28490,9 @@ var CoolifyService = class {
|
|
|
28397
28490
|
if (options.startCommand) body.start_command = options.startCommand;
|
|
28398
28491
|
if (options.dockerfileLocation) body.dockerfile_location = options.dockerfileLocation;
|
|
28399
28492
|
if (options.baseDirectory) body.base_directory = options.baseDirectory;
|
|
28493
|
+
if (options.domains) body.domains = options.domains;
|
|
28494
|
+
if (options.isForceHttpsEnabled !== void 0) body.is_force_https_enabled = options.isForceHttpsEnabled;
|
|
28495
|
+
if (options.isAutoDeployEnabled !== void 0) body.is_auto_deploy_enabled = options.isAutoDeployEnabled;
|
|
28400
28496
|
const result = await this.request(`/applications/${appUuid}`, {
|
|
28401
28497
|
method: "PATCH",
|
|
28402
28498
|
body: JSON.stringify(body)
|
|
@@ -28426,9 +28522,11 @@ var CoolifyService = class {
|
|
|
28426
28522
|
log.error(`Failed to get logs: ${result.error}`);
|
|
28427
28523
|
return err(new Error(result.error));
|
|
28428
28524
|
}
|
|
28525
|
+
const rawLogs = result.data?.logs;
|
|
28526
|
+
const logsArray = Array.isArray(rawLogs) ? rawLogs : typeof rawLogs === "string" ? rawLogs.split("\n").filter((l) => l.length > 0) : [];
|
|
28429
28527
|
log.success(`Logs retrieved for application: ${appUuid}`);
|
|
28430
28528
|
return ok({
|
|
28431
|
-
logs:
|
|
28529
|
+
logs: logsArray,
|
|
28432
28530
|
timestamp: new Date().toISOString()
|
|
28433
28531
|
});
|
|
28434
28532
|
}
|
|
@@ -28496,6 +28594,60 @@ var CoolifyService = class {
|
|
|
28496
28594
|
log.success(`Application restarted: ${appUuid}`);
|
|
28497
28595
|
return ok(result.data);
|
|
28498
28596
|
}
|
|
28597
|
+
/**
|
|
28598
|
+
* Lists all active and queued deployments.
|
|
28599
|
+
*
|
|
28600
|
+
* @returns Result with deployments list or error
|
|
28601
|
+
*/
|
|
28602
|
+
async listDeployments() {
|
|
28603
|
+
log.info("Listing active deployments");
|
|
28604
|
+
const result = await this.request("/deployments");
|
|
28605
|
+
if (result.error) {
|
|
28606
|
+
log.error(`Failed to list deployments: ${result.error}`);
|
|
28607
|
+
return err(new Error(result.error));
|
|
28608
|
+
}
|
|
28609
|
+
log.success(`Listed ${result.data?.length || 0} active deployments`);
|
|
28610
|
+
return ok(result.data || []);
|
|
28611
|
+
}
|
|
28612
|
+
/**
|
|
28613
|
+
* Gets detailed information about a specific deployment.
|
|
28614
|
+
*
|
|
28615
|
+
* @param deploymentUuid - Deployment UUID
|
|
28616
|
+
* @returns Result with deployment details or error
|
|
28617
|
+
*/
|
|
28618
|
+
async getDeployment(deploymentUuid) {
|
|
28619
|
+
log.info(`Getting deployment details for ${deploymentUuid}`);
|
|
28620
|
+
const result = await this.request(`/deployments/${deploymentUuid}`);
|
|
28621
|
+
if (result.error) {
|
|
28622
|
+
log.error(`Failed to get deployment: ${result.error}`);
|
|
28623
|
+
return err(new Error(result.error));
|
|
28624
|
+
}
|
|
28625
|
+
log.success(`Deployment details retrieved: ${deploymentUuid}`);
|
|
28626
|
+
return ok(result.data);
|
|
28627
|
+
}
|
|
28628
|
+
/**
|
|
28629
|
+
* Gets deployment history for a specific application.
|
|
28630
|
+
*
|
|
28631
|
+
* @param appUuid - Application UUID
|
|
28632
|
+
* @param skip - Number of deployments to skip
|
|
28633
|
+
* @param take - Number of deployments to return
|
|
28634
|
+
* @returns Result with deployments list or error
|
|
28635
|
+
*/
|
|
28636
|
+
async getApplicationDeployments(appUuid, skip = 0, take = 10) {
|
|
28637
|
+
log.info(`Getting deployments for application ${appUuid}`);
|
|
28638
|
+
const params = new URLSearchParams();
|
|
28639
|
+
if (skip > 0) params.set("skip", skip.toString());
|
|
28640
|
+
if (take !== 10) params.set("take", take.toString());
|
|
28641
|
+
const endpoint = `/applications/${appUuid}/deployments${params.toString() ? `?${params.toString()}` : ""}`;
|
|
28642
|
+
const result = await this.request(endpoint);
|
|
28643
|
+
if (result.error) {
|
|
28644
|
+
log.error(`Failed to get application deployments: ${result.error}`);
|
|
28645
|
+
return err(new Error(result.error));
|
|
28646
|
+
}
|
|
28647
|
+
const deployments = result.data?.deployments || [];
|
|
28648
|
+
log.success(`Retrieved ${deployments.length} deployments for ${appUuid}`);
|
|
28649
|
+
return ok(deployments);
|
|
28650
|
+
}
|
|
28499
28651
|
};
|
|
28500
28652
|
let instance = null;
|
|
28501
28653
|
/**
|
|
@@ -28859,7 +29011,8 @@ Redeploy after updating to apply changes.`, {
|
|
|
28859
29011
|
buildPack: enumType([
|
|
28860
29012
|
"dockerfile",
|
|
28861
29013
|
"nixpacks",
|
|
28862
|
-
"static"
|
|
29014
|
+
"static",
|
|
29015
|
+
"dockercompose"
|
|
28863
29016
|
]).optional().describe("Build pack type"),
|
|
28864
29017
|
gitBranch: stringType().optional().describe("Git branch to deploy"),
|
|
28865
29018
|
portsExposes: stringType().optional().describe("Ports to expose (comma-separated)"),
|
|
@@ -29056,8 +29209,20 @@ The GitHub repository must be accessible via the configured GitHub App.`, {
|
|
|
29056
29209
|
buildPack: enumType([
|
|
29057
29210
|
"dockerfile",
|
|
29058
29211
|
"nixpacks",
|
|
29059
|
-
"static"
|
|
29060
|
-
|
|
29212
|
+
"static",
|
|
29213
|
+
"dockercompose"
|
|
29214
|
+
]).default("nixpacks").describe("Build pack type"),
|
|
29215
|
+
type: enumType([
|
|
29216
|
+
"public",
|
|
29217
|
+
"private-github-app",
|
|
29218
|
+
"private-deploy-key",
|
|
29219
|
+
"dockerfile",
|
|
29220
|
+
"docker-image",
|
|
29221
|
+
"docker-compose"
|
|
29222
|
+
]).default("public").describe("Application type"),
|
|
29223
|
+
dockerComposeLocation: stringType().optional().describe("Docker Compose file location relative to repo root"),
|
|
29224
|
+
dockerfileLocation: stringType().optional().describe("Dockerfile location relative to repo root"),
|
|
29225
|
+
baseDirectory: stringType().optional().describe("Base directory for build context")
|
|
29061
29226
|
}, async (args) => {
|
|
29062
29227
|
const initResult = await coolify.init();
|
|
29063
29228
|
if (isErr(initResult)) return {
|
|
@@ -29073,10 +29238,13 @@ The GitHub repository must be accessible via the configured GitHub App.`, {
|
|
|
29073
29238
|
projectUuid: args.projectUuid,
|
|
29074
29239
|
environmentUuid: args.environmentUuid,
|
|
29075
29240
|
serverUuid: args.serverUuid,
|
|
29076
|
-
type:
|
|
29241
|
+
type: args.type,
|
|
29077
29242
|
githubRepoUrl: args.githubRepoUrl,
|
|
29078
29243
|
branch: args.branch,
|
|
29079
|
-
buildPack: args.buildPack
|
|
29244
|
+
buildPack: args.buildPack,
|
|
29245
|
+
dockerComposeLocation: args.dockerComposeLocation,
|
|
29246
|
+
dockerfileLocation: args.dockerfileLocation,
|
|
29247
|
+
baseDirectory: args.baseDirectory
|
|
29080
29248
|
});
|
|
29081
29249
|
if (isOk(result)) return { content: [{
|
|
29082
29250
|
type: "text",
|