Command Palette

Search for a command to run...

oorty init

Initialize testing infrastructure in your project.

Usage

Terminal
npx oorty@latest init [options]

Options

OptionDefaultDescription
-y, --yesfalseSkip all prompts and use defaults
--typescripttrueUse TypeScript for test files
--src-dirautoProject uses src directory structure
--skip-installfalseSkip installing dependencies
--cwd <path>.Set the working directory

What It Does

The init command performs the following steps:

  1. Detects your framework - Next.js, React, Vite, Remix, Astro, etc.
  2. Detects your package manager - npm, yarn, pnpm, or bun
  3. Creates oorty.json - The configuration manifest with directory paths
  4. Creates .oorty/ directory - Single source of truth for cache, plans, analysis, and logs
  5. Creates vitest.config.ts - Configured for your framework (if not already present)
  6. Creates playwright.config.ts - With sensible defaults (if not already present)
  7. Creates GitHub Actions workflow - CI ready out of the box (optional)
  8. Installs dependencies - Vitest, Playwright, Testing Library

Examples

Initialize with all defaults (no prompts):

Terminal
npx oorty@latest init -y

Initialize in a specific directory:

Terminal
npx oorty@latest init --cwd ./my-app

Initialize without installing dependencies:

Terminal
npx oorty@latest init --skip-install

Output

After running init, your project will have the following new files:

Generated Files
my-app/
├── .github/
│ └── workflows/
│ └── test.yml # CI workflow (if selected)
├── .oorty/ # Single source of truth
│ ├── cache/ # Ephemeral (gitignored)
│ ├── plans/ # Test plans (tracked)
│ ├── analysis/ # Coverage snapshots (gitignored)
│ └── logs/ # Debug logs (gitignored)
├── oorty.json # Configuration manifest
├── vitest.config.ts # Unit/component test config
└── playwright.config.ts # E2E test config

The .oorty/ directory is the single source of truth for auto-generated files. Plans in .oorty/plans/ are tracked in git for CI/collaboration, while cache and analysis are gitignored and rebuilt locally.

Next: oorty doctor

Learn how to validate your setup.

doctor command