JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 52
  • Score
    100M100P100Q93243F
  • License MIT

Treg is a CLI tool that injects an engineering immune system into existing projects.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tylercore/treg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @tylercore/treg

    npm version npm downloads License TypeScript

    What is Treg?

    Treg is a CLI tool that sets up code quality, tooling, and project standards for modern applications.

    It injects an engineering immune system into your project.

    When developers and AI collaborate under fast iteration, codebases tend to drift, leading to inconsistent tooling, duplicated rules, and fragile workflows. Treg restores balance and keeps your repository clean, maintainable, and extensible.

    Treg focuses on infrastructure setup (ESLint, Prettier, TypeScript, testing, hooks, AI guidance), not product logic.


    Features

    Treg can configure:

    • TypeScript
    • Linting with ESLint
    • Formatting with Prettier or Oxfmt
    • Testing with Jest or Vitest
    • Git hooks with Husky
    • AI rules guidance for supported tools

    Quick Start

    Initialize interactively:

    npx @tylercore/treg init

    Preview changes only:

    npx @tylercore/treg init --dry-run

    Add selected features to an existing project:

    npx @tylercore/treg add --features lint,format

    Commands

    Command Description
    init Initialize the project with an interactive setup flow
    add Add selected features to an existing project
    list Show supported frameworks, features, formatters, and test runners

    Common Usage

    Add only lint + format:

    npx @tylercore/treg add --features lint,format

    Add format using oxfmt:

    npx @tylercore/treg add --features format --formatter oxfmt

    Add test using vitest:

    npx @tylercore/treg add --features test --test-runner vitest

    Defaults

    Framework detection order:

    nuxt -> next -> react -> vue -> svelte -> node

    Default test runner:

    • vue / nuxt: vitest
    • others: jest

    Default formatter:

    prettier

    AI Rules Behavior

    Treg can update AI guidance files for selected tools:

    Tool File
    Claude CLAUDE.md
    Codex AGENTS.md
    Gemini GEMINI.md

    Behavior:

    • only selected tools are updated
    • missing files are created automatically
    • updates happen in the repository root

    Philosophy

    Treg is intentionally narrow in scope.

    It does not generate product architecture. It establishes an engineering baseline that keeps repositories healthy during rapid iteration.