Skip to content

create-termui-app

create-termui-app scaffolds a new TermUI project. It generates a working app with the right tsconfig.json, termui.config.ts, theme file, and source entry point so you can start coding straight away.

Usage

·CODE
npx create-termui-app my-app

Run the command and the interactive prompt walks you through three choices: template, theme, and optional features. When it finishes, your project folder is ready.

Skip the prompts

Pass all options as flags to run without any interaction:

·CODE
npx create-termui-app my-app --template dashboard --theme nord --yes

CLI flags

FlagTypeDescription
<name>positionalProject name and output folder
--template <key>stringTemplate to use (see list below)
--theme <name>stringBuilt-in theme name (e.g. nord, dracula)
--yesbooleanSkip all prompts; use defaults or provided flags

The add subcommand

create-termui-app add copies a component into an existing project:

·CODE
npx create-termui-app add <component> [--dir <path>] [--dry-run] [--yes]
FlagDescription
<component>Component name to add
--dir <path>Target directory (defaults to current working directory)
--dry-runPrint what would be written without writing any files
--yesSkip confirmation prompts

Templates

KeyDescription
emptyMinimal starting point with a counter and keymap
dashboardReal-time data layout with panels and charts
interactive-toolList navigation, item toggling, inline text input
cli-wrapperSpawns a child process and streams its output to the terminal
cli-toolMinimal app with a box, text, and useKeymap
file-managerThree-pane file browser with tree, picker, and preview
ai-assistantChat interface wired to the Claude API with a mock fallback
form-wizardMulti-step form with a Wizard component

Generated project structure

Every template produces at least these files. Template-specific files go under src/:

·CODE
my-app/
├── src/
│   └── index.tsx          # App entry point
├── themes/
│   └── <theme-name>.tss   # Selected built-in theme
├── package.json
├── tsconfig.json
└── termui.config.ts

The dashboard, file-manager, and ai-assistant templates add additional source files inside src/.

package.json scripts

ScriptCommandDescription
devbun --watch src/index.tsxRun with file-watching
buildtsup src/index.tsx --format esmBundle for distribution
startbun dist/index.jsRun the built output

Requirements

  • Bun >= 1.3.0, the generated projects use Bun as the runtime and bundler. Install it from bun.sh.
  • Node.js, npx requires Node.js to invoke create-termui-app, but the generated project itself runs on Bun.

Next steps

After the scaffolder finishes:

·CODE
cd my-app
bun install
bun run dev

Your app starts in the terminal. Edit src/index.tsx and the dev server reloads automatically.

From there:

  • Change the theme in termui.config.ts or run the scaffolder again with a different --theme.
  • Add packages from the TermUI ecosystem (@termuijs/store, @termuijs/router, @termuijs/data) as your app grows.
  • Run npx create-termui-app add <component> to copy additional components into the project.