@cs-magic/generator-acg
v0.1.5
Published
A powerful and flexible code generator for VS Code that helps you generate code snippets, boilerplates, and entire project structures
Downloads
285
Maintainers
Readme
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 CLI (Recommended)
# Install ACG globally
npm install -g @cs-magic/generator-acg
# Generate your code with simple command
acg
# Follow the interactive prompts to customize your generation
Using Yeoman Generator
# If you prefer using Yeoman directly
yo @cs-magic/acg
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/generator-acg:project
# Generate a component
yo @cs-magic/generator-acg:component
# Generate an API endpoint
yo @cs-magic/generator-acg:api
# Generate custom template
yo @cs-magic/generator-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
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request