Skip to content
/ struct Public

STRUCT simplifies project organization by creating consistent file and folder structures tailored to your specific needs. Enhance productivity and maintain uniformity across all your projects with this powerful and flexible tool.

License

Notifications You must be signed in to change notification settings

httpdss/struct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ STRUCT: Automated Project Structure Generator

image

STRUCT is a powerful, flexible tool for automating project structure creation through YAML configurations. Generate consistent project layouts, boilerplate code, and configurations with template variables, remote content fetching, and intelligent file handling.

πŸ“š View Complete Documentation | πŸš€ Quick Start Guide | πŸ”§ Installation

✨ Key Features

  • πŸ“ YAML-Based Configuration - Define project structures in simple, readable YAML
  • πŸ”§ Template Variables - Dynamic content with Jinja2 templating and interactive prompts
  • 🌐 Remote Content - Fetch files from GitHub, HTTP/HTTPS, S3, and Google Cloud Storage
  • πŸ›‘οΈ Smart File Handling - Multiple strategies for managing existing files (overwrite, skip, backup, etc.)
  • πŸͺ Automation Hooks - Pre and post-generation shell commands
  • 🎯 Dry Run Mode - Preview changes before applying them
  • βœ… Validation & Schema - Built-in YAML validation and IDE support
  • πŸ€– MCP Integration - Model Context Protocol support for AI-assisted development workflows

πŸš€ Quick Start

Installation

# Install via pip
pip install git+https://github.com/httpdss/struct.git

# Or run with Docker
docker run -v $(pwd):/workdir ghcr.io/httpdss/struct:main generate my-config.yaml ./output

Basic Usage

# Generate a Terraform module structure
struct generate terraform-module ./my-terraform-module

# List available structures
struct list

# Validate a configuration
struct validate my-config.yaml

# Start MCP server for AI integration
struct mcp --server

πŸ€– MCP Integration Quick Start

Struct supports MCP (Model Context Protocol) for seamless AI tool integration:

# 1. Start the MCP server
struct mcp --server

# 2. Configure your AI tool (Claude Desktop example)
# Add to ~/.config/claude/claude_desktop_config.json:
{
  "mcpServers": {
    "struct": {
      "command": "struct",
      "args": ["mcp", "--server"]
    }
  }
}

# 3. Use MCP tools in your AI conversations:
# - list_structures: Get all available structures
# - get_structure_info: Get details about a structure
# - generate_structure: Generate project structures
# - validate_structure: Validate YAML configs

Supported MCP Clients: Claude Desktop, Cline/Continue, Custom clients

πŸ“– Full MCP Integration Guide

Example Configuration

files:
  - README.md:
      content: |
        # {{@ project_name @}}
        Generated with STRUCT
  - .gitignore:
      file: github://github/gitignore/main/Python.gitignore

folders:
  - src/:
      struct: project/python
      with:
        app_name: "{{@ project_name | slugify @}}"

variables:
  - project_name:
      description: "Name of your project"
      type: string
      default: "MyProject"

πŸ“š Documentation

Our comprehensive documentation is organized into the following sections:

🏁 Getting Started

βš™οΈ Configuration

πŸ”§ Advanced Features

πŸ‘©β€πŸ’» Development

πŸ“– Resources

🎯 Use Cases

  • Infrastructure as Code - Generate Terraform modules, Kubernetes manifests
  • Application Scaffolding - Bootstrap microservices, APIs, frontend projects
  • DevOps Automation - CI/CD pipeline templates, configuration management
  • Documentation - Consistent project documentation and compliance templates

🀝 Community

πŸ“œ License

MIT License - see LICENSE for details.

πŸ’° Support

If STRUCT helps your workflow, consider supporting the project: patreon/structproject


πŸ“š Complete Documentation | πŸ› Report Issues | πŸ’¬ Discussions

About

STRUCT simplifies project organization by creating consistent file and folder structures tailored to your specific needs. Enhance productivity and maintain uniformity across all your projects with this powerful and flexible tool.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages