logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt
How to install mksglu/context-mode. Official installation instructions. Project installation guide. Framework or library installation. Build installation instructions. How to setup and install from GitHub. Installation steps and setup instructions. Official docs and installation instructions GitHub.

mksglu/context-mode Installation Guide

How to install mksglu/context-mode. Official project installation instructions and setup guide.

Automated Install (Recommended)

Quick installation instructions for mksglu/context-mode. This is the fastest way to complete project installation and setup.

Install via curl

curl -fsSL https://hexmos.com/ipm-install | bash && 
ipm i mksglu/context-mode
or

Install via npx

npx @hexmos/ipm i mksglu/context-mode

Prerequisites

Node.js

runtime

Version: >=18+

npm

package_manager

Manual Installation Methods

Manual installation instructions. How to install from GitHub source.

Claude Code

/plugin marketplace add mksglu/context-mode

/plugin install context-mode@context-mode

/reload-plugins

/context-mode:ctx-doctor

Gemini CLI

npm install -g context-mode

echo '{ "mcpServers": { "context-mode": { "command": "context-mode" } }, "hooks": { "BeforeTool": [ { "matcher": "run_shell_command|read_file|read_many_files|grep_search|search_file_content|web_fetch|activate_skill|mcp__plugin_context-mode", "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli beforetool" }] } ], "AfterTool": [ { "matcher": "", "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli aftertool" }] } ], "PreCompress": [ { "matcher": "", "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli precompress" }] } ], "SessionStart": [ { "matcher": "", "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli sessionstart" }] } ] } }' > ~/.gemini/settings.json

/mcp list

VS Code Copilot

npm install -g context-mode

mkdir -p .vscode && echo '{ "servers": { "context-mode": { "command": "context-mode" } } }' > .vscode/mcp.json

mkdir -p .github/hooks && echo '{ "hooks": { "PreToolUse": [ { "type": "command", "command": "context-mode hook vscode-copilot pretooluse" } ], "PostToolUse": [ { "type": "command", "command": "context-mode hook vscode-copilot posttooluse" } ], "SessionStart": [ { "type": "command", "command": "context-mode hook vscode-copilot sessionstart" } ] } }' > .github/hooks/context-mode.json

ctx stats

Cursor

npm install -g context-mode

mkdir -p .cursor && echo '{ "mcpServers": { "context-mode": { "command": "context-mode" } } }' > .cursor/mcp.json

mkdir -p .cursor && echo '{ "version": 1, "hooks": { "preToolUse": [ { "command": "context-mode hook cursor pretooluse", "matcher": "Shell|Read|Grep|WebFetch|Task|MCP:ctx_execute|MCP:ctx_execute_file|MCP:ctx_batch_execute" } ], "postToolUse": [ { "command": "context-mode hook cursor posttooluse" } ], "stop": [ { "command": "context-mode hook cursor stop" } ] } }' > .cursor/hooks.json

mkdir -p .cursor/rules && cp node_modules/context-mode/configs/cursor/context-mode.mdc .cursor/rules/context-mode.mdc

ctx stats

OpenCode

npm install -g context-mode

echo '{ "$schema": "https://opencode.ai/config.json", "mcp": { "context-mode": { "type": "local", "command": ["context-mode"] } }, "plugin": ["context-mode"] }' > opencode.json

cp node_modules/context-mode/configs/opencode/AGENTS.md AGENTS.md

ctx stats

KiloCode

npm install -g context-mode

echo '{ "$schema": "https://app.kilo.ai/config.json", "mcp": { "context-mode": { "type": "local", "command": ["context-mode"] } }, "plugin": ["context-mode"] }' > kilo.json

cp node_modules/context-mode/configs/opencode/AGENTS.md AGENTS.md

ctx stats

OpenClaw / Pi Agent

git clone https://github.com/mksglu/context-mode.git

cd context-mode

npm run install:openclaw

ctx stats

Codex CLI

npm install -g context-mode

echo '[mcp_servers.context-mode]
command = "context-mode"' >> ~/.codex/config.toml

mkdir -p ~/.codex && echo '{ "hooks": { "PreToolUse": [{ "hooks": [{ "type": "command", "command": "context-mode hook codex pretooluse" }] }], "PostToolUse": [{ "hooks": [{ "type": "command", "command": "context-mode hook codex posttooluse" }] }], "SessionStart": [{ "hooks": [{ "type": "command", "command": "context-mode hook codex sessionstart" }] }] } }' > ~/.codex/hooks.json

cp node_modules/context-mode/configs/codex/AGENTS.md ~/.codex/AGENTS.md

ctx stats

Antigravity

npm install -g context-mode

mkdir -p ~/.gemini/antigravity && echo '{ "mcpServers": { "context-mode": { "command": "context-mode" } } }' > ~/.gemini/antigravity/mcp_config.json

cp node_modules/context-mode/configs/antigravity/GEMINI.md ./GEMINI.md

ctx stats

Kiro

npm install -g context-mode

mkdir -p .kiro/settings && echo '{ "mcpServers": { "context-mode": { "command": "context-mode" } } }' > .kiro/settings/mcp.json

mkdir -p .kiro/hooks && echo '{ "name": "context-mode", "description": "Context-mode hooks for context window protection", "hooks": { "preToolUse": [ { "matcher": "*", "command": "context-mode hook kiro pretooluse" } ], "postToolUse": [ { "matcher": "*", "command": "context-mode hook kiro posttooluse" } ] } }' > .kiro/hooks/context-mode.json

cp node_modules/context-mode/configs/kiro/KIRO.md ./KIRO.md

ctx stats

Zed

npm install -g context-mode

echo '{ "context_servers": { "context-mode": { "command": { "path": "context-mode" } } } }' > ~/.config/zed/settings.json

cp node_modules/context-mode/configs/zed/AGENTS.md ./AGENTS.md

ctx stats

Pi Coding Agent

git clone https://github.com/mksglu/context-mode.git ~/.pi/extensions/context-mode

cd ~/.pi/extensions/context-mode

npm install

npm run build

echo '{ "mcpServers": { "context-mode": { "command": "node", "args": ["/home/youruser/.pi/extensions/context-mode/node_modules/context-mode/start.mjs"] } } }' > ~/.pi/agent/mcp.json

ctx stats

Build Prerequisites (CentOS 8 / RHEL 8)

dnf install -y gcc-toolset-10-gcc gcc-toolset-10-gcc-c++ make python3 python3-setuptools

scl enable gcc-toolset-10 'npm install -g context-mode'

Build Prerequisites (CentOS 7 / RHEL 7)

yum install -y centos-release-scl

yum install -y devtoolset-10-gcc devtoolset-10-gcc-c++ make python3

pip3 install setuptools

scl enable devtoolset-10 'npm install -g context-mode'

Build Prerequisites (Alpine Linux)

apk add build-base python3 py3-setuptools

npm install -g context-mode

Source Installation (Generic)

git clone https://github.com/mksglu/context-mode.git

cd context-mode

npm install

npm run build