Getting Started with CodeLogician
CodeLogician helps AI coding agents reason about complex software using math and logic.
Instead of relying purely on statistical reasoning from LLMs, CodeLogician introduces a logical reasoning layer that can:
- discover edge cases
- verify system invariants
- explore behavioral boundaries
- generate high-coverage test cases
Choose Your Interface
CodeLogician can be used through several interfaces depending on your workflow.
| Interface | Target users | Code Evaluation | Autoformalization Agent | TUI |
|---|---|---|---|---|
| codelogician CLI | Developers and agents | ✅ (multi-file) | ✅ | ✅ |
| VS Code extension | Developers (IDE workflow) | — | ✅ | — |
| MCP server | Agent frameworks | — | ✅ | — |
| Python library | Advanced automation | ✅ | ✅ | — |
Recommended starting point: codelogician CLI
This lightweight shell interface lets coding agents invoke CodeLogician without installing Python dependencies.
Install the Full CLI
To install the full CodeLogician CLI:
curl -fsSL codelogician.dev/codelogician/install.sh | shOr install with pip (requires Python 3.12+):
pip install codelogicianThen verify the installation:
codelogician --helpTypical CodeLogician Workflows
CodeLogician supports three core workflows.
1. Direct CLI Workflow
Invoke reasoning tools directly from the command line.
Typical steps:
- Learn the IML language using
codelogician doc - Convert source code into formal models
- Run reasoning with the
evalcommand - Inspect proofs, counterexamples, and artifacts
2. Agent Workflow
Use the CodeLogician autoformalization agent to translate source code into analyzable models.
Examples:
codelogician agent PATH_TO_FILEor
codelogician multiagent PATH_TO_DIRECTORYThis allows coding agents to iteratively refine models and reasoning results.
3. Server Workflow
Run CodeLogician as an interactive reasoning server.
This mode supports:
- continuous formalization
- multi-agent orchestration
- live system analysis
The server can be used together with the TUI interface for interactive exploration.
Using CodeLogician from your AI tool
Tools like Cursor, Gemini, Claude, and any MCP-compatible agent framework can connect to CodeLogician directly — no CLI invocation required.
The CodeLogician MCP server exposes the Agent and Server workflows as structured tool calls, letting your AI tool drive reasoning, formalization, and analysis from within its own interface.
Install the MCP server from Imandra Universe, then connect it to your tool of choice.
→ See: MCP Server docs
What CodeLogician Provides
CodeLogician combines LLM generation with logical reasoning.
Key capabilities include:
- Automated reasoning using the ImandraX engine
- Formal verification of critical logic
- Counterexample discovery when assumptions fail
- Behavioral decomposition of complex systems
- Test generation based on real execution boundaries
Next Steps
Continue learning how to use CodeLogician:
- Quickstart — run CodeLogician in under a minute
- Guides — practical workflows with AI coding agents
- Tutorials — step-by-step walkthroughs
- Interfaces — choose the right interface for your workflow