CodeattheSpeedofThought.

A model-agnostic AI coding assistant with a high-performance C++ engine and a Python-powered LLM brain. Right in your terminal.

cliq-code — terminal session
$
Run:
Modular Engine

An Asymmetrical Bento Grid of Capabilities

Any LLM Provider

Powered by LiteLLM. Hot-swap models on the fly without changing a single line of logic. Use Google Gemini, OpenAI, Anthropic Claude, Llama, DeepSeek, or run completely private local models via Ollama.

Google GeminiRecommended
OpenAI GPT-4o
Claude 3.5 Sonnet
Ollama Llama 3.1
DeepSeek Coder

Codebase Explorer

Active directory scanning with safe file boundary traversal. Navigate, find keywords, grep, and locate code symbols instantly.

cliq-code
src_cpp
CMakeLists.txt
1.2 KB
include/cliq-code
engine
src_python
main.py
8.5 KB
brain.py
6.2 KB
safety.py
4.8 KB
ui.py
5.5 KB
pyproject.toml
840 B
README.md
4.8 KB

Context Compactor

Tracks full session conversations in JSONL. Automatically compacts long discussions when context windows exceed limits, preserving key data.

CONTEXT CAPACITY95% (7,780/8,192 tokens)
User: write login controller...
AI: created login controller...
User: mock test for that...
17 Core Modules

C++ High-Performance Engine

A native C++20 engine running under the Python shell via pybind11 bindings. Ensures lightning-fast system calls, secure boundary validation pipelines, and system checks in milliseconds.

file_ops.hpp
File read, write, edit, glob & grep with boundary enforcement
command_exec.hpp
Win32/POSIX shell execution engine
permission_enforcer.hpp
5-mode active permission system
bash_validation.hpp
Validates commands against validation pipelines
permissions.hpp
Rule-based security policy parser
session.hpp
Conversation state serialization & JSONL persistence
compact.hpp
AI session context management & auto-compaction
usage.hpp
Token tracking and dynamic API cost estimation
json.hpp
High-performance, zero-dependency JSON parser
sse.hpp
Server-Sent Events streaming response parser
hooks.hpp
Pre/post tool-use and validation interceptor hooks
config.hpp
Multi-source config loader (Global, Project, Local overrides)
bootstrap.hpp
Startup sequence, diagnostic & compiler checks
task_registry.hpp
Sub-agent execution registries
team_cron_registry.hpp
Team coordination & cron task scheduling
sandbox.hpp
Containerized environment detection (Docker/K8s/CI)
directory_walker.hpp
Extremely fast multi-threaded file system crawler
System Design

Interactive System Architecture

CLIQ Code splits its responsibilities between a developer-friendly Python shell and a locked-down, high-performance C++ engine, linked via pybind11. Click on components to examine source file mappings.

Layer 1

Your Terminal

Developer inputs natural queries. Outputs markdown-styled git diff previews and confirmation prompts.

Layer 2

Python Frontend

LiteLLM brain routes prompts to Gemini/GPT/Claude. Manages REPL loops, interactive user input, and safety caches.

Layer 3

pybind11 Bridge

Compiles C++ bindings natively into Python modules, offering zero-cost conversion overlays for system parameters.

Layer 4

C++ Engine

17 modules governing permission policies, Docker detection, bash command validators, context compaction, and JSONL logging.

C++ Core Modules Detail

The core engine handles physical operations. Compiling to native binary guarantees memory boundaries, lightning-fast regex traversing for grep commands, and strict permission sandboxing.

  • • 17 modules for compartmentalized tasks
  • • Boundary safety filters prevent directory escapes (../)
  • • Docker sandbox detection triggers automated restricted read-only levels
// src_cpp/include/cliq-code/permission_enforcer.hpp
enum class PermissionMode {
READ_ONLY, WORKSPACE_WRITE, PROMPT, ALLOW, DANGER_FULL
};
bool enforce(const std::string& operation, PermissionMode mode);
Security Guard

The 5-Layered Security Catch

Safety is paramount when giving AI agents console access. Select a permission level below to check how the C++ Engine intercepts and restricts operations in real time.

Selected: Workspace-Write

Enables read-write permissions, but only within the initialized project boundaries.

.fliq/settings.json
Active Settings
{ "permissionMode": "workspace-write", "permissions": { "allow": ["Read(*)", "Write(workspace/*)"], "deny": ["Bash(rm -rf *)", "Write(outside_workspace/*)"], "ask": ["Bash(*)"] } }
C++ Boundary Interceptor

Requests modifying files outside active workspace are filtered and rejected. Execution of destructive bash triggers safety catch.

Get Started

Installation & Setup

Launch CLIQ Code in less than 2 minutes. Install Python prerequisites, set your AI environment keys, and run the agent script directly.

Step 1: Download Pre-compiled Binary

Download cliq-code.exe

Download the standalone binary directly. Move it to an installation folder (e.g. C:\Program Files\cliq-code) and append that directory path to your system's PATH environment variable.

Step 2: Configure Environment Keys

# Windows (PowerShell - permanent user profile setting):
[System.Environment]::SetEnvironmentVariable("GEMINI_API_KEY", "your-api-key-here", "User")

# macOS/Linux (Bash - append to ~/.bashrc):
export GEMINI_API_KEY="your-api-key-here"

Step 3: Launch CLIQ Code

cliq-code

Codebase Audit Statistics

17
C++ Headers
~37 KB
17
C++ Implementations
~122 KB
1
C++ Test Suite
~6 KB
1
pybind11 Bridge
~5 KB
6
Python Frontend
~25 KB
Aggregated footprint: 42 Files / ~195 KB native payloadTested with MSVC, GCC 10+, Clang 10+