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
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 initPreview changes only:
npx @tylercore/treg init --dry-runAdd selected features to an existing project:
npx @tylercore/treg add --features lint,formatCommands
| 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,formatAdd format using oxfmt:
npx @tylercore/treg add --features format --formatter oxfmtAdd test using vitest:
npx @tylercore/treg add --features test --test-runner vitestDefaults
Framework detection order:
nuxt -> next -> react -> vue -> svelte -> nodeDefault test runner:
vue/nuxt:vitest- others:
jest
Default formatter:
prettierAI 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.