Observed since 21 Oct, 10:12 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A lightweight communication layer for developers to interact with LLMs.
AI Codec is a lightweight, CLI-first tool designed to streamline the interaction between a software developer and a Large Language Model (LLM). It provides a structured, reviewable, and reversible workflow for applying LLM-generated code changes to your project.
It’s designed for the developer who:
LLMs are incredibly powerful for generating code, but integrating their suggestions into a project is often a messy, manual process. Developers typically face:
AI Codec solves these problems by treating LLM-generated changes as a formal, reviewable patch, much like a pull request.
aicodec apply command launches a web UI that provides a git-like diffing experience, so you can see exactly what will change before any files are touched.apply and revert commands make applying LLM suggestions a safe, atomic transaction that you can undo with a single command.aicodec init.aicodec revert command.aicodec schema command.Currently aicodec is not available on PyPi (hopfully soon).
To install AI Codec, clone the repo and run the following command inside the folder (next to pyproject.toml) using pip:
pip install .
This will make the aicodec command available in your terminal.
The aicodec workflow is designed to be simple and integrate cleanly with your existing development practices, including version control like Git.
First, initialize aicodec in your project's root directory. You only need to do this once.
aicodec init
This command will guide you through an interactive setup to create a .aicodec/config.json file.
Next, gather the code you want the LLM to work on.
aicodec aggregate
This command scans your project based on your configuration and creates a context.json file. This file contains the content of all relevant files, which you can now provide to your LLM.
Copy the contents of context.json and paste it into your LLM of choice. Ask it to perform refactoring, add features, or fix bugs.
Crucially, you must instruct the LLM to format its response as a JSON object that adheres to the tool's schema. To get the required schema, run the following command in your terminal:
aicodec schema
You can directly pipe this output to your clip by e.g. using aicodec schema | pbcopy on macOS, | clip on Windows, or | xclip on Linux.
You can then provide this schema to the LLM along with your project context and prompt.
Once you have the JSON output from the LLM, copy it to your clipboard.
Then, run the prepare command:
aicodec prepare --from-clipboard
This validates the JSON from your clipboard and saves it to .aicodec/changes.json, getting it ready for review.
You can also configure it as default flag in your config by adding under "prepare" the "from-clipboar": true option.
This is the most important step. Run the apply command to launch the web-based review UI:
aicodec apply
Your browser will open a local web page showing a diff of all proposed changes. Here you can:
Once you are satisfied, click "Apply Selected Changes". The tool will modify your local files and create a .aicodec/revert.json file as a safety net.
If you are unhappy with the result of an apply operation, you can easily undo it.
aicodec revert
This command opens the same review UI, but this time it shows the changes required to restore your files to their state before the last apply operation.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 2 Sept 2025 | 8 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 10:12 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:1900be277bba49f96bbcb0c887388806792d613b206f696655bd1e170db22157