
clx
Updated 4d agoby blackaxgit
CLX - Coding-Agent Extension Layer
Note: Currently supports macOS (Apple Silicon / ARM64) only.
Intelligent command validation and context persistence for coding agents. CLX supports Claude Code, Codex CLI, and Cursor (see Supported Hosts for what each host can and cannot enforce).
Features
-
Command Validation - Two-layer validation system:
- Layer 0: Fast deterministic whitelist/blacklist rules (~1ms)
- Layer 1: LLM-based risk assessment via Ollama (~100-300ms)
-
Context Persistence - SQLite-based storage with semantic search:
- Automatic snapshots before context compression
- Vector embeddings for semantic recall
- Session history and analytics
-
Auto-Recall - Automatic context injection on every prompt:
- Hybrid search: semantic (sqlite-vec) + FTS5 full-text
- Relevant past sessions injected as
additionalContext - Configurable thresholds, timeouts, and result limits
- Graceful degradation: Ollama down β FTS5 fallback β orchestrator-only
-
User Learning - Adapts to your workflow:
- Tracks approved/denied commands
- Auto-generates rules based on usage patterns
-
MCP Tools - the host agent can access (Claude Code, Codex CLI, Cursor):
clx_recall- Search historical contextclx_remember- Explicitly save informationclx_checkpoint- Create manual snapshotsclx_rules- Manage validation rulesclx_session_info- Get current session detailsclx_credentials- Manage stored provider credentialsclx_stats- Report usage and storage statistics
Supported Hosts
CLX installs into three coding-agent hosts. MCP tools and instructions injection work fully on all three; command gating differs by host because each host exposes a different hook surface.
| Host | Command gating | Instructions injection | MCP tools |
|---|---|---|---|
| Claude Code | Full CLI gating: PreToolUse allow / deny / ask enforced on every tool call | ~/.claude/CLAUDE.md | Full (7 tools) |
| Codex CLI | Interactive-only, best-effort guardrail: allow / deny in interactive Codex sessions; no ask channel | ~/.codex/AGENTS.md (with AGENTS.override.md fallback) | Full (7 tools) |
| Cursor | IDE agent and cloud agents only: beforeShellExecution / beforeMCPExecution with failClosed: true; the local cursor-agent CLI runs no hooks | <repo>/.cursor/rules/clx.mdc | Full (7 tools) |
Codex caveat: Command validation is a guardrail, not a complete enforcement boundary (OpenAI's wording); it applies to interactive Codex sessions, not codex exec automation, and ask is mapped to deny pending Codex ask support.
Cursor caveat: Command gating fires in the IDE agent and cloud agents only; the cursor-agent local CLI does not run hooks.
Quick Install
macOS (Homebrew)
brew tap blackaxgit/clx
brew install clx
This installs clx, clx-hook, and clx-mcp. To update:
brew update && brew upgrade clx
Install with Claude Code
Let Claude handle the entire setup. You just need macOS, Ollama, and Rust installed.
1. Make sure Ollama is running:
ollama serve
2. Paste this into Claude Code:
Related servers

n8n
Updated todayby n8n-io
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

mcp-server-fetch
OfficialUpdated 14d agoA Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

@modelcontextprotocol/server-everything
OfficialUpdated 14d agoMCP server that exercises all the features of the MCP protocol