Total Pageviews

Friday, 9 October 2026

TUI-Starter

 A starter template for building Node.js CLI tools with both CLI and TUI modes.

Features

  • CLI + TUI dual mode - Commander for CLI, Ink for TUI
  • TypeScript - Full type safety
  • Biome - Fast formatting and linting
  • Zero-config build - tsup for bundling

Quick Start

```bash

Use this template

git clone cd tui-starter pnpm install

Run TUI

pnpm dev

Run CLI

pnpm build node dist/cli.js hello ```

Usage

```bash

CLI mode

tui-starter hello --name World

TUI mode

tui-starter ```

Project Structure

``` src/ ├── cli.ts # CLI entry (commander) ├── index.ts # TUI entry (ink) ├── commands/ # Command definitions ├── components/ # TUI components ├── hooks/ # React hooks ├── lib/ # Business logic ├── utils/ # Utilities └── types.ts # Type definitions ```

Development

```bash pnpm dev # Start TUI in development pnpm build # Build for production pnpm lint # Check code pnpm lint:fix # Fix issues pnpm typecheck # Check types ```

Customize

  1. Rename `tui-starter` in `package.json` and `src/cli.ts`
  2. Update description in `README.md`
  3. Add your commands in `src/commands/`
  4. Build your TUI in `src/components/`

from  https://github.com/Shadowzzh/tui-starter

No comments:

Post a Comment