Jesús Pérez fbfde113cd init repo
2025-12-18 01:04:07 +00:00
2025-12-18 01:04:07 +00:00

TypeDialog Logo

TypeDialog

A powerful, standalone library and CLI tool for creating interactive forms and prompts using the inquire crate.

Features

  • 3 Backends: CLI, TUI (Terminal UI), Web (HTTP)
  • 8 Prompt Types: text, confirm, select, multi-select, password, custom, editor, date
  • TOML-based Forms: Declarative UI definitions
  • Dynamic Logic: Conditional fields, smart defaults, real-time updates
  • Multi-language: Fluent (.ftl) and TOML translations
  • Multiple Outputs: JSON, YAML, TOML, text formats
  • Zero Dependencies: Works everywhere, no Nushell required

Quick Start

Installation

See docs/INSTALLATION.md for detailed setup.

Requirements:

  • Rust 1.70+ - Install
  • just - cargo install just (or brew install just)

Build & Run

# Clone
git clone https://github.com/anthropics/typedialog.git
cd typedialog

# Build
just build::default

# Test
just test::all

# Run example
cargo run --example form

CLI Example

# Simple prompt
typedialog text "Enter your name"

# With options
typedialog select "Choose role" Admin User Guest

# Output as JSON
typedialog text "Email" --format json

TUI Example

Interactive multi-panel form:

cargo run -p typedialog-tui --example form_with_autocompletion

Web Example

Start HTTP server:

cargo run -p typedialog-web -- --config config/web/dev.toml
# Open http://localhost:3000

Documentation

Complete documentation in docs/:

Document Purpose
INSTALLATION.md Prerequisites & setup
DEVELOPMENT.md Development workflows
BUILD.md Building & cross-compilation
RELEASE.md Release process
CONFIGURATION.md Backend configuration

Examples

Complete working examples in examples/:

See examples/README.md for complete guide.

Development

Use just for all development tasks:

# Show available commands
just --list

# Format, lint, test
just check-all

# Build & package
just distro::build-release
just distro::create-package

# Full CI/CD
just ci::full

See docs/DEVELOPMENT.md for details.

Building & Distribution

Build from Source

just build::release

Binaries in target/release/

Create Distribution Package

just distro::build-release
just distro::create-package
just distro::create-checksums

Package includes binaries, configs, and installers.

See docs/BUILD.md for complete guide.

Install Distributed Release

# Linux/macOS
curl -fsSL https://github.com/anthropics/typedialog/releases/download/latest/install.sh | bash

# Windows PowerShell
irm https://github.com/anthropics/typedialog/releases/download/latest/install.ps1 | iex

See docs/RELEASE.md for release workflow.

Configuration

Pre-configured settings for each backend and environment:

config/
├── cli/         # default, dev, production
├── tui/         # default, dev, production
└── web/         # default, dev, production

See docs/CONFIGURATION.md for all options.

Project Structure

typedialog/
├── crates/
│   ├── typedialog-core/       # Core library
│   ├── typedialog/            # CLI binary
│   ├── typedialog-tui/        # TUI binary
│   └── typedialog-web/        # Web binary
├── config/                      # Configuration files
├── examples/                    # Working examples
├── scripts/                     # Build automation
├── installers/                  # Installation scripts
├── docs/                        # Documentation
├── justfile                     # Command orchestration
└── Cargo.toml                   # Workspace manifest

Key Technologies

  • Rust - Type-safe systems language
  • inquire - Interactive prompt library
  • Ratatui - TUI framework
  • Actix-web - Web framework
  • TOML - Configuration language
  • just - Command orchestration

Commands at a Glance

# Development
just fmt                # Format code
just lint               # Lint code
just test::all          # Run tests
just dev::watch         # Watch & rebuild
just dev::docs          # Generate docs

# Building
just build::default     # Debug build
just build::release     # Release build
just distro::cross      # Cross-compile

# CI/CD
just ci::full           # Complete pipeline
just check-all          # Format + lint + test

# Distribution
just distro::build-release      # Release build
just distro::create-package     # Package
just distro::create-checksums   # Checksums
just distro::package-release    # Prepare release

System Requirements

Minimum

  • Rust 1.70+
  • 4GB RAM
  • 2GB disk space

For Cross-Compilation

  • Docker (or cargo-cross)

Optional Tools

  • Nickel CLI - For type-safe schemas
  • cargo-watch - For hot-reload
  • cargo-cross - For cross-compilation

See docs/INSTALLATION.md for setup.

License & Compliance

All dependencies are compatible with MIT license.

Getting Help

  1. Documentation - Start with docs/README.md
  2. Examples - Check examples/README.md
  3. Issues - Open on GitHub

Contributing

Contributions welcome! See documentation for setup and guidelines.


Ready to get started?docs/INSTALLATION.md

Description
Typed Dialogs for Inputs, Forms and Schemas you can tRust
Readme MIT 2.5 MiB
Languages
Rust 86.2%
Shell 3.3%
Just 3.2%
HTML 2.6%
JavaScript 1%
Other 3.6%