0.1.0 • Published 11 months ago

@cs-magic/acg v0.1.0

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

AnyCodeGenerator (ACG)

A powerful and flexible code generator for VS Code that helps you generate code snippets, boilerplates, and entire project structures with ease.

Features

  • šŸŽÆ Smart code generation based on context and requirements
  • šŸš€ Multiple generation templates and patterns
  • šŸ“¦ Support for various project types and frameworks
  • šŸ› ļø Built with TypeScript for type safety
  • šŸŽØ Modern UI with React and Tailwind CSS
  • šŸ“± Extensible architecture for custom templates
  • šŸ”„ Live preview of generated code

Quick Start

Using Yeoman Generator

# Install Yeoman and ACG generator globally
npm install -g yo @cs-magic/acg

# Generate your code
yo @cs-magic/acg

# Follow the interactive prompts to customize your generation

Using VS Code Extension

# Install the VS Code extension
# Search for "AnyCodeGenerator" in VS Code marketplace
# Or visit: [VS Code Marketplace Link]

# Use the command palette (Ctrl+Shift+P / Cmd+Shift+P)
# Type: "ACG: Generate Code"

Generation Types

Using Yeoman Commands

The generator supports various commands for different generation needs:

# Generate a new project
yo @cs-magic/acg:project

# Generate a component
yo @cs-magic/acg:component

# Generate an API endpoint
yo @cs-magic/acg:api

# Generate custom template
yo @cs-magic/acg:custom

Each command will prompt you for necessary configuration options.

Code Snippets

Generate commonly used code patterns and snippets based on your current context.

Project Templates

Create new projects with best-practice structure and configuration:

project-name/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ core/          # Core functionality
│   ā”œā”€ā”€ components/    # UI components (if applicable)
│   └── types/         # Type definitions
ā”œā”€ā”€ tests/             # Test files
└── package.json       # Project configuration

Custom Templates

Create and use your own templates for specific needs:

  • Component templates
  • API endpoints
  • Database models
  • Custom patterns

Development

Prerequisites

  • Node.js 16 or later
  • pnpm (recommended), yarn, or npm
  • VS Code

Building the Extension

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Development with hot reload
pnpm dev

Configuration Options

  • Project Type: Choose between standalone, monorepo package, or monorepo root
  • Package Manager: Select pnpm, yarn, or npm
  • Webview Support: Option to include React-based webview
  • Package Scope: Custom scope for monorepo packages

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request