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 acts like a regulatory T cell: it restores balance, suppresses unnecessary chaos, and keeps your repository clean, maintainable, and extensible.
Instead of generating application logic, Treg focuses on the engineering baseline—configuring tools like ESLint, Prettier, and TypeScript to protect your project from long-term entropy.
Regulate the workflow before the workflow regulates you.
Modern projects can move fast, especially with AI-assisted coding.
But speed without constraints often creates invisible damage:
- style drift
- inconsistent tooling
- weak commit hygiene
- missing tests
- unclear AI usage rules
Treg solves that by applying a consistent baseline to an existing repository with a single initialization flow.
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
This keeps the project stable without forcing application-level architecture decisions.
Initialize interactively:
npx @tylercore/treg initPreview changes only:
npx @tylercore/treg init --dry-runAdd features to an existing project:
npx @tylercore/treg add --features lint,format| 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 |
During init, Treg asks for:
-
Package manager
pnpm | npm | yarn | bun -
Features (multi-select, selected by default)
- lint
- format
- TypeScript
- test
- husky
- AI rules guidance
-
Test runner (only when
testis selected)jestvitestskip
-
Formatter (only when
formatis selected)prettieroxfmt
-
AI tools (only when AI rules guidance is selected)
- Claude
- Codex
- Gemini
Initialize project:
npx @tylercore/treg initPreview init plan only:
npx @tylercore/treg init --dry-runAdd 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 vitest--dry-run
--help
--framework <node|react|next|vue|svelte|nuxt>
--features <lint,format,typescript,test,husky>
--dir <path>
--formatter <prettier|oxfmt>
--test-runner <jest|vitest>
--force
--dry-run
--skip-husky-install
--help
Detection order:
nuxt -> next -> react -> vue -> svelte -> node
vue/nuxt:vitest- others:
jest
prettier
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
- selected docs are created automatically when missing
- updates happen in the repository root
- prompts are written directly inside each selected AI guidance document
Treg is intentionally narrow in scope.
It does not try to be a full project generator.
It does not replace team judgment.
It does not force product architecture.
It exists to establish the engineering immune layer that keeps rapid iteration from degrading the codebase over time.