TypeScript · zero dependencies · MIT

Beautiful terminal prompts,done right.

Selects, confirms, inputs, spinners, progress bars. Everything you need to build polished CLIs. Zero dependencies, zero supply chain risk.

create-app
create-app
Project name?
my-app
Pick a framework
Next.js
Select features
TypeScript, Vitest
Initialize git?
Yes
Project created!
Happy coding.

Brand theming

One line. Any color.

Hex, RGB, named colors, or bring chalk/picocolors. The accent color flows through every prompt, spinner, and focus indicator.

setTheme({ accent: "#22d3ee" })
create-app
create-app
Project name?
my-app
Pick a framework
Next.js (React SSR)
○ Hono
○ Astro

Every prompt, one API

Every prompt, rendered in your terminal

select
Pick a framework
Next.js (React SSR)
○ Hono
○ Astro
confirm
Deploy to production?
Yes / No
input
Project name?
my-app
multiselect
Select features
> TypeScript
ESLint
Vitest
GitHub Actions
password
Enter your API key
••••••••
search
Select timezone
pac
Pacific (UTC-8)
○ Asia/Pacific
number
Port number?
3000

Display utilities

Spinners, progress, tasks, and notes

spinner
Installing dependencies...
Installed 142 packages
progress
████████████░░░░░░░░ Downloading... 60%
Download complete
tasks
Install dependencies
Generating types...
Run tests
Build project
note
────────────────────
Next steps
cd my-app
npm run dev
────────────────────

zero dependencies

Only node:process, node:stream, node:crypto. No transitive supply chain risk.

strict typescript

Full generics, typed cancel via symbol, narrowing type guards. No @types/ needed.

brand theming

setTheme({ accent: "#hex" }). One line. Works with chalk, picocolors, or raw ANSI.

vim bindings

j/k/h/l navigation, Ctrl+A/E/U/W editing. Arrow keys too.

composable

group() chains prompts. Each step sees previous answers. Cancel propagates.

OSC 7770

Smart terminals like Anyterm render native UI. Standard terminals get the TUI. Same code.

Full example
import {
  setTheme, intro, outro,
  select, confirm, input, isCancel, log,
} from 'termprompt';

setTheme({ accent: '#7c3aed' });
intro('create-app');

const name = await input({
  message: 'Project name?',
  placeholder: 'my-app',
});
if (isCancel(name)) process.exit(0);

const framework = await select({
  message: 'Pick a framework',
  options: [
    { value: 'next', label: 'Next.js', hint: 'React SSR' },
    { value: 'hono', label: 'Hono', hint: 'Edge-first' },
    { value: 'astro', label: 'Astro', hint: 'Content sites' },
  ],
});
if (isCancel(framework)) process.exit(0);

log.success(`Created ${name} with ${framework}.`);
outro('Happy coding.');

OSC 7770

What if terminals got smarter?

Every termprompt call quietly emits structured data via OSC 7770. Terminals that support the protocol render native dropdowns, checkboxes, and inputs instead of the TUI. Your code stays the same.

Standard terminal

Pick a framework
Next.js (React SSR)
○ Hono (Edge-first)
○ Astro (Content-first)

Smart terminal

anyterm.dev

Pick a framework

Next.jsReact SSR
HonoEdge-first
AstroContent-first
ESC ] 7770 ; {"v":1,"type":"select","message":"Pick a framework",...} BEL

Ecosystem

Where do your users see native prompts?

Terminals adopt OSC 7770 independently. Your code ships once, the ecosystem keeps growing.

Building a terminal? Implement OSC 7770 and get listed here. The spec is open.

Community

Who's using termprompt?

Companies and developers shipping with termprompt in production. Get your logo and a dofollow backlink on this page.

Using termprompt in production? Get your company featured here. We add your logo with a dofollow backlink, visible to every developer who visits.

Your logo on this page

Visible to every developer who visits

Dofollow backlink

Direct SEO value to your domain

Community recognition

Show you build with modern tools

Your company could be here

Get featured

We'll review your submission and reach out via email. Your information is only used for this purpose.

$ npm install termprompt
MIT License·TypeScript·Zero Dependencies