### Run Interactive Setup Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/usage-examples/interactive-setup.md Execute the npx command to start the interactive setup wizard for claude-code-templates. This wizard guides users through project setup and template installation. ```bash cd your-project-directory npx claude-code-templates ``` -------------------------------- ### Complete Template Installation Examples Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/project-setup/what-gets-installed.md Demonstrates how to install complete project templates using npx, including interactive setup, modern template installation with specific frameworks (React, Python, Node.js), and legacy syntax. ```bash # Interactive setup (recommended) npx claude-code-templates@latest # Modern template installation (preferred) npx claude-code-templates@latest --template=react --yes npx claude-code-templates@latest --template=python --yes npx claude-code-templates@latest --template=nodejs --yes # Legacy syntax (still supported but deprecated) npx claude-code-templates@latest --language=javascript-typescript --framework=react ``` -------------------------------- ### Development Workflow Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/templates/python/examples/fastapi-app/CLAUDE.md Provides a step-by-step guide for setting up the development environment, including cloning the repository, creating a virtual environment, installing dependencies, and running the server. ```bash git clone python -m venv venv source venv/bin/activate pip install -r requirements.txt alembic upgrade head uvicorn app.main:app --reload ``` -------------------------------- ### Tool-Specific Configuration Examples Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-monorepo.md Provides configuration examples for popular monorepo tools like Nx, Lerna, Rush, Yarn Workspaces, pnpm Workspaces, and Turborepo. ```yaml # Example: nx.json (Nx) // { // "extends": "@nx/react/plugins/package.json", // "tasksRunnerOptions": { // "default": { // "runner": "nx/tasks-runners/default", // "options": { // "cacheableOperations": ["build", "lint", "test", "e2e"] // } // } // } // } # Example: lerna.json (Lerna) // { // "packages": [ // "packages/*" // ], // "version": "0.0.0" // } # Example: rush.json (Rush) // { // "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", // "npmCoordinate": "npm", // "projectFolderMaxDepth": 10, // "projectFolderMinDepth": 1, // "repositoryUrl": "https://github.com/microsoft/rush-example", // "rushVersion": "5.12.0", // "startupProject": "example-app", // "subspaces": {}, // "variants": [] // } # Example: pnpm-workspace.yaml (pnpm Workspaces) // packages: // - "apps/*" // - "libs/*" ``` -------------------------------- ### Individual Component Installation Examples Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/project-setup/what-gets-installed.md Shows how to install specific components like agents, commands, and MCPs using dedicated CLI parameters with npx. Includes examples for React performance agents, file checking commands, and GitHub integration MCPs. ```bash # Install specific agents npx claude-code-templates@latest --agent=react-performance --yes npx claude-code-templates@latest --agent=api-security-audit --yes npx claude-code-templates@latest --agent=database-optimization --yes # Install specific commands npx claude-code-templates@latest --command=check-file --yes npx claude-code-templates@latest --command=generate-tests --yes npx claude-code-templates@latest --command=optimize-imports --yes # Install specific MCPs npx claude-code-templates@latest --mcp=github-integration --yes npx claude-code-templates@latest --mcp=database-integration --yes npx claude-code-templates@latest --mcp=deepgraph-react --yes ``` -------------------------------- ### Sync Automation Setup Examples Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/sync/sync-automation-setup.md Demonstrates various ways to set up the sync automation using the 'claude' CLI tool. Examples include interactive setup, setup with a configuration file, minimal webhook-only setup, advanced configurations with monitoring and alerts, and custom deployment targets. ```cli # Interactive setup claude sync-automation-setup # Setup with config file claude sync-automation-setup --config="sync-config.yml" # Minimal setup (webhooks only) claude sync-automation-setup --mode="webhooks-only" # Full automation with monitoring claude sync-automation-setup \ --mode="full" \ --monitoring="datadog" \ --alerts="slack,email" # Custom deployment claude sync-automation-setup \ --deploy-target="kubernetes" \ --namespace="sync-system" # Update webhook configuration claude sync-automation-setup --update-webhooks # Rotate secrets claude sync-automation-setup --rotate-secrets # Upgrade sync version claude sync-automation-setup --upgrade ``` -------------------------------- ### Sample Complete CI/CD Pipeline Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/deployment/ci-setup.md A comprehensive CI/CD pipeline example demonstrating checkout, Node.js setup, dependency installation, linting, testing, security scanning, and deployment to staging and production environments. ```yaml name: Full CI/CD Pipeline on: push: branches: [ main, develop ] pull_request: branches: [ main ] jobs: lint-and-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: '18' cache: 'npm' - run: npm ci - run: npm run lint - run: npm run test:coverage - run: npm run build security-scan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Security scan run: npm audit --audit-level=high deploy-staging: needs: [lint-and-test, security-scan] if: github.ref == 'refs/heads/develop' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Deploy to staging run: echo "Deploying to staging" deploy-production: needs: [lint-and-test, security-scan] if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest environment: production steps: - uses: actions/checkout@v3 - name: Deploy to production run: echo "Deploying to production" ``` -------------------------------- ### Sync Automation Output Format Example Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/sync/sync-automation-setup.md An example of the output format for the sync automation setup process. It provides a summary of the setup, including prerequisites, configuration details, webhook status, deployment status, monitoring setup, and security configurations. ```text GitHub-Linear Sync Automation Setup =================================== ✅ Prerequisites Check ✓ GitHub CLI authenticated ✓ Linear MCP connected ✓ Database accessible ✓ Redis running 📋 Configuration Summary Mode: Bidirectional real-time sync Webhook URL: https://sync.company.com/webhooks Sync Interval: 5 minutes (incremental) Conflict Strategy: newer_wins 🔗 Webhook Configuration GitHub Webhooks: ✓ Issues webhook created (ID: 12345) ✓ Pull requests webhook created (ID: 12346) ✓ Webhook test successful Linear Webhooks: ✓ Issue webhook registered ✓ Comment webhook registered ✓ Webhook verified 🚀 Deployment Status ✓ Sync server deployed (3 replicas) ✓ Database migrations complete ✓ Redis queue initialized ✓ Monitoring configured 📊 Monitoring Setup Dashboard: https://monitoring.company.com/linear-sync Alerts configured: - Slack: #sync-alerts - Email: ops@company.com Metrics collecting: - Sync rate - Error rate - API latency - Queue depth 🔒 Security Configuration ✓ Webhook secrets configured ✓ API keys encrypted ✓ TLS enabled ✓ Rate limiting active 📝 Next Steps 1. Monitor initial sync: docker-compose logs -f 2. Check dashboard for metrics 3. Review sync-config.yml for customization 4. Set up team notifications Automation Status: ✅ ACTIVE First sync scheduled: 2 minutes ``` -------------------------------- ### Unit Testing Framework Setup (Jest/Vitest/pytest) Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/testing/setup-comprehensive-testing.md Installs and configures a primary unit testing framework. This includes setting up the test runner, file patterns, and essential utilities like mocking. ```bash # Example for Jest (Node.js) npm install --save-dev jest npx jest --init # Example for pytest (Python) pip install pytest # Example for Vitest (Node.js) npm install -D vitest ``` -------------------------------- ### Complete Template Installation (React) Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/project-setup/what-gets-installed.md An example of downloading a complete React template using npx, which includes multiple components and comprehensive configuration. ```bash # Downloads complete template with multiple components npx claude-code-templates@latest --template=react --yes ``` -------------------------------- ### Modern Template Installation Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/usage-examples/framework-specific-quick-setup.md Installs projects using the recommended modern `--template` parameter for various frameworks. This method simplifies the command and ensures you get the latest configurations directly from GitHub. ```bash npx claude-code-templates@latest --template=react --yes npx claude-code-templates@latest --template=python --yes npx claude-code-templates@latest --template=nodejs --yes npx claude-code-templates@latest --template=vue --yes npx claude-code-templates@latest --template=django --yes ``` -------------------------------- ### Kubernetes Deployment Manifest Example Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/deployment/setup-kubernetes-deployment.md Example of a Kubernetes Deployment manifest defining application pods, replicas, and update strategy. This manifest is crucial for managing stateless applications. ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: my-app-deployment labels: app: my-app spec: replicas: 3 selector: matchLabels: app: my-app template: metadata: labels: app: my-app spec: containers: - name: my-app-container image: nginx:latest ports: - containerPort: 80 resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 1 maxSurge: 1 ``` -------------------------------- ### End-to-End Testing Framework Setup (Playwright/Cypress) Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/testing/setup-comprehensive-testing.md Installs and configures an E2E testing framework. This includes setting up the test environment, browser configurations, and creating page object models. ```bash # Example for Playwright (Node.js) npx playwright install # Example for Cypress (Node.js) npm install cypress --save-dev npx cypress open ``` -------------------------------- ### Documentation and Knowledge Base Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-development-environment.md This snippet outlines the creation of comprehensive setup documentation, documenting workflows, setting up project wikis, creating troubleshooting guides, and documenting coding standards. ```markdown ## Project Setup Guide This document provides a step-by-step guide to setting up the development environment for this project. ### Prerequisites * Node.js (v18+) * npm or yarn * Git ### Installation Steps 1. **Clone the repository:** ```bash git clone https://github.com/davila7/claude-code-templates.git cd claude-code-templates ``` 2. **Install dependencies:** ```bash npm install ``` 3. **Configure environment variables:** Copy `.env.example` to `.env` and fill in the required values. ```bash cp .env.example .env # Edit .env file ``` ### Running the Development Server ```bash npm run dev ``` ### Troubleshooting * **Port already in use:** Change the `PORT` variable in your `.env` file. * **Dependency issues:** Try deleting `node_modules` and running `npm install` again. ``` -------------------------------- ### Testing Infrastructure Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/project-management/init-project.md Installs and configures a testing framework (e.g., Jest, Vitest, Pytest), sets up test directories, example tests, and code coverage reporting. Adds testing scripts to package.json or makefile. ```shell # Install and configure testing framework (Jest, Vitest, Pytest, etc.) # Set up test directory structure and example tests # Configure code coverage reporting # Add testing scripts to package.json/makefile ``` -------------------------------- ### Kubernetes Liveness and Readiness Probe Example Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/deployment/setup-kubernetes-deployment.md Example of configuring liveness and readiness probes within a container spec. Liveness probes determine if a container needs restarting, while readiness probes determine if it's ready to serve traffic. ```yaml containers: - name: my-app-container image: my-app-image ports: - containerPort: 80 livenessProbe: httpGet: path: /healthz port: 80 initialDelaySeconds: 15 periodSeconds: 20 readinessProbe: httpGet: path: /ready port: 80 initialDelaySeconds: 5 periodSeconds: 10 ``` -------------------------------- ### Framework Upgrade Migration Steps Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/documentation/migration-guide.md Provides a step-by-step example for migrating a framework, including environment setup, dependency updates, and code migration tasks. ```markdown ## Step 1: Environment Setup 1. Update development environment 2. Install new framework version 3. Update build tools and dependencies 4. Configure IDE and tooling ## Step 2: Dependencies Update 1. Update package.json/requirements.txt 2. Resolve dependency conflicts 3. Update related libraries 4. Test compatibility ## Step 3: Code Migration 1. Update import statements 2. Replace deprecated APIs 3. Update configuration files 4. Modify build scripts ``` -------------------------------- ### Development Workflow: Before Starting Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/templates/javascript-typescript/CLAUDE.md Initial setup steps before beginning development, including checking Node.js compatibility, installing dependencies, and setting up environment variables. ```bash # Check Node.js version compatibility (example: ensure version >= 18) node -v # Install dependencies npm install # Copy environment variables from example cp .env.example .env # Run type checking (assuming TypeScript setup) npm run typecheck ``` -------------------------------- ### Kubernetes Service Manifest Example Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/deployment/setup-kubernetes-deployment.md Example of a Kubernetes Service manifest for exposing the application internally or externally. This manifest ensures network access to the deployed pods. ```yaml apiVersion: v1 kind: Service metadata: name: my-app-service spec: selector: app: my-app ports: - protocol: TCP port: 80 targetPort: 80 type: ClusterIP ``` -------------------------------- ### Kubernetes Ingress Example Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/deployment/setup-kubernetes-deployment.md Example of a Kubernetes Ingress resource to manage external access to services within the cluster, typically HTTP. Ingress provides routing and load balancing. ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: my-app-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - host: myapp.example.com http: paths: - path: / pathType: Prefix backend: service: name: my-app-service port: number: 80 ``` -------------------------------- ### Individual Component Installation Example Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/cli-options.md Shows how to install specific components like agents, commands, or MCPs using the CLI. ```bash npx claude-code-templates@latest --agent=react-performance --yes npx claude-code-templates@latest --command=check-file --yes npx claude-code-templates@latest --mcp=github-integration --yes ``` -------------------------------- ### Component-Specific Examples Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/usage-examples/advanced-options.md Demonstrates component-specific usage, including installing multiple components sequentially and combining component installation with system analysis commands. ```bash # Install multiple components in sequence npx claude-code-templates@latest --agent=react-performance --yes npx claude-code-templates@latest --command=check-file --yes npx claude-code-templates@latest --mcp=github-integration --yes # Install component and run stats npx claude-code-templates@latest --template=react --yes npx claude-code-templates@latest --commands-stats ``` -------------------------------- ### Beginner: Decision Comparison - Build vs Buy Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/simulation/SIMULATION_EXAMPLES.md Builds a simple decision comparison for a customer chat feature, evaluating in-house development versus third-party integration. ```bash /simulation:decision-tree-explorer Build customer chat feature in-house vs integrate third-party solution? ``` -------------------------------- ### Performance and Load Testing Setup (k6/Artillery) Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/testing/setup-comprehensive-testing.md Sets up performance testing frameworks. This includes configuring load scenarios, monitoring, and stress testing. ```bash # Example for k6 (Node.js) npm install -g k6 # Example for Artillery (Node.js) npm install -g artillery ``` -------------------------------- ### Modern Template Installation Example Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/cli-options.md Demonstrates how to install templates using the recommended modern CLI syntax with the 'npx' command. ```bash npx claude-code-templates@latest --template=react --yes npx claude-code-templates@latest --template=python --yes npx claude-code-templates@latest --template=nodejs --yes ``` -------------------------------- ### Kubernetes ConfigMap Example Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/deployment/setup-kubernetes-deployment.md Example of a Kubernetes ConfigMap for storing non-sensitive configuration data. ConfigMaps allow decoupling configuration from application code. ```yaml apiVersion: v1 kind: ConfigMap metadata: name: my-app-config data: config.properties: | database.url=jdbc:postgresql://localhost:5432/mydb api.key=abcdef12345 ``` -------------------------------- ### Legacy Template Installation Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/usage-examples/framework-specific-quick-setup.md Installs projects using the deprecated legacy `--language` and `--framework` parameters. While still supported, the modern `--template` syntax is recommended for simplicity and access to the latest features. ```bash # React + TypeScript project (legacy) npx claude-code-templates@latest --language=javascript-typescript --framework=react --yes # Python + Django project (legacy) npx claude-code-templates@latest --language=python --framework=django --yes ``` -------------------------------- ### Install Individual Claude Code Components Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/project-setup/what-gets-installed.md Demonstrates how to install specific components like agents, commands, or MCPs using the npx command with dedicated parameters. This allows for targeted integration of functionalities into an existing Claude Code setup. ```bash npx claude-code-templates@latest --agent=react-performance --yes npx claude-code-templates@latest --command=check-file --yes npx claude-code-templates@latest --mcp=github-integration --yes ``` -------------------------------- ### Example Workflow: Developer Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/orchestration/move.md A step-by-step example of a developer's workflow using the /task-move command, from starting work to completing and getting code review approval. ```bash # Start work /task-move TASK-001 in_progress # Complete and test /task-move TASK-001 qa "Implementation done, tests passing" # After review /task-move TASK-001 completed "Code review approved" ``` -------------------------------- ### Local Development Setup Commands Source: https://github.com/davila7/claude-code-templates/blob/main/DOWNLOAD_TRACKING.md Provides commands for setting up the project locally, including installing dependencies, configuring Vercel, and setting up the Supabase database. ```bash # Instalar dependencias npm install # Configurar Vercel # Instalar Vercel CLI npm i -g vercel # Configurar proyecto vercel # Configurar base de datos (Supabase) # Crear proyecto en Supabase # Copiar SUPABASE_URL y SUPABASE_SERVICE_ROLE_KEY # Agregar variables de entorno en Vercel Dashboard ``` -------------------------------- ### Development Workflow: Getting Started Commands Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/templates/python/examples/flask-app/CLAUDE.md Commands to set up a new Flask development environment. Includes creating and activating a virtual environment, installing dependencies, and running the development server. ```bash python -m venv venv source venv/bin/activate pip install -r requirements/development.txt flask db upgrade flask run ``` -------------------------------- ### Legacy Syntax Installation Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/project-setup/framework-specific-setup.md Installs project configurations using the deprecated `--language` and `--framework` flags. This method is still supported but the `--template` parameter is preferred for new installations. ```bash npx claude-code-templates@latest --language=javascript-typescript --framework=react --yes npx claude-code-templates@latest --language=python --framework=django --yes ``` -------------------------------- ### Manual MCP Installation Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/project-setup/what-gets-installed.md Demonstrates the manual installation process for Model Context Protocol (MCP) integrations, specifically showing how to download the GitHub integration configuration file using curl. ```bash # GitHub integration curl -o ./github-integration.json \ https://raw.githubusercontent.com/davila7/claude-code-templates/main/components/mcps/github-integration.json ``` -------------------------------- ### Development Workflow Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-monorepo.md Setting up workspace-wide development scripts, hot reloading, linting, formatting, debugging, and testing across multiple packages. ```json // Example: Root package.json scripts // { // "scripts": { // "dev": "turbo run dev --parallel", // "build": "turbo run build --parallel", // "lint": "turbo run lint --parallel", // "test": "turbo run test --parallel" // } // } ``` -------------------------------- ### Storybook Setup for SvelteKit Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/svelte/svelte:storybook.md Guides users through the process of setting up Storybook in a SvelteKit project, including installation, configuration, and creating initial stories. ```bash npx storybook@latest init # Follow the prompts for SvelteKit integration ``` -------------------------------- ### Unity Project Setup Command Usage Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/game-development/unity-project-setup.md Demonstrates how to execute the Unity project setup command using npx. ```bash npx claude-code-templates@latest --command unity-project-setup ``` -------------------------------- ### Monorepo Tool Analysis and Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-monorepo.md Analyzes and sets up the monorepo tool based on arguments or project structure. Supports Nx, Lerna, Rush, Yarn Workspaces, pnpm Workspaces, and Turborepo. ```bash # Example: Initialize Nx workspace npx create-nx-workspace@latest my-monorepo cd my-monorepo # Example: Initialize Lerna workspace npx lerna init # Example: Initialize Rush workspace npx @microsoft/rush init # Example: Setup Yarn Workspaces (package.json) # "workspaces": [ # "packages/*" # ] # Example: Setup pnpm Workspaces (pnpm-workspace.yaml) # packages: # - "packages/*" # Example: Initialize Turborepo npx create-turbo@latest ``` -------------------------------- ### Configure Project-Specific Tooling Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-development-environment.md This section details the setup of project-specific tools, including installing dependencies, configuring build tools, setting up bundlers, installing testing frameworks, and configuring debugging and profiling tools. ```bash # Example: Install Node.js project dependencies npm install # Example: Install Python project dependencies pip install -r requirements.txt # Example: Configure Webpack (conceptual) # webpack.config.js # module.exports = { # entry: './src/index.js', # output: { # filename: 'bundle.js', # path: __dirname + '/dist' # } # }; # Example: Install Jest for testing npm install --save-dev jest # Example: Configure debugging in VSCode (launch.json) # { # "version": "0.2.0", # "configurations": [ # { # "type": "node", # "request": "launch", # "name": "Launch Program", # "program": "${workspaceFolder}/app.js" # } # ] # } ``` -------------------------------- ### CI/CD Integration for Automated Testing Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/testing/setup-comprehensive-testing.md Configures CI/CD pipelines to automate test execution, parallelization, and reporting. Includes setting up environment provisioning and deployment gates. ```yaml # Example GitHub Actions workflow name: CI/CD Pipeline on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: '18' - name: Install Dependencies run: npm install - name: Run Unit Tests run: npm test - name: Run E2E Tests run: npm run e2e env: CI: true ``` -------------------------------- ### Beginner: Timeline Estimation - Mobile App Dev Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/simulation/SIMULATION_EXAMPLES.md Models mobile app development timelines for a small team over a six-month period. ```bash /project:project-timeline-simulator Model mobile app development with 4-person team over 6 months ``` -------------------------------- ### Install MCPs via Direct Download Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/components/mcps.md Provides examples of downloading MCP configuration files directly using `curl` for installation. ```bash # Install GitHub integration MCP curl -o ./github-integration.json \ https://raw.githubusercontent.com/davila7/claude-code-templates/main/components/mcps/github-integration.json # Install database integration MCP curl -o ./database-integration.json \ https://raw.githubusercontent.com/davila7/claude-code-templates/main/components/mcps/database-integration.json # Install DeepGraph React MCP curl -o ./deepgraph-react.json \ https://raw.githubusercontent.com/davila7/claude-code-templates/main/components/mcps/deepgraph-react.json ``` -------------------------------- ### Documentation and Standards Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-monorepo.md Establishing workspace-wide development guidelines, package management procedures, code standards, architectural decisions, and deployment documentation. ```markdown ## Monorepo Development Guidelines 1. **Package Creation**: Follow the `libs/` or `apps/` structure. 2. **Dependency Management**: Use workspace protocols (`workspace:*`). 3. **Code Standards**: Adhere to ESLint and Prettier configurations. 4. **Commit Messages**: Use Conventional Commits. ## Architectural Decision Records (ADRs) * **ADR-001**: Choice of Monorepo Tool (Nx) * **ADR-002**: Versioning Strategy (Independent) ``` -------------------------------- ### Claude Code Templates Component Installation Paths Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/project-setup/what-gets-installed.md Provides a reference for where different types of components are installed within a project when using the Claude Code Templates CLI. This includes templates, agents, commands, and MCPs, along with their corresponding CLI parameters and example installation locations. ```APIDOC Component Installation Paths: | Component Type | CLI Parameter | Installation Path | Example | |----------------|---------------------|-----------------------|-------------------------| | **Template** | `--template=name` | Multiple files | Full project setup | | **Agent** | `--agent=name` | `.claude/agents/` | Embedded in CLAUDE.md | | **Command** | `--command=name` | `.claude/commands/` | `.claude/commands/name.md` | | **MCP** | `--mcp=name` | `.mcp.json` | MCP configuration | ``` -------------------------------- ### Install Prettier for JavaScript/TypeScript Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-formatting.md Installs Prettier as a development dependency and creates a basic .prettierrc configuration file for JavaScript and TypeScript projects. ```bash npm install -D prettier echo '{"semi": true, "singleQuote": true, "tabWidth": 2}' > .prettierrc ``` -------------------------------- ### GitHub Actions CI/CD Pipeline Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/deployment/ci-setup.md A basic CI/CD pipeline configuration for GitHub Actions, including checkout, Node.js setup, dependency installation, testing, and building. ```yaml name: CI/CD Pipeline on: push: branches: [ main, develop ] pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: '18' cache: 'npm' - run: npm ci - run: npm run test - run: npm run build ``` -------------------------------- ### FastAPI Application Entrypoint Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/templates/python/examples/fastapi-app/CLAUDE.md The main FastAPI application setup, including settings integration and router inclusion. ```python from fastapi import FastAPI from app.core.config import settings from app.api.v1.api import api_router app = FastAPI( title=settings.PROJECT_NAME, version=settings.VERSION, openapi_url=f"/api/v1/openapi.json" ) # Include routers app.include_router(api_router, prefix="/api/v1") @app.get("/") async def root(): return {"message": "Welcome to FastAPI"} ``` -------------------------------- ### GraphQL Setup and Configuration Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/implement-graphql-api.md Guides on setting up a GraphQL server using frameworks like Apollo Server. Covers schema-first vs. code-first approaches, architecture planning, development tools, and playground configuration. ```APIDOC GraphQL Server Setup: - Frameworks: Apollo Server, Express-GraphQL, etc. - Approach: Schema-first or Code-first - Architecture: Planning data models and resolvers - Development Tools: Introspection, GraphQL Playground/GraphiQL - Configuration: Setting up server, middleware, and error handling ``` -------------------------------- ### Cypress E2E Test Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/testing/e2e-setup.md Installs Cypress and opens the Cypress test runner for E2E testing. ```bash npm install -D cypress npx cypress open ``` -------------------------------- ### Install Core Development Tools Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-development-environment.md This snippet covers the installation and configuration of essential development tools, including runtime environments (Node.js, Python, Java), package managers (npm, pip), version control (Git), and code editors (VSCode). ```bash # Example: Install Node.js and npm curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install -y nodejs # Example: Install Python and pip sudo apt-get update sudo apt-get install -y python3 python3-pip # Example: Install Git sudo apt-get install -y git # Example: Install VSCode (Debian/Ubuntu) curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/packages.microsoft.gpg >/dev/null echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list sudo apt-get update sudo apt-get install -y code ``` -------------------------------- ### CI/CD Integration for Database Migrations Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/create-database-migrations.md Example GitHub Actions workflow for automating database migration testing and deployment. Includes setup for Node.js, dependency installation, and environment variable configuration for database connections. ```yaml # .github/workflows/database-migration.yml name: Database Migration on: push: branches: [main] paths: ['migrations/**'] jobs: test-migrations: runs-on: ubuntu-latest services: postgres: image: postgres:13 env: POSTGRES_PASSWORD: postgres POSTGRES_DB: test_db options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: '16' - name: Install dependencies run: npm ci - name: Test migrations env: TEST_DB_HOST: localhost TEST_DB_PORT: 5432 TEST_DB_NAME: test_db TEST_DB_USER: postgres TEST_DB_PASSWORD: postgres run: npm run migrate:test - name: Check migration safety run: npm run migrate:safety-check deploy-migrations: needs: test-migrations runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: '16' - name: Install dependencies run: npm ci - name: Run production migrations env: DB_HOST: ${{ secrets.PROD_DB_HOST }} ``` -------------------------------- ### Modern Template Installation Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/project-setup/framework-specific-setup.md Installs complete project configurations using the `--template` parameter for various frameworks. The `--yes` flag automates the process by accepting default configurations. ```bash npx claude-code-templates@latest --template=react --yes npx claude-code-templates@latest --template=python --yes npx claude-code-templates@latest --template=nodejs --yes npx claude-code-templates@latest --template=vue --yes npx claude-code-templates@latest --template=django --yes ``` -------------------------------- ### Individual Component Installation Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/project-setup/framework-specific-setup.md Installs specific components such as agents, commands, or MCPs using dedicated flags. This allows for granular customization of the project setup. ```bash npx claude-code-templates@latest --agent=react-performance --yes npx claude-code-templates@latest --command=check-file --yes npx claude-code-templates@latest --mcp=github-integration --yes ``` -------------------------------- ### Beginner: Performance Testing - Redis vs Memcached Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/simulation/SIMULATION_EXAMPLES.md Tests Redis versus Memcached for session storage under load, simulating 10,000 concurrent users. ```bash /dev:code-permutation-tester Test Redis vs Memcached for session storage with 10k concurrent users ``` -------------------------------- ### Business Scenario Explorer Output Example Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/simulation/SIMULATION_EXAMPLES.md An example output for the Business Scenario Explorer, detailing European market expansion analysis with executive summaries, scenario matrices, and key metrics. ```APIDOC ## Business Scenario Analysis: European Market Expansion ### Executive Summary - Planning horizon: 24 months - Scenarios modeled: 6 (base, optimistic, pessimistic, regulatory delay, competitive entry, economic downturn) - Key decision points: Market selection (Month 3), Partnership strategy (Month 6), Full launch (Month 12) - Recommended strategy: Phased entry starting with DACH region ### Scenario Outcomes Matrix | Scenario | Probability | Year 1 Revenue | Year 2 Revenue | Key Risks | Success Factors | |----------|-------------|----------------|----------------|-----------|-----------------| | Base Case | 45% | €2.5M | €8.2M | Regulatory complexity | Local partnerships | | Optimistic | 20% | €4.1M | €15.6M | Over-expansion | Strong product-market fit | ... ``` -------------------------------- ### Legacy Template Installation Example (Deprecated) Source: https://github.com/davila7/claude-code-templates/blob/main/docu/docs/cli-options.md Illustrates the deprecated method of installing templates using `--language` and `--framework` flags. ```bash npx claude-code-templates@latest --language=javascript-typescript --framework=react --yes ``` -------------------------------- ### Playwright E2E Test Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/testing/e2e-setup.md Installs Playwright, downloads browser binaries, and enables test recording for E2E testing. ```bash npm install -D @playwright/test npx playwright install npx playwright codegen # Record tests ``` -------------------------------- ### Selenium WebDriver E2E Test Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/testing/e2e-setup.md Installs the Selenium WebDriver Node.js package and notes the requirement for browser driver installation. ```bash npm install -D selenium-webdriver # Install browser drivers ``` -------------------------------- ### Validation and Testing Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-monorepo.md Verifying monorepo configuration, package creation, cross-package dependencies, build pipelines, development workflows, and CI/CD integration. ```bash # Example: Test cross-package dependencies # cd packages/package-a # npm install # cd ../package-b # npm install # npm run test # Example: Verify build artifacts # ls dist/ ``` -------------------------------- ### Build System Integration Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-monorepo.md Configuration for build orchestration, task running, dependency graph analysis, affected package detection, parallel builds, caching, and incremental builds. ```json // Example: turbo.json (Turborepo) // { // "$schema": "https://turborepo.org/schema.json", // "pipeline": { // "build": { // "dependsOn": ["^build"], // "outputs": ["dist/**"] // }, // "lint": { // "outputs": [".eslintcache"] // }, // "test": { // "outputs": ["coverage/**"] // } // } // } ``` -------------------------------- ### Kubernetes PersistentVolumeClaim (PVC) Example Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/deployment/setup-kubernetes-deployment.md Example of a Kubernetes PersistentVolumeClaim (PVC) to request persistent storage for applications. PVCs abstract the underlying storage details. ```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: my-app-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi ``` -------------------------------- ### Install Python Linting Tools Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-linting.md Installs common Python linting and code formatting tools including flake8, black, isort, mypy, and pylint. ```bash pip install flake8 black isort mypy pylint ``` -------------------------------- ### Project Analysis and Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/project-management/init-project.md Parses project type and framework from arguments or analyzes the current directory. Creates the project directory structure and validates framework appropriateness. ```bash # Parse project type and framework from arguments $ARGUMENTS # If no arguments provided, analyze current directory and ask user for project type and framework # Create project directory structure if needed # Validate that the chosen framework is appropriate for the project type ``` -------------------------------- ### Kubernetes NetworkPolicy Example Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/deployment/setup-kubernetes-deployment.md Example of a Kubernetes NetworkPolicy to control traffic flow between pods and network endpoints. NetworkPolicies enhance security by enforcing network segmentation. ```yaml apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: allow-frontend-to-backend namespace: default spec: podSelector: matchLabels: app: backend policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app: frontend ports: - protocol: TCP port: 8080 ``` -------------------------------- ### Install JavaScript/TypeScript Linting Tools Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-linting.md Installs ESLint, TypeScript ESLint parser and plugin, Prettier, and related ESLint configuration for JavaScript and TypeScript projects. ```bash npm install -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin npm install -D prettier eslint-config-prettier eslint-plugin-prettier ``` -------------------------------- ### Technology: Platform Migration Decisions Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/simulation/SIMULATION_EXAMPLES.md Uses a decision-tree explorer to evaluate strategic platform migration choices, such as moving to microservices versus optimizing a monolith. ```bash # Platform migration decisions /simulation:decision-tree-explorer Should we migrate to microservices architecture or optimize our current monolith for 5x user growth? ``` -------------------------------- ### Kubernetes Secret Example Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/deployment/setup-kubernetes-deployment.md Example of a Kubernetes Secret for storing sensitive information like passwords or API keys. Secrets are base64 encoded and should be used for sensitive data. ```yaml apiVersion: v1 kind: Secret metadata: name: my-app-secret type: Opaque data: db.password: "c2VjcmV0UGFzc3dvcmQ=" api.token: "YWJjZGVmMTIzNDU2Nzg5MA==" ``` -------------------------------- ### Setup Husky and lint-staged for Pre-commit Hooks Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-formatting.md Installs Husky and lint-staged as development dependencies and configures lint-staged to run Prettier and ESLint on staged JavaScript/TypeScript files before committing. ```bash npm install -D husky lint-staged echo '{"*.{js,ts,tsx}": ["prettier --write", "eslint --fix"]}' > .lintstagedrc ``` -------------------------------- ### Validation and Testing of Development Environment Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-development-environment.md This snippet focuses on validating the entire development environment setup, including testing tool installations, server startup, database connections, build processes, and code quality tools. ```bash # Example: Development environment health check script (health_check.sh) #!/bin/bash echo "Checking Node.js version..." node -v echo "Checking npm version..." npm -v echo "Checking Git version..." git --version echo "Attempting to connect to development database..." # Replace with your actual database connection command # psql -h localhost -U user -d mydb -c '\q' if [ $? -eq 0 ]; then echo "Database connection successful." else echo "Database connection failed." fi echo "Running linter..." npm run lint echo "Running tests..." npm test echo "Development environment health check complete." ``` -------------------------------- ### Intermediate: Technical Simulation - Microservices Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/simulation/SIMULATION_EXAMPLES.md Designs a microservices architecture for an e-commerce platform supporting over 1 million users with real-time inventory and personalization. ```bash /dev:architecture-scenario-explorer Design microservices architecture for e-commerce platform handling 1M+ users with real-time inventory and personalization ``` -------------------------------- ### Documentation and Quality Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/project-management/init-project.md Generates comprehensive README, CONTRIBUTING.md, and API documentation (JSDoc, Sphinx). Adds code quality badges and shields. ```markdown # Generate comprehensive README with installation and usage instructions # Create CONTRIBUTING.md with development guidelines # Set up API documentation generation (JSDoc, Sphinx, etc.) # Add code quality badges and shields ``` -------------------------------- ### Intermediate: Business Analysis - European Expansion Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/simulation/SIMULATION_EXAMPLES.md Evaluates European market expansion for a fintech product, considering GDPR, local partnerships, and regulatory timelines. ```bash /simulation:business-scenario-explorer Evaluate European market expansion for fintech product considering GDPR compliance, local partnerships, and regulatory approval timelines ``` -------------------------------- ### Install Black and isort for Python Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-formatting.md Installs the Black formatter and isort for Python code organization. It also creates a pyproject.toml file to configure Black's line length and target Python version. ```bash pip install black isort echo '[tool.black]\nline-length = 88\ntarget-version = ["py38"]' > pyproject.toml ``` -------------------------------- ### Version Management Strategy Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/setup/setup-monorepo.md Configuring versioning strategies (independent vs. fixed), changelog generation, release workflows, semantic versioning, and dependency updates. ```json // Example: lerna.json versioning (Lerna) // { // "packages": [ // "packages/*" // ], // "version": "independent" // or "0.0.0" for fixed // } ``` -------------------------------- ### Timeline Acceleration Testing Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/simulation/SIMULATION_EXAMPLES.md Compresses long-term planning, like a product roadmap, into hours to test various feature prioritization strategies. ```bash # Compress months of planning into hours /simulation:timeline-compressor Compress 12-month product roadmap to test 5 different feature prioritization strategies ``` -------------------------------- ### Base Project Structure Setup Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/project-management/init-project.md Creates essential directories (src/, tests/, docs/, etc.), initializes a Git repository with a proper .gitignore, and generates a README.md file. Sets up the file structure based on project type and framework. ```shell # Create essential directories (src/, tests/, docs/, etc.) # Initialize git repository with proper .gitignore for the project type # Create README.md with project description and setup instructions # Set up proper file structure based on project type and framework ``` -------------------------------- ### Initialize Storybook for SvelteKit Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/commands/svelte/svelte:storybook-setup.md Command to initialize Storybook in a SvelteKit project. This command automatically detects the framework and sets up basic configuration files. ```bash npx storybook@latest init ```