Beautiful, minimal, opinionated CLI prompts inspired by the Clack NPM package

Overview
CliClack Logo

Effortlessly build beautiful command-line apps with Rust 🦀

github.com crates.io docs.rs license

Beautiful, minimal, opinionated CLI prompts inspired by the @clack/prompts npm package.

cargo add cliclack

cliclack in action

cargo run --example basic
cargo run --example log
CliClack Example

💎 Fancy minimal UI
Simple API
🎨 Theme support

Setup

The intro and outro/outro_cancel functions will print a message to begin and end a prompt session respectively.

use cliclack::{intro, outro};

intro("create-my-app")?;
// Do stuff
outro("You're all set!")?;

Input

The input prompt accepts a single line of text trying to parse it into a target type.

use cliclack::input;

let path: String = input("Where should we create your project?")
    .placeholder("./sparkling-solid")
    .validate(|input: &String| {
        if input.is_empty() {
            Err("Please enter a path.")
        } else if !input.starts_with("./") {
            Err("Please enter a relative path")
        } else {
            Ok(())
        }
    })
    .interact()?;

🎨 Theme

A custom theme can be applied for UI rendering. An example of theme customization:

cargo run --example theme
CliClack Magenta Theme

See more

You might also like...
A Rust command that prettifies the ugly `cargo test` output into a beautiful one.
A Rust command that prettifies the ugly `cargo test` output into a beautiful one.

Cargo Pretty Test ✨ A Rust command-line tool that prettifies the ugly cargo test output into a beautiful output. This crate can be also used as a libr

Make beautiful colored code listings in LaTeX with the power of TreeSitter.
Make beautiful colored code listings in LaTeX with the power of TreeSitter.

What is this? This is a CLI tool that consumes TreeSitter's output and transforms it into LaTeX code that will produce syntax-colored code listing. If

A beautiful, tiny traceback and logging library supporting #![no_std] rust.

breadcrumbs Breadcrumbs is a beautiful, tiny traceback and logging library for Rust that offers seamless integration with #![no_std], multi-threading

A Rust CLI to provide last publish dates for packages in a package-lock.json file

NPM Package Age A Rust CLI which if you provide a npm lockfile (package-lock.json to start), it will give you a listing of all of the packages & the l

A very opinionated, zero-configuration shell prompt
A very opinionated, zero-configuration shell prompt

A very opinionated, zero-configuration shell prompt

A lightweight, opinionated CQRS and event sourcing framework targeting serverless architectures.

cqrs A lightweight, opinionated CQRS and event sourcing framework targeting serverless architectures. Command Query Responsibility Segregation (CQRS)

A opinionated and fast static analyzer for PHP.
A opinionated and fast static analyzer for PHP.

TLDR; A static analyzer for PHP. It helps you catch common mistakes in your PHP code. These are the current checks implemented. Extending undefined cl

Opinionated set of extensions for use with rust-script

rust-script-ext Opinionated set of extensions for use with rust-script. Using rust-script to run Rust like a shell script is great! This crate provide

Opinionated, zero-config linter for JavaScript monorepos
Opinionated, zero-config linter for JavaScript monorepos

Sherif: Opinionated, zero-config linter for JavaScript monorepos About Sherif is an opinionated, zero-config linter for JavaScript monorepos. It runs

Owner
Alexander Fadeev
Alexander Fadeev
Simple OpenAI CLI wrapper written in Rust, feat. configurable prompts and models

Quick Start git clone https://github.com/ryantinder/ask-rs cd ask cargo install --path . Example ask tell me about the Lockheed Martin SR71 >> The Loc

Ryan Tinder 3 Aug 9, 2023
Cli tool for git productivity written in Rust and packaged for consumption via NPM

crust ?? cli tool for git productivity written in Rust and packaged for consumption via NPM This repo is identical with @skyneticist/golee in terms of

null 2 Jul 30, 2022
A Rust library for building interactive prompts

inquire is a library for building interactive prompts on terminals. Demo Source Usage Put this line in your Cargo.toml, under [dependencies]. inquire

Mikael Mello 426 Dec 26, 2022
MinMon - an opinionated minimal monitoring and alarming tool

MinMon - an opinionated minimal monitoring and alarming tool (for Linux) This tool is just a single binary and a config file. No database, no GUI, no

Florian Wickert 177 Jan 5, 2023
A beautiful and feature-packed Apple Music CLI

am A beautiful and feature-packed Apple Music CLI! Written in Rust. Installation Nix (recommended) This GitHub repository contains a flake. Add github

Ryan Cao 5 Sep 21, 2023
📦 A Python package manager written in Rust inspired by Cargo.

huak About A Python package manager written in Rust. The Cargo for Python. ⚠️ Disclaimer: huak is currently in its proof-of-concept (PoC) phase. Huak

Chris Pryer 186 Jan 9, 2023
📦 A Python package manager written in Rust inspired by Cargo.

huak About A Python package manager written in Rust. The Cargo for Python. ⚠️ Disclaimer: huak is currently in its Alpha phase. Huak aims to support a

Chris Pryer 161 Oct 9, 2022
:large_orange_diamond: Build beautiful terminal tables with automatic content wrapping

Comfy-table Comfy-table tries to provide utility for building beautiful tables, while being easy to use. Features: Dynamic arrangement of content to a

Arne Beer 525 Jan 8, 2023
More beautiful HTML reports for llvm-cov/cargo-llvm-cov

?? llvm-cov-pretty More beautiful HTML reports for llvm-cov (cargo-llvm-cov specifically). Dark theme support (switches automatically based on your br

Dominik Nakamura 13 Jun 26, 2023