A starter template for building Node.js CLI tools with both CLI and TUI modes.
- 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
```bash
git clone cd tui-starter pnpm install
pnpm dev
pnpm build node dist/cli.js hello ```
```bash
tui-starter hello --name World
tui-starter ```
``` 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 ```
```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 ```
- Rename `tui-starter` in `package.json` and `src/cli.ts`
- Update description in `README.md`
- Add your commands in `src/commands/`
- Build your TUI in `src/components/`
from https://github.com/Shadowzzh/tui-starter
No comments:
Post a Comment