π Transform natural language prompts into functional code using intelligent template scaffolding
Code Scaffolder is a powerful command-line tool that converts your natural language descriptions into working code across multiple programming languages and project types. Using smart pattern recognition and template-based generation, it provides an intuitive way to scaffold applications, scripts, and tools without writing boilerplate code manually.
- π£οΈ Natural Language Parsing: Describe what you want in plain English
- π Multi-Language Support: Python, JavaScript, TypeScript, Java, C++, Go, Rust, PHP, Ruby, Bash, HTML, CSS, SQL
- ποΈ Project Templates: Web apps, APIs, CLI tools, desktop apps, mobile apps, libraries, scripts
- π― Smart Pattern Recognition: Automatically detects language and project type from prompts
- π Interactive Mode: Real-time code scaffolding with immediate feedback
- π Template System: Extensible template-based code generation with placeholder replacement
- π¨ Modern UI: Beautiful HTML templates with responsive design
- π Comprehensive Logging: Detailed logs for debugging and monitoring
- β‘ Fast Generation: No external API calls - everything runs locally
- Bash shell (Git Bash on Windows, Terminal on macOS/Linux)
- Node.js (for JavaScript projects)
- Python 3.7+ (for Python projects)
-
Clone the repository:
git clone https://github.com/cbunting99/code-scaffolder.git cd code-scaffolder
-
Make the script executable:
chmod +x code-scaffolder.sh
-
Install dependencies (optional, for generated projects):
# For Node.js projects npm install # For Python projects pip install -r requirements.txt
# Generate a Python web app
./code-scaffolder.sh "create a python web app called TodoApp with database and authentication"
# Generate a JavaScript API
./code-scaffolder.sh "build a REST API in Node.js for user management"
# Generate a CLI tool
./code-scaffolder.sh "create a bash script for file backup and compression"
# Specify output file
./code-scaffolder.sh -o myapp.py "build a calculator in python"
./code-scaffolder.sh -i
Then type your prompts:
bashchat> create a react web app for task management
bashchat> build a python CLI tool for data processing
bashchat> help
bashchat> exit
# Python Flask web app
./code-scaffolder.sh "create a python web app called BlogApp with user authentication and database"
# Node.js Express API
./code-scaffolder.sh "build a javascript web api for e-commerce with payment integration"
# HTML landing page
./code-scaffolder.sh "create an html website for a tech startup with modern design"
# Python CLI
./code-scaffolder.sh "create a python command line tool for log analysis"
# Bash script
./code-scaffolder.sh "build a bash script for automated server deployment"
# Go CLI
./code-scaffolder.sh "create a go cli tool for file synchronization"
# Python data script
./code-scaffolder.sh "create a python script for CSV data processing and visualization"
# SQL database
./code-scaffolder.sh "build sql schema for inventory management system"
Usage: ./code-scaffolder.sh [OPTIONS] [PROMPT]
Options:
-i, --interactive Start interactive mode
-o, --output FILE Specify output file
-l, --language LANG Force specific language
-t, --type TYPE Force specific project type
-h, --help Show help message
Examples:
./code-scaffolder.sh "create a python web app called TodoApp"
./code-scaffolder.sh -i
./code-scaffolder.sh -o myapp.py "build a calculator in python"
- Python - Web apps, CLI tools, data processing
- JavaScript - Web apps, APIs, frontend
- TypeScript - Type-safe web applications
- Java - Enterprise applications
- C++ - System programming
- C# - .NET applications
- Go - Microservices, CLI tools
- Rust - System programming, web backends
- PHP - Web applications
- Ruby - Web apps, scripts
- Bash - System scripts, automation
- HTML/CSS - Static websites
- SQL - Database schemas
- web_app - Full web applications
- api - REST APIs and web services
- cli - Command-line tools
- desktop - Desktop applications
- mobile - Mobile app templates
- library - Reusable code libraries
- script - Utility scripts
bashchat/
βββ bashchat.sh # Main script
βββ config/
β βββ settings.json # Configuration file
βββ templates/ # Code templates
β βββ python_web_app.template
β βββ javascript_web_app.template
β βββ html_web_app.template
β βββ ...
βββ generated/ # Generated code output
βββ logs/ # Application logs
βββ plugins/ # Extension plugins
βββ package.json # Node.js dependencies
βββ requirements.txt # Python dependencies
βββ README.md # This file
Edit config/settings.json
to customize behavior:
{
"ai_provider": "openai",
"model": "gpt-4",
"max_tokens": 2000,
"temperature": 0.7,
"supported_languages": ["python", "javascript", "..."]
"default_language": "python",
"output_format": "file",
"include_comments": true,
"include_tests": true,
"code_style": "clean"
}
BashChat uses a powerful template system with placeholders:
{{APP_NAME}}
- Application name{{DESCRIPTION}}
- Project description{{LANGUAGE}}
- Programming language{{PROJECT_TYPE}}
- Project type{{FEATURES}}
- Detected features{{DATE}}
- Current date{{TIMESTAMP}}
- Current timestamp
-
Create a new template file in
templates/
:touch templates/python_custom.template
-
Add your template with placeholders:
#!/usr/bin/env python3 """ {{APP_NAME}} - {{DESCRIPTION}} Generated on {{DATE}} """ def main(): print("Hello from {{APP_NAME}}!") if __name__ == '__main__': main()
# Generate multiple files
echo "create a python web app called UserApp" | ./bashchat.sh
echo "build a javascript api for UserApp" | ./bashchat.sh
echo "create html frontend for UserApp" | ./bashchat.sh
# .github/workflows/generate.yml
name: Generate Code
on: [push]
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate Code
run: |
chmod +x code-scaffolder.sh
./code-scaffolder.sh "${{ github.event.head_commit.message }}"
-
Permission denied:
chmod +x code-scaffolder.sh
-
Template not found:
- Check if templates exist in
templates/
directory - Verify language and project type detection
- Check if templates exist in
-
Dependencies missing:
npm install # For Node.js pip install -r requirements.txt # For Python
# Enable verbose logging
DEBUG=1 ./code-scaffolder.sh "your prompt here"
# Check logs
tail -f logs/codescaffolder.log
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes
- Add tests if applicable
- Commit:
git commit -am 'Add feature'
- Push:
git push origin feature-name
- Submit a pull request
-
Create templates in
templates/
:templates/newlang_web_app.template templates/newlang_default.template
-
Update language detection in
code-scaffolder.sh
:elif [[ "$prompt" =~ (newlang) ]]; then language="newlang"
-
Add file extension mapping:
"newlang") extension="ext" ;;
MIT License - see LICENSE file for details.
- Inspired by Claude Code and modern AI development tools
- Built with love for the developer community
- Thanks to all contributors and users
- π§ Email: [email protected]
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Documentation: Wiki
Made with β€οΈ by the Code Scaffolder team
Transform your ideas into code with the power of intelligent template scaffolding!