Selects, confirms, inputs, spinners, progress bars. Everything you need to build polished CLIs. Zero dependencies, zero supply chain risk.
┌ create-app│◆ Project name?│ my-app◆ Pick a framework│ Next.js◆ Select features│ TypeScript, Vitest◆ Initialize git?│ Yes◆ Project created!└ Happy coding.
Brand theming
Hex, RGB, named colors, or bring chalk/picocolors. The accent color flows through every prompt, spinner, and focus indicator.
setTheme({ accent: "#22d3ee" })┌ create-app│◆ Project name?│ my-app◇ Pick a framework│ ◉ Next.js (React SSR)│ ○ Hono│ ○ Astro└
Every prompt, one API
◇ Pick a framework│ ◉ Next.js (React SSR)│ ○ Hono│ ○ Astro└
◇ Deploy to production?│ Yes / No└
◇ Project name?│ my-app└
◇ Select features│ >■ TypeScript│ □ ESLint│ ■ Vitest│ □ GitHub Actions└
◇ Enter your API key│ ••••••••└
◇ Select timezone│ pac│ ◉ Pacific (UTC-8)│ ○ Asia/Pacific└
◇ Port number?│ 3000└
Display utilities
◒ Installing dependencies...◆ Installed 142 packages
████████████░░░░░░░░ Downloading... 60%◆ Download complete
│◆ Install dependencies◒ Generating types...○ Run tests○ Build project│
││ ────────────────────│ Next steps│ cd my-app│ npm run dev│ ────────────────────
Only node:process, node:stream, node:crypto. No transitive supply chain risk.
Full generics, typed cancel via symbol, narrowing type guards. No @types/ needed.
setTheme({ accent: "#hex" }). One line. Works with chalk, picocolors, or raw ANSI.
j/k/h/l navigation, Ctrl+A/E/U/W editing. Arrow keys too.
group() chains prompts. Each step sees previous answers. Cancel propagates.
Smart terminals like Anyterm render native UI. Standard terminals get the TUI. Same code.
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
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
Pick a framework
ESC ] 7770 ; {"v":1,"type":"select","message":"Pick a framework",...} BELEcosystem
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
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