🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

@cortex-context/cli

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cortex-context/cli

CLI to initialize and manage Cortex Context (Knowledge Graph) in any VS Code workspace

latest
Source
npmnpm
Version
0.0.21
Version published
Maintainers
1
Created
Source

cortex-context CLI

npm version CI License: MIT Node.js 18+

CLI to initialize and manage Cortex Context (Knowledge Graph) tooling in any VS Code workspace.

Installs:

  • Skills — VS Code Copilot Agent skills for Cortex (cortex-research, cortex-dimensions, cortex-ingest, generate-spec)
  • MCP Server — TypeScript stdio server exposing Cortex tools to GitHub Copilot (bundled — no Python needed)
  • VS Code Config — Injects cortex entry into .vscode/mcp.json

Requirements

Installation

# Install globally
npm install -g @cortex-context/cli

# Or run directly without installing
npx @cortex-context/cli init

Usage

# Initialize Cortex Context in the current workspace
cortex-context init

# Initialize with specific options (non-interactive)
cortex-context init --url http://localhost:8082 --token <your-token>

# Initialize in a specific workspace folder
cortex-context init --workspace /path/to/your/workspace

# Sync Skills/MCP to latest bundled version
cortex-context sync

# Preview what sync would change
cortex-context sync --dry-run

# Validate installation and connectivity
cortex-context doctor

What init Does

  • Prompts for Cortex server URL and optional API token
  • Tests connectivity to the Cortex server
  • Copies Skills into {workspace}/.github/skills/
  • Injects cortex entry into {workspace}/.vscode/mcp.json (uses npx @cortex-context/cli mcp-serve)
  • Saves configuration to ~/.cortex-context/config.json

After Init

# Reload VS Code (Cmd/Ctrl+Shift+P → "Reload Window")
# Then run doctor to verify:
cortex-context doctor

Commands

Workspace setup

CommandDescription
cortex-context initFull interactive setup (Skills, MCP, hooks, rules)
cortex-context updateUpdate Skills + MCP files to latest bundled version
cortex-context update --dry-runPreview update changes without writing files
cortex-context syncIngest latest git diff into the Cortex Knowledge Graph
cortex-context sync --dry-runShow diff without sending to Cortex API
cortex-context doctorValidate installation + test Cortex connectivity
cortex-context uninstallRemove Cortex Context from the workspace

Local server

CommandDescription
cortex-context serverInstall Docker (if needed) and start Neo4j + Cortex API locally
cortex-context server --embeddingsStart with embeddings image (sentence-transformers, CPU, ~1.5 GB)
cortex-context server --embeddings-gpuStart with embeddings GPU image (PyTorch CUDA, ~2 GB — requires nvidia)
cortex-context upgradePull latest Cortex backend image and restart the local stack
cortex-context upgrade --embeddingsUpgrade using the embeddings image variant
cortex-context upgrade --embeddings-gpuUpgrade using the embeddings GPU image variant (PyTorch CUDA, ~2 GB — requires nvidia)
cortex-context upgrade --pull-onlyPull latest image without recreating the container
cortex-context downgradeSwitch to the base image variant (lightest, no embeddings)
cortex-context downgrade --embeddingsSwitch to the CPU embeddings variant (lighter than GPU)

Token management

CommandDescription
cortex-context tokenShow current API token (masked)
cortex-context token --showReveal the full token
cortex-context token --rotateGenerate a new random token, save it, and restart stack
cortex-context token --set <val>Set a specific token value (empty string clears auth)

Advanced

CommandDescription
cortex-context resetWipe all nodes and relationships from the Knowledge Graph
cortex-context mcp-serveStart the MCP server over stdio (used internally by VS Code/Cursor)

Options (init)

FlagDescription
--url <url>Cortex server URL (skips prompt)
--token <tok>API token (skips prompt)
--workspaceTarget workspace path (default: cwd)
--localDeploy a local Cortex stack with Docker (mutually exclusive with --url)
--skip-mcpDon't configure MCP server
--skip-skillsDon't install Skills
--skip-hooksDon't install git hooks
--skip-rulesDon't inject Copilot/Cursor rules
--forceOverwrite existing files without prompting

Contributing

Contributions are welcome! Please read CONTRIBUTING.md before opening a pull request.

Found a bug? Open a bug report.
Have an idea? Open a feature request.

License

MIT

Keywords

cortex

FAQs

Package last updated on 16 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts