Skip to content

Quick Start

  1. Initialize configuration

    Terminal window
    npx repotype init .

    This creates a repotype.yaml with sensible defaults.

  2. Validate your repository

    Terminal window
    npx repotype validate .

    See what violations exist in your current structure.

  3. Fix auto-fixable issues

    Terminal window
    npx repotype fix .

    Automatically fix naming, add missing files, etc.

  4. Generate a report

    Terminal window
    npx repotype report . --output report.md

    Get a compliance report for documentation or audits.

The init command creates a starter repotype.yaml:

repotype.yaml
version: "1"
defaults:
unmatchedFiles: deny # Deny-by-default
files:
- id: source-files
glob: "src/**/*.{ts,tsx,js,jsx}"
- id: config-files
glob: "*.{json,yaml,yml}"
- id: documentation
glob: "docs/**/*.md"
- id: root-readme
glob: "README.md"
Terminal window
# See what's wrong
npx repotype validate . --json
# Explain a specific file's rules
npx repotype explain src/utils/helper.ts
# Preview fixes without applying
npx repotype fix . --dry-run
# Install git hooks for automatic validation
npx repotype install-checks --hook both

For maximum enforcement, initialize with strict mode:

Terminal window
npx repotype init . --type strict

This creates a config that explicitly allowlists every path.