MCPcopy Index your code
hub / github.com/Codeplain-ai/codeplain

github.com/Codeplain-ai/codeplain @v0.3.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.5 ↗ · + Follow
911 symbols 3,355 edges 91 files 331 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Codeplain plain2code renderer

Render ***plain source to software code using the Codeplain API.

Codeplain.ai - Code Generation as a Service

Codeplain is a platform that generates software code using large language models based on requirements you specify in ***plain specification language.

Schematic overview of the Codeplain's code generation service

Abstracting Away Code Generation Complexity with ***plain

***plain is a novel specification language that helps abstracting away complexity of using large language models for code generation.

An example application in ***plain

Getting started

Prerequisites

System requirements

To run the plain2code client, you need Python 3.11 or a later version.

Windows users: Please install WSL (Windows Subsystem for Linux) as this is currently the supported environment for running plain code on Windows.

Authorization - Codeplain API Key

We are using Codeplain API Key to authorize requests to the Codeplain API. To get your Codeplain API Key, please contact Codeplain.ai support at support@codeplain.ai.

In order to generate code, you need to export the following environment variable:

export CODEPLAIN_API_KEY="your_actual_api_key_here"

Installation Steps

  1. Clone this repository
  2. Set your Codeplain API key as an environment variable: export CODEPLAIN_API_KEY=your_api_key_here
  3. (Recommended) Create and activate a virtual environment: bash python -m venv .venv source .venv/bin/activate
  4. Install required libraries pip install -r requirements.txt

Quick Start

After completing the installation steps above, you can immediately test the system with a simple "Hello World" example:

  • Change to the example folder and run the example:

cd examples/example_hello_world_python python ../../plain2code.py hello_world_python.plain

Note: Rendering will take a few minutes to complete.

  • The system will generate a Python application in the build directory. You can run it with: cd build python hello_world.py

Crash reporting

If the plain2code client crashes unexpectedly, it sends an anonymous crash report to Codeplain to help improve the tool. To disable crash reporting, set the CODEPLAIN_NO_TELEMETRY=1 flag.

Releasing

Releases are built and published with uv. The version is read from _version.py.

  1. Bump the version in _version.py and commit/tag (git tag v<version>).
  2. Build the distributions: bash uv build --python 3.11 This produces dist/codeplain-<version>-py3-none-any.whl and dist/codeplain-<version>.tar.gz.
  3. (Optional) Smoke-test the wheel: bash uv run --with dist/codeplain-<version>-py3-none-any.whl --no-project -- codeplain --status
  4. (Optional) Publish to TestPyPI first: bash uv publish --publish-url https://test.pypi.org/legacy/ dist/codeplain-<version>*
  5. Publish to PyPI: bash uv publish dist/codeplain-<version>* Authenticate with UV_PUBLISH_TOKEN=pypi-... (recommended), --token pypi-..., or --username __token__ --password pypi-....
  6. Push the tag: git push origin v<version>.

Additional Resources

Examples and Sample Projects

  • See the examples folder for sample projects in Golang, Python, and React.
  • For example application how to implement task manager in ***plain see example-task-manager repository.
  • For example application how to implement SaaS connectors in ***plain see example-saas-connectors repository.

Documentation

Core symbols most depended-on inside this repo

info
called by 35
plain2code_console.py
format
called by 30
plain2code_logger.py
debug
called by 30
plain2code_console.py
add_all_files_and_commit
called by 25
git_utils.py
error
called by 23
plain2code_console.py
determine_partial_render_start
called by 21
change_detection.py
_detect_module_changes
called by 17
change_detection.py
post_request
called by 14
codeplain_REST_api.py

Shape

Function 415
Method 351
Class 122
Route 23

Languages

Python100%
TypeScript1%
Go1%

Modules by API surface

tui/components.py64 symbols
tests/test_cli_output.py54 symbols
tests/test_partial_rendering.py48 symbols
tests/test_change_detection.py41 symbols
tests/test_plain_modules.py37 symbols
render_machine/render_context.py36 symbols
tests/test_plainfileparser.py32 symbols
tui/state_handlers.py30 symbols
plain_modules.py30 symbols
plain_file.py27 symbols
plain2code_exceptions.py23 symbols
tests/test_telemetry.py22 symbols

For agents

$ claude mcp add codeplain \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact