CodAI documentation
Install, configure, and operate CodAI — the portable, privacy-focused offline AI coding assistant for students, university lab exams, restricted networks, and software developers. v3.0.0 · 100% offline.
Overview & Why CodAI?
CodAI v3.0 is a free, fully offline AI coding assistant designed specifically for computer science students, educational computer laboratories, exam centers, and security-restricted development environments.
100% Offline AI Execution
All neural network inference occurs strictly on your local CPU. Zero internet connection or mobile hotspot required.
Plug & Play USB Portability
Run directly from any flash drive. No administrator privileges, installer wizards, or registry alterations needed.
Strict Air-Gapped Privacy
Zero telemetry, zero cloud logging, and zero data harvesting. Your exam code and intellectual property never leave the machine.
Low-Spec Machine Optimized
Operates efficiently on 2GB–4GB RAM systems. Smooth performance on older lab computers without dedicated GPUs.
| Feature / Requirement | CodAI v3.0 | Cloud AI (ChatGPT / Copilot) |
|---|---|---|
| Internet Connectivity | None Required (100% Offline) | Mandatory Constant Connection |
| Admin Rights for Installation | Not Required (Portable USB) | Requires Admin / Browser Sync |
| Lab & Exam Friendly | Permitted in Air-Gapped Labs | Blocked by Firewalls / Rules |
| Code Privacy & IP Protection | Zero Telemetry (100% Private) | Logged on External Cloud Servers |
| Pricing / Subscription | 100% Free & Open Source (GPL-3.0) | $10 – $20 / month recurring |
System Requirements & Prerequisites
CodAI was built with lightweight quantized runtime configurations, allowing it to perform with low latency on typical university student laptops and institution desktops.
Minimum Requirements (Entry Hardware)
- Operating System:Windows 10 (64-bit), macOS 12+, or Linux 5.10+
- RAM / Memory:2GB minimum (4GB recommended)
- Processor (CPU):Dual-Core 2.0GHz Intel / AMD (AVX2 supported)
- Disk Space:2GB free storage space for runtime & model weights
- GPU:None required (executes purely on CPU)
Recommended Requirements (Optimal Speed)
- Operating System:Windows 11 (64-bit), macOS Sequoia / Sonoma, Ubuntu 24.04
- RAM / Memory:8GB or higher
- Processor (CPU):Quad-Core 2.5GHz+ or Apple Silicon (M1/M2/M3/M4)
- Disk Space:4GB+ SSD storage for instant warm boot
- GPU Acceleration:Optional Vulkan, CUDA, or Apple Metal API
Installation & Setup Options
Choose the method that best matches your workflow: a single-click portable executable for student lab environments, or source-code setup for developers.
Option 1: Portable Executable (No Admin Rights Needed)
The portable bundle packages the Codai.exe controller, the official llama-server engine, run.bat/kill.bat helpers, and your weights into a ready-to-run folder.
- Download the latest release zip: CodaiPro-v3.0.0-Portable-Windows.zip
- Extract the contents to your USB flash drive or desktop directory.
- Double-click
Codai.exeto launch immediately.
Option 2: Developer Python Setup (Source Code)
Ideal for developers who want to customize prompts, inspect the controller, or modify the engine configuration.
Option 3: Building from Source with PyInstaller
Generate your own standalone distributable package using the automated build script.
Codai.exe, bundled with the engine into one portable folderStudent & Lab Exam Workflow
College and university computer labs frequently enforce air-gapped policies, disable public web browsing, and restrict user accounts from running installers. Here is how CodAI addresses every restriction.
Prepare USB at Home
Download and extract CodAI onto an NTFS or FAT32 USB flash drive. Test-run it once on your personal PC to ensure models and cache are primed.
Plug Into Lab Workstation
Insert your USB stick into the lab PC. Open file explorer, locate the Codai folder, and run run.bat.
Code with Zero Internet
Use AI generation, instant bug diagnosis, and code explanations. When finished, simply close the window—no artifacts or registry entries remain on the lab PC.
Information for University IT & Lab Administrators
CodAI was built with student privacy and institution compliance at its core:
- No outbound network traffic: Firewall logs remain completely clean.
- Single instance mutex: Prevents multiple competing processes from overloading student PCs.
- Non-intrusive: No administrative privileges required; clean unlinking on process termination.
Core AI Capabilities & How to Use
CodAI provides four foundational AI coding workflows designed to speed up learning and software development:
1. AI Code Generation
Type natural language prompts to produce production-grade functions, algorithmic solutions, or boilerplate structures.
Supported across 20+ languages: Python, JavaScript, TypeScript, C / C++, Java, Go, Rust, PHP, SQL, HTML / CSS, Kotlin, Swift, C#, Shell / Bash.
2. Step-by-Step Code Explanation
Paste complex, unfamiliar, or poorly documented code. CodAI deconstructs the logic line-by-line, explaining algorithmic complexity, data structures, and invariants.
3. Instant Debug & Bug Detection
Encountering a segmentation fault, recursion depth error, or null pointer exception? Paste your code along with the terminal traceback error message.
4. Code Optimization & Refactoring
Transform quadratic $O(N^2)$ brute-force solutions into linearithmic $O(N \log N)$ or linear $O(N)$ implementations, reduce memory allocations, and enhance idiomatic readability.
Configuration & Keyboard Shortcuts
Fine-tune CodAI's inference parameters from the built-in Settings Panel:
Temperature Control
Adjust creativity vs. deterministic precision. Use 0.1 – 0.2 for syntax debugging and math; use 0.6 – 0.8 for prototyping creative algorithms.
Max Token Length
Choose between concise code snippets (512 tokens) and extensive full-project classes or multi-file solutions (up to 2048+ tokens).
Theme Toggle
Toggle between Dark Mode and Light Mode with high-contrast accessibility presets for low-light lab settings.
Crash Recovery & Autosave
Session state is automatically buffered to local disk so you never lose prompt history or generated code snippets if a machine restarts.
Productivity Keyboard Shortcuts
| Key Combination | Action / Description |
|---|---|
| Ctrl + Enter | Generate code / Send prompt to local AI assistant |
| Ctrl + L | Clear chat transcript and reset context buffer |
| Ctrl + K | Focus cursor onto prompt input textarea |
| Ctrl + S | Save session state and export current code snippets |
| Ctrl + Shift + C | Copy current selected code block to clipboard |
| Esc | Cancel active token generation or close settings panel |
System Architecture & 4-Layer Stability
Under the hood, CodAI v3.0 separates the browser chat UI, the controller, and the inference engine into clean, decoupled layers with automated process protection:
Chat UI (browser)
A modern, GPU-friendly Python GUI that provides a responsive desktop user interface with syntax highlighting, streaming token animations, and zero web browser overhead.
Controller (Codai.exe)
The packaged controller health-monitors the engine, auto-restarts it after crashes, tunes settings to your RAM/CPU tier, and writes rotating logs.
Inference Engine (Llama.cpp / Quantized GGUF)
C++ accelerated offline model execution using 4-bit integer quantization (Q4_K_M). Delivers fast tokens-per-second on standard CPU cores using AVX2 vector SIMD instructions.
4-Layer Single Instance & Cleanup Protection
Combines Windows Named Mutex, Socket Port Locking, PID verification, and OS signal traps to guarantee that multiple instances never conflict and no zombie processes linger on shutdown.
Troubleshooting & Solutions
Encountering an issue on a lab computer or developer machine? Use these field-tested solutions:
Issue: Multiple instances open or the engine won't start
If a previous session crashed abnormally, a background engine process may still be running.
Issue: Low Memory (RAM) or Slow Token Generation
If running on an older 2GB or 4GB machine, ensure other memory-heavy programs are closed.
- Close Google Chrome / heavy browser tabs before running generation.
- Set Max Tokens to 512 in Settings to lower peak memory allocation.
- Use Ctrl + L frequently to purge older conversation context.
Issue: Missing dependencies when running from Python source
Ensure you are in a clean virtual environment and run a force-reinstall:
Frequently Asked Questions
How does CodAI work without an internet connection?
CodAI runs the official llama.cpp engine (llama-server) locally, with a browser chat UI and a controller that keeps the engine healthy. It loads quantized GGUF models directly into memory on your computer, eliminating the need for any cloud APIs or internet connection.
Can I use CodAI during university lab exams?
Yes! CodAI was specifically engineered for restricted educational environments. The portable version runs directly from a USB drive or desktop folder without administrative permissions and operates completely offline with zero network calls.
What are the minimum hardware requirements to run CodAI?
CodAI is optimized to run smoothly on machines with as little as 2GB to 4GB of RAM. An entry-level dual-core 2.0GHz CPU and 2GB of free disk space are all that is required—no dedicated GPU is needed.
Is my source code stored or transmitted to external servers?
Never. CodAI has zero telemetry and zero external network calls. Every prompt, code snippet, and generated suggestion remains strictly on your local machine.
What should I do if multiple windows open or the engine won’t start?
CodAI includes a pre-built kill.bat utility that resets background processes and locks. Simply run kill.bat, then start again with run.bat.
Open Source, Contributing & Community
CodAI is an open-source project released under the GPL-3.0 license. We warmly welcome student contributions, bug reports, feature requests, and university partnership suggestions.
How to Contribute
- Fork the repository: github.com/Luckyyaduvanshiofficial/Codaipro
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your improvements:
git commit -m 'feat: add feature' - Open a Pull Request with a clear summary of changes.
Ready to code offline?