Skip to content

clschalkwyk/coder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coder CLI

A modular CLI-powered AI toolchain that turns specs into scaffolds, code, and docs — using LLMs like GPT to supercharge software development.

Python CLI Tool License: MIT

Overview

Built with Python + Click, this CLI wraps specialized AI agents to handle different stages of software creation.

Coder CLI is designed for devs who prefer terminal-first workflows and want full control over LLM-driven codegen, with local execution optional.

  • SpecAgent: Converts high-level ideas into structured technical specifications
  • ScaffoldAgent: Generates project structure and starter files based on specifications
  • DevAgent: Writes, refactors, or enhances code across multiple files
  • DocAgent: Creates documentation for your project
  • CriticAgent: Reviews and provides feedback on your code

Installation

  1. Clone this repository
  2. Create a virtual environment and activate it:
    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install dependencies:
    pip install -r requirements.txt
  4. Create a config.yaml file based on the example:
    cp config.yaml.example config.yaml
  5. Update config.yaml with your OpenAI API key and other settings

Configuration

Edit the config.yaml file with your settings:

model: gpt-4-turbo # or deepseek-chat, llama3, etc.
openai_api_base: https://openrouter.ai/api/v1 # example: https://api.openai.com/v1 or local server
openai_api_key: your_api_key_here

Usage

Coder CLI Commands

# Generate a project specification from a brief idea
python coder.py spec "Create a web app for tracking TV shows" --format json

# Or use a markdown file with detailed requirements
python coder.py spec --file project_brief.md --format markdown

# Generate project scaffold from a spec file
python coder.py scaffold --file output/spec.json

# Parse scaffold markdown into actual files
python coder.py parse-scaffold --file output/scaffold.md --outdir my_project

# Run DevAgent to perform specific tasks on your code
python coder.py dev --task "Add authentication to the login page" --context my_project

# Parse DevAgent output into actual file changes
python coder.py parse-dev --file output/dev_output.md --outdir my_project

Examples

# Generate a project spec for a simple TV show tracker
python coder.py spec "TV show tracker app with user login and watch history" --format json

# Generate project structure from the spec
python coder.py scaffold --file output/spec.json

# Create the project files
python coder.py parse-scaffold --file output/scaffold.md --outdir CheckInTV

# Add a feature with DevAgent
python coder.py dev --task "Add season filter to the show list" --context CheckInTV

# Apply the changes
python coder.py parse-dev --file output/dev_output.md --outdir CheckInTV

Project Structure

/
├── agents/       # Agent implementation code
├── memory/       # Memory persistence for agents
├── prompts/      # System prompts for each agent type
├── output/       # Generated files and outputs
├── templates/    # Templates used by agents
├── coder.py      # Main CLI application
└── config.yaml   # Configuration settings

Notes

  • Files generated in the output directory are ignored by git (see .gitignore)
  • The system requires an OpenAI API key or compatible endpoint
  • Currently supports JSON and Markdown output formats

Roadmap

  • Add support for local LLMs (Ollama)
  • Git diff-based parse-dev strategy
  • Plugin architecture for custom agents

License

MIT License

About

Little Agent Coder for fun

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy