# TypeScript CLI Project with Ink

A modern TypeScript CLI project setup with Ink for building interactive command-line interfaces.

## Technology Stack

- **Runtime**: Node.js 24 (managed by mise)
- **Package Manager**: pnpm
- **Language**: TypeScript
- **CLI Framework**: Ink (React for CLIs)
- **Build Tool**: tsup
- **Testing**: Vitest
- **Code Quality**:
  - Formatter: Biome
  - Linters: Oxlint + ESLint
  - Type Checking: TypeScript
  - Security: secretlint
  - Spell Checker: cspell
  - Git Hooks: simple-git-hooks + lint-staged

## Getting Started

### Prerequisites

- Install [mise](https://mise.jdx.dev/) for runtime management
- Run `mise install` to install Node.js and pnpm

### Installation

```bash
pnpm install
```

### Development

```bash
# Run in development mode with hot reload
pnpm dev

# Run all checks (format, lint, typecheck)
pnpm check

# Fix formatting and linting issues
pnpm fix

# Run tests
pnpm test

# Run tests with UI
pnpm test:ui

# Build the project
pnpm build
```

## Project Structure

```
.
├── src/
│   ├── index.tsx       # Main application entry point
│   └── index.test.tsx  # Example test file
├── dist/               # Build output (generated)
├── .mise.toml          # Runtime configuration
├── biome.json          # Formatter configuration
├── .oxlintrc.json      # Oxlint configuration
├── eslint.config.js    # ESLint configuration
├── tsconfig.json       # TypeScript configuration
├── vitest.config.ts    # Vitest configuration
├── tsup.config.ts      # Build configuration
└── package.json        # Project dependencies and scripts
```

## Git Hooks

Pre-commit hooks are configured to run:
- Code formatting (Biome)
- Linting (Oxlint + ESLint)
- Type checking
- Security checks (secretlint)
- Spell checking (cspell)

## Scripts

- `pnpm dev` - Start development server
- `pnpm build` - Build for production
- `pnpm test` - Run tests
- `pnpm test:ui` - Run tests with UI
- `pnpm test:coverage` - Run tests with coverage
- `pnpm check` - Run all checks
- `pnpm fix` - Fix all auto-fixable issues
- `pnpm format` - Format code
- `pnpm lint` - Run linters
- `pnpm typecheck` - Check TypeScript types
- `pnpm secretlint` - Check for secrets
- `pnpm spell` - Check spelling

## License

ISC