@cortex-context/cli 0.0.18 → 0.0.20

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 CHANGED
@@ -68,23 +68,58 @@ cortex-context doctor
68
68
 
69
69
  ## Commands
70
70
 
71
- | Command | Description |
72
- | ------------------------------- | ------------------------------------------------ |
73
- | `cortex-context init` | Full interactive setup |
74
- | `cortex-context sync` | Update Skills + MCP to latest bundled version |
75
- | `cortex-context sync --dry-run` | Preview sync changes |
76
- | `cortex-context doctor` | Validate installation + test Cortex connectivity |
71
+ ### Workspace setup
72
+
73
+ | Command | Description |
74
+ | --------------------------------- | ------------------------------------------------------ |
75
+ | `cortex-context init` | Full interactive setup (Skills, MCP, hooks, rules) |
76
+ | `cortex-context update` | Update Skills + MCP files to latest bundled version |
77
+ | `cortex-context update --dry-run` | Preview update changes without writing files |
78
+ | `cortex-context sync` | Ingest latest git diff into the Cortex Knowledge Graph |
79
+ | `cortex-context sync --dry-run` | Show diff without sending to Cortex API |
80
+ | `cortex-context doctor` | Validate installation + test Cortex connectivity |
81
+ | `cortex-context uninstall` | Remove Cortex Context from the workspace |
82
+
83
+ ### Local server
84
+
85
+ | Command | Description |
86
+ | ---------------------------------------- | ----------------------------------------------------------------------- |
87
+ | `cortex-context server` | Install Docker (if needed) and start Neo4j + Cortex API locally |
88
+ | `cortex-context server --embeddings` | Start with embeddings image (sentence-transformers, CPU, ~1.5 GB) |
89
+ | `cortex-context server --embeddings-gpu` | Start with embeddings GPU image (PyTorch CUDA, ~2 GB — requires nvidia) |
90
+ | `cortex-context upgrade` | Pull latest Cortex backend image and restart the local stack |
91
+ | `cortex-context upgrade --embeddings` | Upgrade using the embeddings image variant |
92
+ | `cortex-context upgrade --pull-only` | Pull latest image without recreating the container |
93
+
94
+ ### Token management
95
+
96
+ | Command | Description |
97
+ | ---------------------------------- | ------------------------------------------------------- |
98
+ | `cortex-context token` | Show current API token (masked) |
99
+ | `cortex-context token --show` | Reveal the full token |
100
+ | `cortex-context token --rotate` | Generate a new random token, save it, and restart stack |
101
+ | `cortex-context token --set <val>` | Set a specific token value (empty string clears auth) |
102
+
103
+ ### Advanced
104
+
105
+ | Command | Description |
106
+ | -------------------------- | ------------------------------------------------------------------- |
107
+ | `cortex-context reset` | Wipe all nodes and relationships from the Knowledge Graph |
108
+ | `cortex-context mcp-serve` | Start the MCP server over stdio (used internally by VS Code/Cursor) |
77
109
 
78
110
  ## Options (init)
79
111
 
80
- | Flag | Description |
81
- | --------------- | ------------------------------------ |
82
- | `--url <url>` | Cortex server URL (skips prompt) |
83
- | `--token <tok>` | API token (skips prompt) |
84
- | `--workspace` | Target workspace path (default: cwd) |
85
- | `--skip-mcp` | Don't install MCP server |
86
- | `--skip-skills` | Don't install Skills |
87
- | `--force` | Overwrite existing files |
112
+ | Flag | Description |
113
+ | --------------- | ------------------------------------------------------------------------- |
114
+ | `--url <url>` | Cortex server URL (skips prompt) |
115
+ | `--token <tok>` | API token (skips prompt) |
116
+ | `--workspace` | Target workspace path (default: cwd) |
117
+ | `--local` | Deploy a local Cortex stack with Docker (mutually exclusive with `--url`) |
118
+ | `--skip-mcp` | Don't configure MCP server |
119
+ | `--skip-skills` | Don't install Skills |
120
+ | `--skip-hooks` | Don't install git hooks |
121
+ | `--skip-rules` | Don't inject Copilot/Cursor rules |
122
+ | `--force` | Overwrite existing files without prompting |
88
123
 
89
124
  ## Contributing
90
125
 
package/dist/index.js CHANGED
@@ -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("");
@@ -28877,7 +28897,7 @@ async function upgradeCommand(options) {
28877
28897
  console.log("");
28878
28898
  process.exit(1);
28879
28899
  }
28880
- const imageTag = options.embeddings ? "latest-embeddings" : "latest";
28900
+ const imageTag = options.embeddingsGpu ? "latest-embeddings-gpu" : options.embeddings ? "latest-embeddings" : "latest";
28881
28901
  const cortexImage = `ghcr.io/rodrigoroldan/cortex-context:${imageTag}`;
28882
28902
  console.log(source_default.dim(` Target image: ${cortexImage}`));
28883
28903
  console.log(source_default.dim(` Compose dir: ${workDir}`));
@@ -28912,7 +28932,8 @@ async function upgradeCommand(options) {
28912
28932
  return;
28913
28933
  }
28914
28934
  const result = await upgradeLocalStack(workDir, {
28915
- embeddings: options.embeddings
28935
+ embeddings: options.embeddings,
28936
+ gpu: options.embeddingsGpu
28916
28937
  });
28917
28938
  if (!result.upgraded) {
28918
28939
  console.error(source_default.red(` \u2717 Upgrade failed: ${result.error}`));
@@ -29014,6 +29035,9 @@ function createCli() {
29014
29035
  "--dir <path>",
29015
29036
  "Directory with docker-compose.local.yml (defaults to ~/.cortex-context)"
29016
29037
  ).option("--embeddings", "Use the embeddings-enabled image variant").option(
29038
+ "--embeddings-gpu",
29039
+ "Use the embeddings GPU image variant (PyTorch CUDA, ~2 GB \u2014 requires nvidia)"
29040
+ ).option(
29017
29041
  "--pull-only",
29018
29042
  "Pull the latest image without recreating the container"
29019
29043
  ).action(upgradeCommand);