Tool

Run a lightweight coding agent locally in your terminal

Ultra-lightweight C++23 coding agent that runs locally in your terminal using your ChatGPT plan.

Works with chatgptgithub

91
Spark score
out of 100
Updated last month
Source checked Sep 10, 2026
Version 0.1.11-alpha
Models
gpt 4o

Add to Favorites

Why it matters

MicroCodex helps developers write, debug, and test code directly from the command line using an ultra-lightweight AI agent that runs locally with durable conversations and automatic context management.

Outcomes

What it gets done

01

Execute one-shot coding prompts or start interactive terminal sessions

02

Automatically compact conversation context to maintain session continuity

03

Discover and apply filesystem skills from the Codex skills directory

04

Run shell commands with safety guards against destructive operations

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Overview

Microcodex

MicroCodex is an ultra-lightweight C++23 coding agent that runs in the terminal using an existing ChatGPT plan, supporting one-shot prompts, an interactive UI, and Codex-compatible skills. Use it when you want a minimal, fast, locally-run terminal coding agent rather than a full IDE-integrated tool, and understand it is not a sandbox.

What it does

MicroCodex is an ultra-lightweight coding agent that runs locally in your terminal, written in C++23. It provides one-shot prompts, an interactive terminal UI, local coding tools, durable conversations, and automatic context compaction. After signing in with microcodex login, it authenticates against your ChatGPT plan via OAuth, storing credentials under $CODEX_HOME (or ~/.codex when unset), and can then run either as an interactive session or as a single one-shot prompt such as "Find the failing test, fix it, and run the relevant test suite."

When to use - and when NOT to

Use MicroCodex when you want a minimal, fast, locally-run terminal coding agent backed by your existing ChatGPT plan rather than a heavier IDE-integrated tool. It is explicitly not a sandbox: before starting the user's shell it applies a simple lexical denylist that blocks forced file removal (rm -f/rm -rf), git reset --hard, forced git clean, git checkout --, disk-formatting tools, and shutdown commands, but this guard is not a shell parser or a complete security boundary - commands that don't match the denylist, and all file operations, run with the same permissions as the MicroCodex process itself. It does not yet support MCP, and text cannot currently be copied from its terminal UI.

Inputs and outputs

curl -fsSL https://github.com/paoloanzn/microcodex/releases/latest/download/install.sh | sh

After installing, run microcodex login to authenticate (or microcodex login --device-auth on a remote or headless machine, entering a one-time code at a verification URL), then microcodex for an interactive session or microcodex "<prompt>" for a one-shot task. Prebuilt binaries for macOS (Apple Silicon and x86_64) and Linux (x86_64 and arm64) are attached to each GitHub Release; a specific version can be pinned by setting MICROCODEX_RELEASE before running the installer.

Integrations

MicroCodex discovers the same filesystem skills installed for Codex under $CODEX_HOME/skills (or ~/.codex/skills): each skill needs a SKILL.md with YAML frontmatter containing a name and description, and its metadata is added to the agent's instructions at session startup, with the full skill body read only when its name or description matches the current task. Building from source requires a C++23 compiler, make, and libcurl and OpenSSL development files on Linux:

git clone --recurse-submodules https://github.com/paoloanzn/microcodex.git
cd microcodex
make

The executable is written to build/microcodex, and make test runs the test suite. It is licensed under the Apache-2.0 License.

Who it's for

Developers who want a minimal, terminal-native coding agent that reuses their ChatGPT plan and existing Codex skills, without adopting a full IDE-integrated or sandboxed agent environment.

Source README

MicroCodex is an ultra-lightweight coding agent that runs locally in your terminal.

MicroCodex splash


MicroCodex is written in C++23 and provides one-shot prompts, an interactive terminal UI, local coding tools, durable conversations, and automatic context compaction.


Quickstart

Installing and running MicroCodex

Run the following on Mac or Linux to install MicroCodex:

curl -fsSL https://github.com/paoloanzn/microcodex/releases/latest/download/install.sh | sh

Then simply run microcodex login to sign in, followed by microcodex to get started.

You can also go to the latest GitHub Release and download the appropriate binary for your platform.

Each GitHub Release contains these executables:

  • macOS
    • Apple Silicon/arm64: microcodex-aarch64-apple-darwin.tar.gz
    • x86_64: microcodex-x86_64-apple-darwin.tar.gz
  • Linux
    • x86_64: microcodex-x86_64-unknown-linux-gnu.tar.gz
    • arm64: microcodex-aarch64-unknown-linux-gnu.tar.gz

Each archive contains a single entry with the platform baked into the name (for example, microcodex-aarch64-apple-darwin), so you likely want to rename it to microcodex after extracting it.

The installer selects the native build for the current architecture. Linux requires the libcurl and OpenSSL runtime libraries.

To install a specific release, set MICROCODEX_RELEASE:

curl -fsSL https://github.com/paoloanzn/microcodex/releases/latest/download/install.sh | MICROCODEX_RELEASE=v0.1.0 sh

Using MicroCodex with your ChatGPT plan

Run microcodex login and open the displayed URL in your browser. On a remote or headless machine, run microcodex login --device-auth and enter the displayed one-time code at the verification URL. MicroCodex stores the resulting OAuth credentials under $CODEX_HOME, or ~/.codex when CODEX_HOME is unset.

You can then start an interactive session or pass a one-shot prompt:

microcodex
microcodex "Find the failing test, fix it, and run the relevant test suite"

Using Codex skills

MicroCodex discovers the same filesystem skills installed for Codex under
$CODEX_HOME/skills, or ~/.codex/skills when CODEX_HOME is unset. Each
skill must have a SKILL.md with YAML frontmatter containing a name and
description. Skill metadata is added to the agent instructions at session
startup; the complete skill is read only when its name or description matches
the task.

Building from source

Building requires a C++23 compiler, make, libcurl development files, and OpenSSL development files on Linux.

git clone --recurse-submodules https://github.com/paoloanzn/microcodex.git
cd microcodex
make

The executable is written to build/microcodex. Run the test suite with make test.

Known bugs and issues

  • View all issues
  • MCP support is not implemented yet.
  • Text cannot currently be copied from the terminal while using MicroCodex.
  • The bash safety gate is a lexical denylist, not a complete safe-command policy or sandbox; indirect or unrecognized destructive commands may not be blocked.

Docs

This repository is licensed under the Apache-2.0 License.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.