@cortex-context/cli 0.0.17 → 0.0.19
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/index.js +29 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18287,7 +18287,7 @@ async function deployLocalStack(workspacePath, opts = {}) {
|
|
|
18287
18287
|
);
|
|
18288
18288
|
if (!envContent.endsWith("\n")) envContent += "\n";
|
|
18289
18289
|
(0, import_fs5.writeFileSync)(envPath, envContent, { encoding: "utf-8" });
|
|
18290
|
-
const imageTag = opts.gpu ? "latest-gpu" : opts.embeddings ? "latest-embeddings" : "latest";
|
|
18290
|
+
const imageTag = opts.gpu ? "latest-embeddings-gpu" : opts.embeddings ? "latest-embeddings" : "latest";
|
|
18291
18291
|
const cortexImage = `ghcr.io/rodrigoroldan/cortex-context:${imageTag}`;
|
|
18292
18292
|
try {
|
|
18293
18293
|
(0, import_child_process.execSync)(
|
|
@@ -18321,7 +18321,7 @@ async function upgradeLocalStack(workspacePath, opts = {}) {
|
|
|
18321
18321
|
error: `docker-compose.local.yml not found in ${workspacePath}. Run: cortex-context server`
|
|
18322
18322
|
};
|
|
18323
18323
|
}
|
|
18324
|
-
const imageTag = opts.gpu ? "latest-gpu" : opts.embeddings ? "latest-embeddings" : "latest";
|
|
18324
|
+
const imageTag = opts.gpu ? "latest-embeddings-gpu" : opts.embeddings ? "latest-embeddings" : "latest";
|
|
18325
18325
|
const cortexImage = `ghcr.io/rodrigoroldan/cortex-context:${imageTag}`;
|
|
18326
18326
|
const composeCmd = `docker compose --project-name cortex-local -f "${composePath}"`;
|
|
18327
18327
|
try {
|
|
@@ -28180,10 +28180,10 @@ async function serverCommand(options) {
|
|
|
28180
28180
|
" Installs and starts the Cortex stack (Neo4j + Cortex API) via Docker."
|
|
28181
28181
|
)
|
|
28182
28182
|
);
|
|
28183
|
-
if (options.
|
|
28183
|
+
if (options.embeddingsGpu) {
|
|
28184
28184
|
console.log(
|
|
28185
28185
|
source_default.dim(
|
|
28186
|
-
" Mode: gpu (sentence-transformers + PyTorch CUDA, ~2 GB image \u2014 requer nvidia GPU no host)"
|
|
28186
|
+
" Mode: embeddings-gpu (sentence-transformers + PyTorch CUDA, ~2 GB image \u2014 requer nvidia GPU no host)"
|
|
28187
28187
|
)
|
|
28188
28188
|
);
|
|
28189
28189
|
} else if (options.embeddings) {
|
|
@@ -28373,7 +28373,7 @@ async function serverCommand(options) {
|
|
|
28373
28373
|
console.log("");
|
|
28374
28374
|
const startResult = await deployLocalStack(workDir, {
|
|
28375
28375
|
embeddings: options.embeddings ?? false,
|
|
28376
|
-
gpu: options.
|
|
28376
|
+
gpu: options.embeddingsGpu ?? false,
|
|
28377
28377
|
token: serverToken
|
|
28378
28378
|
});
|
|
28379
28379
|
console.log("");
|
|
@@ -28421,13 +28421,21 @@ async function serverCommand(options) {
|
|
|
28421
28421
|
` cortex-context init --url ${CORTEX_URL2} --token ${serverToken}`
|
|
28422
28422
|
)
|
|
28423
28423
|
);
|
|
28424
|
+
console.log(source_default.dim(" 2. Check connectivity:"));
|
|
28425
|
+
console.log(source_default.cyan(" cortex-context doctor"));
|
|
28426
|
+
console.log("");
|
|
28427
|
+
console.log(source_default.dim(" To rotate the token later:"));
|
|
28428
|
+
console.log(source_default.cyan(" cortex-context token --rotate"));
|
|
28424
28429
|
} else {
|
|
28425
28430
|
console.log(source_default.bold(" Next steps:"));
|
|
28426
28431
|
console.log(source_default.dim(" 1. Initialize your workspace:"));
|
|
28427
28432
|
console.log(source_default.cyan(` cortex-context init --url ${CORTEX_URL2}`));
|
|
28433
|
+
console.log(source_default.dim(" 2. Check connectivity:"));
|
|
28434
|
+
console.log(source_default.cyan(" cortex-context doctor"));
|
|
28435
|
+
console.log("");
|
|
28436
|
+
console.log(source_default.dim(" To add a token later:"));
|
|
28437
|
+
console.log(source_default.cyan(" cortex-context token --rotate"));
|
|
28428
28438
|
}
|
|
28429
|
-
console.log(source_default.dim(" 2. Check connectivity:"));
|
|
28430
|
-
console.log(source_default.cyan(" cortex-context doctor"));
|
|
28431
28439
|
console.log("");
|
|
28432
28440
|
console.log(source_default.dim(" To stop the stack:"));
|
|
28433
28441
|
console.log(source_default.dim(" docker compose -f docker-compose.local.yml down"));
|
|
@@ -28777,6 +28785,18 @@ async function tokenCommand(options) {
|
|
|
28777
28785
|
console.log(
|
|
28778
28786
|
source_default.green(newToken ? " \u2713 Token updated" : " \u2713 Token cleared")
|
|
28779
28787
|
);
|
|
28788
|
+
if (newToken) {
|
|
28789
|
+
const config3 = readConfig();
|
|
28790
|
+
console.log("");
|
|
28791
|
+
console.log(
|
|
28792
|
+
source_default.dim(" Re-initialize your workspace to update MCP config:")
|
|
28793
|
+
);
|
|
28794
|
+
console.log(
|
|
28795
|
+
source_default.cyan(
|
|
28796
|
+
` cortex-context init --url ${config3.url ?? "http://localhost:8082"} --token ${newToken}`
|
|
28797
|
+
)
|
|
28798
|
+
);
|
|
28799
|
+
}
|
|
28780
28800
|
console.log("");
|
|
28781
28801
|
await applyTokenRestart();
|
|
28782
28802
|
console.log("");
|
|
@@ -28982,8 +29002,8 @@ function createCli() {
|
|
|
28982
29002
|
"--embeddings",
|
|
28983
29003
|
"Use the embeddings-enabled image (includes sentence-transformers + all-MiniLM-L6-v2, ~1.5 GB)"
|
|
28984
29004
|
).option(
|
|
28985
|
-
"--gpu",
|
|
28986
|
-
"Use the GPU image (
|
|
29005
|
+
"--embeddings-gpu",
|
|
29006
|
+
"Use the embeddings GPU image (sentence-transformers + PyTorch CUDA, ~2 GB \u2014 requires nvidia GPU on host)"
|
|
28987
29007
|
).action(serverCommand);
|
|
28988
29008
|
program3.command("sync").description("Ingest latest git diff into the Cortex Knowledge Graph").option("--repo <path>", "Repository path (defaults to current directory)").option("--dry-run", "Show diff without sending to Cortex API").action(syncCommand);
|
|
28989
29009
|
program3.command("update").description(
|