⚡ Powered by Claude · ChatGPT · DeepSeek

AI code assistant for your
terminal and VSCode — free

Codient analyzes, refactors, debugs, and generates code from your CLI. Multi-model, multi-file, with safe backups and rollback — no IDE required.

Get started View on GitHub
bash — 80×24
user@dev:~$

Everything you need,
straight from your terminal

No context switching. Codient stays in your workflow and lets the AI do the heavy lifting.

🤖

Multi-Model AI

Choose between Claude, ChatGPT, or DeepSeek on a per-command basis. Switch models without reconfiguring anything.

📂

Multi-File Projects

Send multiple source files in a single command. Codient builds a context-aware prompt from your entire codebase slice.

💾

Safe Overwrite + Backup

Every file is automatically backed up to ~/.codient/backups/ before any change is applied. You can always roll back.

🔄

Full Rollback System

Restore any file to any previous version by timestamp. Never lose working code because of an AI suggestion.

📊

Visual HTML Diffs

When not using --overwrite, Codient generates a color-coded side-by-side diff report and opens it in your browser.

🌐

Browser Automation

Driven by Selenium for persistent, login-based AI sessions. Supports HTTP and SOCKS5 proxies for restricted environments.

🧠

Context Injection

Pass read-only reference files with --context. The AI sees them for understanding but won't modify them.

🐛

Debug Mode

Log the full prompt and raw AI response to HTML files in ~/.codient/debug/ for full transparency.

Up and running in minutes

Requires Python 3.8+, Google Chrome, and a matching ChromeDriver.

1

Clone the repository

Pull the project and move into the directory.

git clone https://github.com/hamidsamak/codient.git
cd codient
2

Create a virtual environment & install dependencies

Keep everything isolated with a venv, then install from requirements.txt.

python3 -m venv venv
venv/bin/pip install -r requirements.txt
3

Add codient to your PATH

Run this once from inside the cloned folder to create a global launcher script.

# Create the launcher
cat > ~/.local/bin/codient << EOF
#!/bin/bash
exec "$(pwd)/venv/bin/python" "$(pwd)/codient" "\$@"
EOF
chmod +x ~/.local/bin/codient

# Make sure ~/.local/bin is in PATH
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
4

Log in to your AI models

Open a browser session for each model you want to use. You only need to do this once — the session is saved for future use.

# Log in to each model you want to use
codient --browser --model claude
codient --browser --model chatgpt
codient --browser --model deepseek

A Chrome window opens for each model — log in as you normally would, then close it. The session cookie is persisted automatically.

Common workflows

All commands follow the pattern: codient [flags] "prompt" file1.py file2.py

Fix a bug

Ask Codient to find and fix a bug. Without --overwrite, you get a diff report.

codient "Fix the off-by-one error" main.py

Refactor & save changes

Apply changes directly to disk. Your original is backed up first.

codient --overwrite "Refactor to use dataclasses" models.py

Multi-file analysis

Pass multiple files for cross-file context.

codient "Find inconsistencies" api.py db.py utils.py

Use context files

Reference files for context, separated by --. They're read but never modified.

codient "Improve architecture" --context config.py utils.py -- main.py

Choose your AI model

Default is Claude. Switch with --model.

codient --model chatgpt "Optimize this query" db.py
codient --model deepseek "Add type hints" app.py

Debug mode

Save the full prompt + raw AI response for inspection.

codient --debug "Explain this logic" complex.py
# Output saved to ~/.codient/debug/

View file history

List all backups for a file.

codient --history main.py

Rollback a file

Restore the last backup, or a specific version by timestamp.

codient --rollback main.py
codient --rollback main.py --timestamp 20250101123000

All CLI flags

Full reference for every option.

Flag Description
--overwrite Apply AI changes directly to files (with automatic backup)
--context FILES Add read-only reference files (not modified by AI)
--debug Save full prompt + response HTML to ~/.codient/debug/
--proxy URL Route through an HTTP or SOCKS5 proxy
--model NAME Select AI model: claude (default), chatgpt, deepseek
--browser Open a persistent login session for the selected model
--history FILE Show all backup versions for a file
--rollback FILE Restore the previous version of a file
--timestamp TS Restore a specific version (format: YYYYMMDDHHMMSS)

Codient inside your editor

The Codient VSCode extension connects directly to the Codient CLI, bringing all features into your workspace UI.

Build & install the extension

Package the extension with vsce and install it locally.

# Install vsce (one time only)
npm install -g @vscode/vsce

# Build the .vsix package
vsce package

# Install in VSCode
code --install-extension codient-*.vsix

Then open the Command Palette with Ctrl+Shift+P (or +Shift+P on Mac) and search for Codient.

View extension on GitHub ↗

Available commands

Codient: Ask AI (Current File)

Analyze the open file — fix bugs, review code, add comments, or optimize performance.

Codient: Ask AI (Composite Mode)

Analyze multiple files together for cross-file refactoring, architecture review, or system-wide debugging.

Codient: Open Browser Session

Launch a persistent Chrome AI session for login-based workflows or long conversations.

Under the hood

Codient connects your terminal to AI web interfaces through browser automation, then parses and applies the responses safely.

CLI Command
Python Engine
Selenium Session
AI Web UI
Response Parser
Diff / Backup / Write

No API keys required. Codient uses your existing logged-in browser sessions, so it works wherever you can log into Claude, ChatGPT, or DeepSeek.