Skip to content

[FEATURE] First-party CLI #72

Description

@LukasNiessen

In short

Today you run ArchUnitTS from inside a test (Jest/Vitest). This adds a terminal command (archunit check) so you can run rules and draw graphs from CI, a pre-commit hook, or ad-hoc — without writing a test.

Problem

ArchUnitTS is test-runner-only (package.json has no bin). A CLI lets people run checks and generate graphs/reports from CI one-liners, pre-commit hooks, and ad-hoc exploration without a test file, broadening reach.

Proposal

Ship a bin/ CLI over the existing engine: archunit check (non-zero exit on violations), archunit graph, and archunit init to scaffold a config.

Acceptance criteria

  • npx archunit check runs configured rules and exits non-zero on violation.
  • archunit graph --format mermaid --focus "src/**" writes a graph via the existing exporter.
  • archunit init scaffolds a starter config; documented in the README.
  • Empty-test protection still triggers from the CLI path.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions