create-tui
v0.0.10
Published
CLI tool for creating OpenTUI projects from templates
Maintainers
Readme
create-tui
A CLI tool for creating OpenTUI projects from templates.
Installation
# Use with bun (no installation required)
bun create tui my-tui-projectWhat It Does
When you run create-tui, the CLI performs the following steps:
- Template Validation — Validates the template exists on GitHub
- Project Directory Setup — Creates the project directory (or prompts to delete if it already exists)
- Template Download — Downloads the selected template from GitHub
- Package Configuration — Updates
package.jsonwith your project name - Dependency Installation — Installs all dependencies using your package manager
- Git Initialization — Optionally initializes a git repository
- Update Check — Checks for newer versions and notifies you if an update is available
Usage
Interactive Mode
bun create tuiThis will prompt you for:
- Project name
- Template choice (Core, React, Solid, or Custom)
With Arguments
# Create a React project
bun create tui -t react my-react-app
# Create a Core project
bun create tui -t core my-core-app
# Create a Solid project
bun create tui -t solid my-solid-appTemplate Formats
The CLI supports three formats for specifying templates:
1. Aliases (Built-in Templates)
Simple names for the official templates:
bun create tui -t core my-project
bun create tui -t react my-project
bun create tui -t solid my-project2. Shorthand (owner/repo)
Use any GitHub repository with a shorthand syntax:
# Use a repository root as template
bun create tui -t username/my-template my-project
# Use a nested directory within a repository
bun create tui -t username/repo/path/to/template my-project3. Full GitHub URL
For maximum clarity or when you need to specify a branch:
# Repository root
bun create tui -t https://github.com/username/repo my-project
# Specific branch and path
bun create tui -t https://github.com/username/repo/tree/main/templates/starter my-project
# With verbose output to see detailed progress
bun create tui -t https://github.com/username/repo -v my-projectAll templates must have a package.json file at the template root.
Available Templates
Built-in Templates (Aliases)
| Alias | Description |
| ------- | ----------------------------------------- |
| core | OpenTUI project with core functionality |
| react | OpenTUI project with React integration |
| solid | OpenTUI project with Solid.js integration |
Custom Templates
Any public GitHub repository can be used as a template. Use either shorthand (owner/repo/path) or full GitHub URLs.
Arguments
| Argument | Description | Required |
| -------------- | -------------------------------------- | -------- |
| project-name | The folder to bootstrap the project in | No |
Options
| Option | Alias | Description |
| -------------- | ----- | --------------------------------------------------------------------------- |
| --template | -t | Template: alias (core, react, solid), shorthand (owner/repo), or GitHub URL |
| --no-git | | Skip initializing a git repository |
| --no-install | | Skip installing dependencies |
| --verbose | -v | Show detailed progress during template validation and download |
| --help | -h | Show help information |
| --version | | Show version number |
Update Notifications
The CLI automatically checks for newer versions after each run. If an update is available, you'll see a notification with the command to update:
Update available! 1.0.0 -> 1.1.0
Run bun add -g create-tui@latest to updateThis check is non-blocking and times out after 3 seconds to avoid slowing down the CLI.
Development
# Install dependencies
bun install
# Run in development mode
bun run dev
# Build for production
bun run buildLicense
MIT
