Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mini-codex

Mini Codex is a Rust prototype of a local coding agent powered by Ollama. It currently focuses on deepseek-r1:14b as the default local model and supports shell execution, file tools, patching, workspace mode, plan-first flow, diffs, summaries, and JSONL logs to explore a lightweight Codex-like agent loop for local models.

Model Profiles

Mini Codex does not only switch model names. It loads a model profile that can customize prompts, plan cleanup, tool-result follow-up text, and model-specific output normalization.

The current profile is deepseek-r1, selected for models that start with deepseek-r1. Models without a specialized profile are rejected at startup.

While waiting for a model response, the CLI prints model thinking... done so long-running local inference does not look frozen.

Project Structure

src/main.rs                     # agent orchestration
src/types.rs                    # shared data types
src/cli/                        # terminal input, flags, approval, workspace args
src/llm/                        # Ollama client
src/session/                    # JSONL session logging
src/tools/                      # tool parsing and execution
src/model_profiles/             # specialized model behavior

Run

cargo run -- --workspace /path/to/workspace

The default model is deepseek-r1:14b. You can override it with another supported DeepSeek R1 variant:

MINI_CODEX_MODEL=deepseek-r1:32b cargo run -- --workspace /path/to/workspace

Tool calls are auto-approved by default. To review every shell command and file write before it runs:

MINI_CODEX_AUTO_APPROVE=0 cargo run -- --workspace /path/to/workspace

Plan-first mode is also enabled by default. To skip the planning step:

MINI_CODEX_PLAN_FIRST=0 cargo run -- --workspace /tmp/mini-codex-workspace

About

Mini Codex is a Rust prototype of a local coding agent powered by Ollama. It supports shell execution, file tools, patching, workspace mode, plan-first flow, diffs, summaries, and JSONL logs to explore a lightweight Codex-like agent loop for local models.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages