Contributing to the CLI

Help improve the SeanStack CLI by contributing patterns, features, and fixes

Getting Started

1. Fork the Repository

Fork the SeanStack CLI repository on GitHub to get started

git clone https://github.com/yourusername/seanstack-cli.git

2. Install Dependencies

Install the development dependencies and link the CLI locally

npm install && npm link

3. Create a Branch

Create a feature branch for your contribution

git checkout -b feature/new-pattern

Contributing Patterns

Pattern Structure

Each pattern follows a specific directory structure:

patterns/
  component/
    templates/
      basic.tsx
      with-props.tsx
    config.json
    README.md

Template Variables

Use template variables for dynamic content:

{{componentName}}, {{fileName}}, {{pascalCase}}

Configuration

Define pattern metadata in config.json:

{
  "name": "component",
  "description": "React component",
  "templates": ["basic", "with-props"],
  "dependencies": ["react", "@types/react"]
}

Testing Your Contribution

Unit Tests

npm test

Integration Tests

npm run test:integration

Manual Testing

seanstack add your-pattern TestName

Submission Guidelines

Pull Request Requirements

  • • Clear description of changes
  • • Tests for new functionality
  • • Documentation updates
  • • Follows existing code style

Review Process

All contributions are reviewed by maintainers for quality, compatibility, and alignment with project goals.