# Build Production-Grade CLIs in TypeScript

> Command-line tools with automatic help generation, type-safe argument parsing, and interactive UI. Ship CLIs with autocomplete, progress bars, and prompts quickly.

Canonical: https://cli.do/

## In code

```ts
import { CLI } from 'cli.do'

// Deploy with progress tracking
cli.command({
  name: 'deploy',
  args: { path: 'string' },
  async run($) {
    const progress = $.UI.create.ProgressBar({ total: 2 })
    progress.update('Building app')
    await $.Build.run({ path: $.args.path })
    progress.update('Deploying to edge')
    const deploy = await $.Deploy.to.Edge({ env: 'production' })
    $.UI.print.Success(`Deployed to ${deploy.url}`)
  }
})
```

## Frequently asked questions

### What languages and frameworks does cli.do support?

First-class TypeScript support with Node.js 18+, Bun, and Deno, generating standalone binaries for Linux, macOS, and Windows.

### How do I debug production CLI issues?

Real-time structured logging, distributed tracing via OpenTelemetry, time-travel debugging, and built-in --verbose/--debug flags with zero manual instrumentation.

### Can I test CLIs locally before deploying?

Yes, with hot reload, instant rebuilds (<100ms), production parity, mock arguments, and integration with Jest/Vitest test frameworks.

### What about distribution and updates?

Auto-generate installers for npm, Homebrew, apt, yum, and standalone binaries with built-in update notifications and shell completions for Bash/Zsh/Fish.

### How do I handle interactive prompts and UI?

Rich terminal UI with Ink-powered components including spinners, progress bars, tables, forms, and interactive menus with type-safe validation and screen reader support.

## Part of Platform.do

cli.do is one of the primitives of Platform.do, in the Build layer (ship from code, cli or mcp). Every .do shares one grammar, Business-as-Code, and one SDK.

- What is Business-as-Code? https://platform.do/business-as-code
- Platform.do: https://platform.do/
- Docs: https://docs.platform.do
